From b463bfa34471c1d3e65dfd4e22a99f4c84d7c5c6 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 19 Jun 2020 17:21:58 +0200 Subject: Added a few parenthesis tests --- suites/parenthesis.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 suites/parenthesis.py (limited to 'suites/parenthesis.py') 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"]) -- cgit