From 12f385695e13bbb0dd65062fa371bd914acd7862 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 15 Sep 2020 17:54:02 +0200 Subject: Added more parenthesis, pipe, quote tests --- src/suites/flow.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/suites/flow.py') diff --git a/src/suites/flow.py b/src/suites/flow.py index f92160a..ec4167c 100644 --- a/src/suites/flow.py +++ b/src/suites/flow.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:52 by charles #+# #+# # -# Updated: 2020/09/14 21:33:02 by charles ### ########.fr # +# Updated: 2020/09/15 16:45:47 by charles ### ########.fr # # # # ############################################################################ # @@ -48,6 +48,9 @@ def suite_pipe(test): test("cat -e /etc/shells | head -c 10") test("cat -e /etc/shells | cat -e | head -c 10") test("cat -e /etc/shells | cat -e | cat -e | head -c 10") + test("cat -e /dev/random | head -c 10", hook=hooks.discard) + test("cat -e /dev/random | cat -e | head -c 10", hook=hooks.discard) + test("cat -e /dev/random | cat -e | cat -e | head -c 10", hook=hooks.discard) test("echo bonjour | cat") test("echo bonjour | cat -e") test("echo bonjour | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e | cat -e") @@ -163,5 +166,17 @@ def suite_parenthesis(test): test("(echo a; echo b) | cat -e") test("echo bonjour | (cat -e; echo a)") test("echo bonjour | (echo a; cat -e)") + test("(echo a) | (cat -e)") + test("(echo a; echo b) | (cat -e)") + test("(echo a) | (cat -e | cat -e)") + test("(echo a; echo b) | (cat -e | cat -e)") + test("(echo a; echo b) | cat -e | cat -e") + test("(echo a); (echo b) | (cat -e) | (cat -e)") + test("echo a | (cat -e | cat -e | cat -e)") + test("echo a | (cat -e | cat -e | cat -e) | cat -e") + test("(echo a) | (cat -e | cat -e | cat -e) | cat -e") + test("(echo a) | (cat -e | cat -e | cat -e) | (cat -e)") # test("(echo bonjour ; echo aurevoir) | (cat -e | cat -e) | cat -e") - test("( echo salut && echo bonjours ) ; echo comment ca va") + test("( echo salut && echo bonjours ) ; echo comment ca va") + test("(cd /; echo $PWD; pwd); echo $PWD; pwd") + test("(export A=a; echo $A); echo $A") -- cgit