diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-06-23 09:08:16 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-06-23 10:31:05 +0200 |
| commit | 3f2db95d5563c9c2b92a0531ddee28f79f438706 (patch) | |
| tree | ee353ad4a0fcca9d59758f2e98efa3d9907096fc /suites/operation.py | |
| parent | b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6 (diff) | |
| download | minishell_test-3f2db95d5563c9c2b92a0531ddee28f79f438706.tar.gz minishell_test-3f2db95d5563c9c2b92a0531ddee28f79f438706.tar.bz2 minishell_test-3f2db95d5563c9c2b92a0531ddee28f79f438706.zip | |
Added a few builtin/parenthesis tests
Diffstat (limited to 'suites/operation.py')
| -rw-r--r-- | suites/operation.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/suites/operation.py b/suites/operation.py index 7bed096..8d912d3 100644 --- a/suites/operation.py +++ b/suites/operation.py @@ -9,6 +9,9 @@ def suite_end(test): test("echo; ") test("echo ; ") test("echo ;") + test("; echo") + test(" ;echo") + test(" ; echo") 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") @@ -29,6 +32,9 @@ def suite_and(test): test("echo&& ") test("echo && ") test("echo &&") + test("&&echo") + test("&& echo") + test(" && echo") 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") @@ -49,6 +55,9 @@ def suite_or(test): test("echo|| ") test("echo || ") test("echo ||") + test("||echo") + test("|| echo") + test(" || echo") 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") @@ -69,3 +78,10 @@ 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|") + test("echo |") + test("echo | ") + test("|cat") + test("| cat") + test(" | cat") |
