diff options
| -rwxr-xr-x | main.py | 1 | ||||
| -rw-r--r-- | suites/parenthesis.py | 18 |
2 files changed, 19 insertions, 0 deletions
@@ -10,6 +10,7 @@ from suite import Suite import suites.builtin import suites.suites import suites.operation +import suites.parenthesis def main(): if not os.path.exists(config.EXECUTABLES_PATH): 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"]) |
