tests(redir): ensure targets are expanded when no words are in the cmd

This commit is contained in:
Khaïs COLIN 2025-04-28 16:15:27 +02:00
parent d4da91b62b
commit aeb5105d97

15
test.sh
View file

@ -1458,4 +1458,19 @@ minishell: printff: command not found
bonjour
EOF
when_run <<"EOF" "redirection expansion when no commands are included"
export VAR="bonjour hello"
>$VAR>hey
ls
>hey>$VAR
ls
>hey>$VAR>hey>hey
ls
EOF
expecting <<"EOF"
minishell: $VAR: ambiguous redirect
minishell: $VAR: ambiguous redirect
minishell: $VAR: ambiguous redirect
EOF
finalize