mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix(parsing/cmdgroup): report error the same way as everywhere else, prevent double report
before: ``` $ () minishell: syntax error near unexpected token `)' minishell: syntax error near unexpected token `)' ``` after: ``` $ () minishell: syntax error near unexpected token `)' ``` This probably fixes a few bugs as well, but I didn't look too hard. It just seemed nicer to have a consistent way to report errors.
This commit is contained in:
parent
ced979dd31
commit
96e46e9130
4 changed files with 23 additions and 20 deletions
9
test.sh
9
test.sh
|
|
@ -635,4 +635,13 @@ minishell: syntax error near unexpected token `|'
|
|||
2
|
||||
EOF
|
||||
|
||||
when_run <<EOF "unclosed cmdgroup"
|
||||
(echo hi
|
||||
echo \$?
|
||||
EOF
|
||||
expecting <<"EOF"
|
||||
minishell: syntax error near unexpected token `newline'
|
||||
2
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue