From 1ad72842b3dcf10cc89cd682a044f4780ac97e41 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 11 Sep 2020 18:32:57 +0200 Subject: Added export alone, quote missing and tab in cmd test --- src/suites/operation.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/suites/operation.py') diff --git a/src/suites/operation.py b/src/suites/operation.py index dc8642a..9d9c6d8 100644 --- a/src/suites/operation.py +++ b/src/suites/operation.py @@ -6,13 +6,14 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:52 by charles #+# #+# # -# Updated: 2020/09/11 17:05:35 by charles ### ########.fr # +# Updated: 2020/09/11 17:43:58 by charles ### ########.fr # # # # ############################################################################ # from suite import suite import hooks + @suite() def suite_end(test): test("echo bonjour; echo je") @@ -31,11 +32,11 @@ def suite_end(test): test("echo a ; echo b; echo c ;echo d ; echo e ;echo f; echo g ;echo h; echo i;" + "echo j ; echo k; echo l; echo m; echo c ; echo c; echo c ; echo c; echo c;" + "echo c; echo c ; echo c; echo v ; echo w; echo x; echo y ; echo z") - test("ls doesnotexists ; echo bonjour") test("ls doesnotexists; echo bonjour") test("echo bonjour; ls doesnotexists") + @suite() def suite_pipe(test): test("echo bonjour | cat") @@ -45,19 +46,18 @@ def suite_pipe(test): test("ls -l | cat -e | cat | cat | cat", setup="touch a b c d; mkdir m1 m2 m3") test("ls -l | cat -e | cat -e | cat -e | cat -e", setup="touch a b c d; mkdir m1 m2 m3") test("ls -l | cat -e < a", setup="touch a b c d; mkdir m1 m2 m3; echo bonjour > a") - test("echo|", hook=hooks.discard) test("echo |", hook=hooks.discard) test("echo | ", hook=hooks.discard) test("|cat", hook=hooks.error_line0) test("| cat", hook=hooks.error_line0) test(" | cat", hook=hooks.error_line0) - test("echo a | export A=a; echo $A") test("export A=a | cat; echo $A") # test("echo a | A=a; echo $A") # test("A=a | cat; echo $A") + @suite(bonus=True) def suite_and(test): test("echo bonjour&& echo je") @@ -76,11 +76,11 @@ def suite_and(test): test("echo a && echo b&& echo c &&echo d && echo e &&echo f&& echo g &&echo h&& echo i&&" + "echo j && echo k&& echo l&& echo m&& echo c && echo c&& echo c && echo c&& echo c&&" + "echo c&& echo c && echo c&& echo v && echo w&& echo x&& echo y && echo z") - test("ls doesnotexists && echo bonjour") test("ls doesnotexists&& echo bonjour") test("echo bonjour&& ls doesnotexists") + @suite(bonus=True) def suite_or(test): test("echo bonjour|| echo je") @@ -99,7 +99,6 @@ def suite_or(test): test("echo a || echo b|| echo c ||echo d || echo e ||echo f|| echo g ||echo h|| echo i||" + "echo j || echo k|| echo l|| echo m|| echo c || echo c|| echo c || echo c|| echo c||" + "echo c|| echo c || echo c|| echo v || echo w|| echo x|| echo y || echo z") - test("ls doesnotexists || echo bonjour") test("ls doesnotexists|| echo bonjour") test("echo bonjour|| ls doesnotexists") -- cgit