mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix(parsing/subshell): missing allocation for group cmd
This commit is contained in:
parent
9fcb34e1d5
commit
e1801652af
2 changed files with 51 additions and 2 deletions
47
test.sh
47
test.sh
|
|
@ -1237,4 +1237,51 @@ minishell: cd: file: Not a directory
|
|||
1
|
||||
EOF
|
||||
|
||||
when_run <<EOF "subshell"
|
||||
touch hi hello
|
||||
(ls)
|
||||
EOF
|
||||
expecting <<EOF
|
||||
hello
|
||||
hi
|
||||
EOF
|
||||
|
||||
when_run <<EOF "subshell within subshell"
|
||||
touch hi hello
|
||||
((ls))
|
||||
EOF
|
||||
expecting <<EOF
|
||||
hello
|
||||
hi
|
||||
EOF
|
||||
|
||||
when_run <<EOF "subshell within and"
|
||||
touch hi hello
|
||||
ls && (ls)
|
||||
EOF
|
||||
expecting <<EOF
|
||||
hello
|
||||
hi
|
||||
hello
|
||||
hi
|
||||
EOF
|
||||
|
||||
when_run <<EOF "subshell within or"
|
||||
touch hi hello
|
||||
(ls) || ls
|
||||
EOF
|
||||
expecting <<EOF
|
||||
hello
|
||||
hi
|
||||
EOF
|
||||
|
||||
when_run <<EOF "exit within subshell within or"
|
||||
touch hi hello
|
||||
(exit 1) || ls
|
||||
EOF
|
||||
expecting <<EOF
|
||||
hello
|
||||
hi
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue