mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
redirection parsing: parse redirections for cmdgroup
This commit is contained in:
parent
c258fa6077
commit
448458b37f
5 changed files with 129 additions and 2 deletions
23
test.sh
23
test.sh
|
|
@ -102,4 +102,27 @@ expecting <<EOF
|
|||
╰─ (no redirections)
|
||||
EOF
|
||||
|
||||
when_run <<EOF "redirections are parsed"
|
||||
echo hello < in hi > out
|
||||
EOF
|
||||
expecting <<EOF
|
||||
╰─ t_cmdgroup
|
||||
├─ t_cmdlist
|
||||
│ ├─ num_cmds = 1
|
||||
│ ╰─ cmd[0]
|
||||
│ ├─ t_cmdlist_item
|
||||
│ │ ╰─ t_pipeline
|
||||
│ │ ├─ num_cmd = 1
|
||||
│ │ ╰─ cmd[0]
|
||||
│ │ ╰─ t_simple_cmd
|
||||
│ │ ├─ words = [echo][hello][hi]
|
||||
│ │ ╰─ t_redir_list
|
||||
│ │ ├─ redirection[0]
|
||||
│ │ │ ╰─ t_redirection
|
||||
│ │ ╰─ redirection[1]
|
||||
│ │ ╰─ t_redirection
|
||||
│ ╰─ t_operator = END
|
||||
╰─ (no redirections)
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue