From d0a80859f630866461e8a888b3f8fe008c8158ba Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 11 Sep 2020 14:27:26 +0200 Subject: Added suite group and suite bonus, Added signal (not tested) --- src/suites/cmd.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/suites/cmd.py') diff --git a/src/suites/cmd.py b/src/suites/cmd.py index 1302ae3..4fc5f55 100644 --- a/src/suites/cmd.py +++ b/src/suites/cmd.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 15:11:46 by charles #+# #+# # -# Updated: 2020/09/10 14:25:40 by charles ### ########.fr # +# Updated: 2020/09/11 14:25:04 by charles ### ########.fr # # # # ############################################################################ # @@ -16,7 +16,7 @@ import config from suite import suite -@suite +@suite() def suite_redirection(test): test("echo bonjour > test", setup="", files=["test"]) test("echo > test bonjour", setup="", files=["test"]) @@ -96,9 +96,10 @@ def suite_redirection(test): test("cat < doesnotexist") - -@suite -def suite_edgecases(test): +@suite() +def suite_cmd(test): + test("notfound") + test("notfound a b c") test('echo "\\"" >>a"b""c" ', files=["abc"]) test("echo " + ''.join([chr(i) for i in range(1, 127) if chr(i) not in '\n`"\'()|&><'])) test("echo foo>bar", files=["bar"]) @@ -106,12 +107,7 @@ def suite_edgecases(test): test("echo foo> bar", files=["bar"]) test("echo foo > bar", files=["bar"]) -@suite -def suite_cmd(test): - test("notfound") - test("notfound a b c") - -@suite +@suite(bonus=True) def suite_cmd_variable(test): test("A=a sh -c 'echo $A'") test("A=a B=b sh -c 'echo $A$B'") @@ -202,7 +198,7 @@ def suite_cmd_variable(test): test("'BONJOURJESUIS''=''a' sh -c 'echo $BONJOURJESUIS'") test('"BONJOURJESUIS""=""a" sh -c "echo $BONJOURJESUIS"') -@suite +@suite() def suite_cmd_path(test): ls_path = distutils.spawn.find_executable("ls") cat_path = distutils.spawn.find_executable("cat") -- cgit