(enhancement) Printing an error on unclosed quote and corrected a typo.

This commit is contained in:
Jérôme Guélen 2025-04-24 16:55:16 +02:00
parent 3b5df9ec10
commit a86616f910
No known key found for this signature in database
5 changed files with 70 additions and 12 deletions

33
test.sh
View file

@ -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