Closed TetsuOtter closed 1 year ago
そもそもテストの方法が間違ってた。 DQUOTEで囲んだつもりが、囲ってなかっただけだったっぽい?
tetsu@TRs-MacBook-Pro:~/ftgit/minishell% ./obj/test_serializer '"$ABC $ABC"'
argv[1]: '"$ABC $ABC"'
cmd[0] ~~~~~~~~~~~~~~~~~~ (isValid?: CMD_INVAL_NO_ERR at 1)
elem[ 0]: CMDTYP_QUOTE_VAR 'ABC'(2 .. 3) -> spc:1
elem[ 1]: CMDTYP_NORMAL ' '(5 .. 2) -> spc:1
elem[ 2]: CMDTYP_QUOTE_VAR 'ABC'(8 .. 3) -> spc:0
(AGRC: 1 / isValid?: CMD_INVAL_NO_ERR)
tetsu@TRs-MacBook-Pro:~/ftgit/minishell% ./minishell -c 'ls "$USER $USER"'
ls: tetsu tetsu: No such file or directory
tetsu@TRs-MacBook-Pro:~/ftgit/minishell% ./minishell -c 'ls "$ABC $ABC"'
ls: abc def abc def: No such file or directory
tetsu@TRs-MacBook-Pro:~/ftgit/minishell% ./minishell -c 'ls $ABC" $ABC"'
ls: abc: No such file or directory
ls: def abc def: No such file or directory