mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
cmdgroup parsing: parse a single cmdlist
This commit is contained in:
parent
5379ad34f2
commit
3edff91107
3 changed files with 30 additions and 4 deletions
|
|
@ -0,0 +1,22 @@
|
|||
It "parses null for empty command"
|
||||
Data
|
||||
#|
|
||||
End
|
||||
|
||||
When call ./minishell
|
||||
The output should eq ""
|
||||
End
|
||||
|
||||
It "a single command is parsed"
|
||||
Data
|
||||
#|echo hello
|
||||
End
|
||||
|
||||
When call ./minishell
|
||||
The output should eq \
|
||||
" ╰─ t_cmdgroup
|
||||
├─ t_cmdlist
|
||||
│ ├─ num_cmds = 1
|
||||
│ ╰─ cmd[0]
|
||||
╰─ t_redir_list"
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue