cmdgroup parsing: parse a single cmdlist

This commit is contained in:
Khaïs COLIN 2025-03-19 11:28:32 +01:00
parent 5379ad34f2
commit 3edff91107
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
3 changed files with 30 additions and 4 deletions

View file

@ -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