diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-06-19 17:21:58 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-06-19 17:21:58 +0200 |
| commit | b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6 (patch) | |
| tree | 12bb556d25e7d2a4e666c965d59ee7a882314fc4 /suites/parenthesis.py | |
| parent | 9ae06d1ada7828f986b8aa1ab9364ac2f9f0cbd7 (diff) | |
| download | minishell_test-b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6.tar.gz minishell_test-b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6.tar.bz2 minishell_test-b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6.zip | |
Added a few parenthesis tests
Diffstat (limited to 'suites/parenthesis.py')
| -rw-r--r-- | suites/parenthesis.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/suites/parenthesis.py b/suites/parenthesis.py new file mode 100644 index 0000000..c1df83b --- /dev/null +++ b/suites/parenthesis.py @@ -0,0 +1,18 @@ +from suite import suite + +@suite +def suite_parenthesis(test): + test("(echo bonjour)") + test("(echo bonjour )") + test("( echo bonjour )") + + test("(echo a && echo b) && echo c") + test("(echo a || echo b) || echo c") + test("(ls doesnotexist || echo b) || echo c") + test("(echo a || ls doesnotexist) || echo c") + test("echo aa && (echo b && echo c)") + test("ls doesnotexist || (echo b && echo c)") + + test("(echo bonjour > f1)", files=["f1"]) + test("(echo bonjour > f1) > f2", files=["f1", "f2"]) + test("(cat -e > f1) < f2", setup="ls -l / > f2", files=["f1"]) |
