mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix(debug): correctly print here_doc_eof in redirect debug
This commit is contained in:
parent
38ffac7fc3
commit
bf26afce2b
2 changed files with 64 additions and 2 deletions
60
test.sh
60
test.sh
|
|
@ -860,4 +860,64 @@ goodbye
|
|||
0
|
||||
EOF
|
||||
|
||||
when_run <<EOF "correct parsing and debugging of multiple redirections"
|
||||
.debug
|
||||
.exec
|
||||
echo hello > outfile > outfile
|
||||
EOF
|
||||
expecting <<EOF
|
||||
[dbg: 1]
|
||||
[exec: 0]
|
||||
parsed command
|
||||
╰─ t_cmd
|
||||
├─ t_cmd_type = FT_SIMPLE
|
||||
├─ flags = 0
|
||||
├─ line = 0
|
||||
╰─ value
|
||||
╰─ t_simple_cmd
|
||||
├─ line = 0
|
||||
├─ t_wordlist
|
||||
│ ├─ t_worddesc
|
||||
│ │ ├─ word = [echo]
|
||||
│ │ ├─ marker = [ ]
|
||||
│ │ ├─ flags = 0
|
||||
│ │ ╰─ t_token_type = WORD_TOKEN
|
||||
│ ╰─ t_worddesc
|
||||
│ ├─ word = [hello]
|
||||
│ ├─ marker = [ ]
|
||||
│ ├─ flags = 0
|
||||
│ ╰─ t_token_type = WORD_TOKEN
|
||||
╰─ redirections
|
||||
├─ redirections[0]
|
||||
│ ╰─ t_redirect
|
||||
│ ├─ redir_type = FT_OUTPUT_TRUNC_REDIR
|
||||
│ ├─ source = 1
|
||||
│ ├─ open_flags = 577
|
||||
│ ├─ c_flags = 420
|
||||
│ ├─ t_redirectee
|
||||
│ │ ├─ dest = 14320
|
||||
│ │ ╰─ t_worddesc
|
||||
│ │ ├─ word = [outfile]
|
||||
│ │ ├─ marker = [ ]
|
||||
│ │ ├─ flags = 0
|
||||
│ │ ╰─ t_token_type = WORD_TOKEN
|
||||
│ ├─ c_flags = [(null)]
|
||||
│ ╰─ here_doc_eof = [(null)]
|
||||
╰─ redirections[1]
|
||||
╰─ t_redirect
|
||||
├─ redir_type = FT_OUTPUT_TRUNC_REDIR
|
||||
├─ source = 1
|
||||
├─ open_flags = 577
|
||||
├─ c_flags = 420
|
||||
├─ t_redirectee
|
||||
│ ├─ dest = 14608
|
||||
│ ╰─ t_worddesc
|
||||
│ ├─ word = [outfile]
|
||||
│ ├─ marker = [ ]
|
||||
│ ├─ flags = 0
|
||||
│ ╰─ t_token_type = WORD_TOKEN
|
||||
├─ c_flags = [(null)]
|
||||
╰─ here_doc_eof = [(null)]
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue