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/parenthesis.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/parenthesis.py')
| -rw-r--r-- | suites/parenthesis.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/suites/parenthesis.py b/suites/parenthesis.py index c1df83b..30f1cce 100644 --- a/suites/parenthesis.py +++ b/suites/parenthesis.py @@ -14,5 +14,32 @@ def suite_parenthesis(test): test("ls doesnotexist || (echo b && echo c)") test("(echo bonjour > f1)", files=["f1"]) + test("(echo bonjour > f1 > f2 > f3)", files=["f1", "f2", "f3"]) + test("(echo bonjour > f1 > f2 > f3 > f4 > f5 > f6 > f7 > f8 > f9)", + files=["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9"]) + + test("(echo bonjour) > f1", files=["f1"]) + test("(echo bonjour) > f1 > f2 > f3", files=["f1", "f2", "f3"]) + test("(echo bonjour) > f1 > f2 > f3 > f4 > f5 > f6 > f7 > f8 > f9", + files=["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9"]) + + test("(cat -e < f1)", setup="echo bonjour > f1") + test("(cat -e < f1 < f2 < f3)", setup="touch f1 f2 f3 f4; echo bonjour > f3") + test("(cat -e < f1 < f2 < f3 < f4 < f5 < f6 < f7 < f8 < f9)", + setup="touch f1 f2 f3 f4 f5 f6 f7 f8 f9; echo bonjour > f9") + + test("(cat -e) < f1", setup="echo bonjour > f1") + test("(cat -e) < f1 < f2 < f3", setup="touch f1 f2 f3 f4; echo bonjour > f3") + test("(cat -e) < f1 < f2 < f3 < f4 < f5 < f6 < f7 < f8 < f9", + setup="touch f1 f2 f3 f4 f5 f6 f7 f8 f9; echo bonjour > f9") + + test("(echo bonjour > f1 > f2 > f3 > f4) > f5 > f6 > f7 > f8 > f9", + files=["f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9"]) + test("(cat -e < f1 < f2 < f3 < f4) < f5 < f6 < f7 < f8 < f9", + setup="touch f1 f2 f3 f4 f5 f6 f7 f8 f9; echo bonjour > f4") + test("(echo bonjour > f1) > f2", files=["f1", "f2"]) test("(cat -e > f1) < f2", setup="ls -l / > f2", files=["f1"]) + + test("(exit); echo bonjour") + test("(echo bonjour; exit; echo aurevoir)") |
