mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
feat(redir): fieldsplit redir target, and handle ambiguous redirects
This commit is contained in:
parent
5de82f2940
commit
2dd20b21bc
10 changed files with 137 additions and 12 deletions
21
test.sh
21
test.sh
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue