mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
(enhancement) Printing an error on unclosed quote and corrected a typo.
This commit is contained in:
parent
3b5df9ec10
commit
a86616f910
5 changed files with 70 additions and 12 deletions
33
test.sh
33
test.sh
|
|
@ -977,4 +977,37 @@ minishell: /root/outfile: Permission denied
|
|||
1
|
||||
EOF
|
||||
|
||||
when_run <<"EOF" "print error when unclosed quotes"
|
||||
echo " kjlhgsaf
|
||||
echo $?
|
||||
echo ' HGIFUY
|
||||
echo $?
|
||||
echo '"HGIFUY"
|
||||
echo $?
|
||||
echo '"HGIFUY
|
||||
echo $?
|
||||
echo "'HGIFUY
|
||||
echo $?
|
||||
echo "' HGI'FUY
|
||||
echo $?
|
||||
echo boubou
|
||||
echo $?
|
||||
EOF
|
||||
expecting <<"EOF"
|
||||
minishell: unexpected EOF while looking for matching `"'
|
||||
2
|
||||
minishell: unexpected EOF while looking for matching `''
|
||||
2
|
||||
minishell: unexpected EOF while looking for matching `''
|
||||
2
|
||||
minishell: unexpected EOF while looking for matching `''
|
||||
2
|
||||
minishell: unexpected EOF while looking for matching `"'
|
||||
2
|
||||
minishell: unexpected EOF while looking for matching `"'
|
||||
2
|
||||
boubou
|
||||
0
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue