diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 18:32:57 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 18:32:57 +0200 |
| commit | 1ad72842b3dcf10cc89cd682a044f4780ac97e41 (patch) | |
| tree | 80c7ecbff4c3e20e3f6da86a96a3c7542c92500b /src/suites/operation.py | |
| parent | 1739695001889d53d29976943fda593d64afcefb (diff) | |
| download | minishell_test-1ad72842b3dcf10cc89cd682a044f4780ac97e41.tar.gz minishell_test-1ad72842b3dcf10cc89cd682a044f4780ac97e41.tar.bz2 minishell_test-1ad72842b3dcf10cc89cd682a044f4780ac97e41.zip | |
Added export alone, quote missing and tab in cmd test
Diffstat (limited to 'src/suites/operation.py')
| -rw-r--r-- | src/suites/operation.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/suites/operation.py b/src/suites/operation.py index dc8642a..9d9c6d8 100644 --- a/src/suites/operation.py +++ b/src/suites/operation.py @@ -6,13 +6,14 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:52 by charles #+# #+# # -# Updated: 2020/09/11 17:05:35 by charles ### ########.fr # +# Updated: 2020/09/11 17:43:58 by charles ### ########.fr # # # # ############################################################################ # from suite import suite import hooks + @suite() def suite_end(test): test("echo bonjour; echo je") @@ -31,11 +32,11 @@ def suite_end(test): test("echo a ; echo b; echo c ;echo d ; echo e ;echo f; echo g ;echo h; echo i;" + "echo j ; echo k; echo l; echo m; echo c ; echo c; echo c ; echo c; echo c;" + "echo c; echo c ; echo c; echo v ; echo w; echo x; echo y ; echo z") - test("ls doesnotexists ; echo bonjour") test("ls doesnotexists; echo bonjour") test("echo bonjour; ls doesnotexists") + @suite() def suite_pipe(test): test("echo bonjour | cat") @@ -45,19 +46,18 @@ def suite_pipe(test): test("ls -l | cat -e | cat | cat | cat", setup="touch a b c d; mkdir m1 m2 m3") test("ls -l | cat -e | cat -e | cat -e | cat -e", setup="touch a b c d; mkdir m1 m2 m3") test("ls -l | cat -e < a", setup="touch a b c d; mkdir m1 m2 m3; echo bonjour > a") - test("echo|", hook=hooks.discard) test("echo |", hook=hooks.discard) test("echo | ", hook=hooks.discard) test("|cat", hook=hooks.error_line0) test("| cat", hook=hooks.error_line0) test(" | cat", hook=hooks.error_line0) - test("echo a | export A=a; echo $A") test("export A=a | cat; echo $A") # test("echo a | A=a; echo $A") # test("A=a | cat; echo $A") + @suite(bonus=True) def suite_and(test): test("echo bonjour&& echo je") @@ -76,11 +76,11 @@ def suite_and(test): test("echo a && echo b&& echo c &&echo d && echo e &&echo f&& echo g &&echo h&& echo i&&" + "echo j && echo k&& echo l&& echo m&& echo c && echo c&& echo c && echo c&& echo c&&" + "echo c&& echo c && echo c&& echo v && echo w&& echo x&& echo y && echo z") - test("ls doesnotexists && echo bonjour") test("ls doesnotexists&& echo bonjour") test("echo bonjour&& ls doesnotexists") + @suite(bonus=True) def suite_or(test): test("echo bonjour|| echo je") @@ -99,7 +99,6 @@ def suite_or(test): test("echo a || echo b|| echo c ||echo d || echo e ||echo f|| echo g ||echo h|| echo i||" + "echo j || echo k|| echo l|| echo m|| echo c || echo c|| echo c || echo c|| echo c||" + "echo c|| echo c || echo c|| echo v || echo w|| echo x|| echo y || echo z") - test("ls doesnotexists || echo bonjour") test("ls doesnotexists|| echo bonjour") test("echo bonjour|| ls doesnotexists") |
