mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
tests(parsing): ensure unmatched ) are correctly reported
This commit is contained in:
parent
0c9dcd944e
commit
297d68e73c
1 changed files with 31 additions and 0 deletions
31
test.sh
31
test.sh
|
|
@ -1039,4 +1039,35 @@ minishell: syntax error near unexpected token `('
|
|||
var=
|
||||
EOF
|
||||
|
||||
when_run <<"EOF" "unmatched )"
|
||||
echo unclosed paren)
|
||||
echo $?
|
||||
EOF
|
||||
expecting <<"EOF"
|
||||
minishell: syntax error near unexpected token `)'
|
||||
2
|
||||
EOF
|
||||
|
||||
when_run <<"EOF" "unmatched ) in export"
|
||||
export VAR=bon)jour
|
||||
echo $?
|
||||
echo var=$VAR
|
||||
EOF
|
||||
expecting <<"EOF"
|
||||
minishell: syntax error near unexpected token `)'
|
||||
2
|
||||
var=
|
||||
EOF
|
||||
|
||||
when_run <<"EOF" "unexpected () in export"
|
||||
export VAR=bon()jour
|
||||
echo $?
|
||||
echo var=$VAR
|
||||
EOF
|
||||
expecting <<"EOF"
|
||||
minishell: syntax error near unexpected token `('
|
||||
2
|
||||
var=
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue