feat(redir): fieldsplit redir target, and handle ambiguous redirects

This commit is contained in:
Khaïs COLIN 2025-04-21 08:25:49 +02:00
parent 5de82f2940
commit 2dd20b21bc
10 changed files with 137 additions and 12 deletions

21
test.sh
View file

@ -820,4 +820,25 @@ outfile
hello there
EOF
when_run <<"EOF" "ambiguous redirect"
export target="outfile1 outfile2"
echo hello > $target
echo $?
echo hi >> $target
echo $?
cat < $target
echo $?
ls
echo $?
EOF
expecting <<"EOF"
minishell: $target: ambiguous redirect
1
minishell: $target: ambiguous redirect
1
minishell: $target: ambiguous redirect
1
0
EOF
finalize