diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-07 08:29:32 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-07 08:32:55 +0200 |
| commit | 06f6eeee3a7aaea881d7b399454762f65c8cec87 (patch) | |
| tree | 5fcdf9a6283d61069c1226c4876c99af0da2ab83 /src/suites/builtin.py | |
| parent | 058491e35baa8bc73e14b48ceb765a3fe3c07e1f (diff) | |
| download | minishell_test-06f6eeee3a7aaea881d7b399454762f65c8cec87.tar.gz minishell_test-06f6eeee3a7aaea881d7b399454762f65c8cec87.tar.bz2 minishell_test-06f6eeee3a7aaea881d7b399454762f65c8cec87.zip | |
Added Linux exit status and output conversion to macos
Diffstat (limited to 'src/suites/builtin.py')
| -rw-r--r-- | src/suites/builtin.py | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/suites/builtin.py b/src/suites/builtin.py index 3aecfb9..6788553 100644 --- a/src/suites/builtin.py +++ b/src/suites/builtin.py @@ -6,7 +6,7 @@ # By: juligonz <juligonz@student.42.fr> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:43 by charles #+# #+# # -# Updated: 2020/09/15 17:29:35 by charles ### ########.fr # +# Updated: 2020/10/07 08:20:48 by charles ### ########.fr # # Updated: 2020/09/11 18:01:27 by juligonz ### ########.fr # # # # **************************************************************************** # @@ -249,10 +249,10 @@ def suite_pwd(test): @suite() def suite_env(test): - test("env", hook=hooks.sort_lines) - test("env", setup="export A=a", hook=hooks.sort_lines) - test("env", setup="export A=a B=b C=c", hook=hooks.sort_lines) - test("env | cat -e", setup="export A=a B=b C=c", hook=hooks.sort_lines) + test("env", hook=[hooks.sort_lines, hooks.shlvl_0_to_1]) + test("env", setup="export A=a", hook=[hooks.sort_lines, hooks.shlvl_0_to_1]) + test("env", setup="export A=a B=b C=c", hook=[hooks.sort_lines, hooks.shlvl_0_to_1]) + test("env | cat -e", setup="export A=a B=b C=c", hook=[hooks.sort_lines, hooks.shlvl_0_to_1]) @suite() @@ -266,10 +266,10 @@ def suite_exit(test): test("exit '\t\f\r 3'") test("exit '3 '") test("exit '3\t'") - test("exit '3\r'") - test("exit '3\t\f\r '") - test("exit '3 a'") - test("exit '3\t\t\ta'") + test("exit '3\r'", hook_status=hooks.platform_status(255, 2)) + test("exit '3\t\f\r '", hook_status=hooks.platform_status(255, 2)) + test("exit '3 a'", hook_status=hooks.platform_status(255, 2)) + test("exit '3\t\t\ta'", hook_status=hooks.platform_status(255, 2)) test("exit 0") test("exit -0") test("exit -1") @@ -287,10 +287,10 @@ def suite_exit(test): test("exit 4294967296") test("exit -9223372036854775808") test("exit 9223372036854775807") - test("exit -9223372036854775809") - test("exit 9223372036854775808") - test("exit 18446744073709551615") - test("exit 18446744073709551616") + test("exit -9223372036854775809", hook_status=hooks.platform_status(255, 2)) + test("exit 9223372036854775808", hook_status=hooks.platform_status(255, 2)) + test("exit 18446744073709551615", hook_status=hooks.platform_status(255, 2)) + test("exit 18446744073709551616", hook_status=hooks.platform_status(255, 2)) test("exit +1") test("exit +2") test("exit +3") @@ -299,25 +299,25 @@ def suite_exit(test): test("exit +256") test("exit +2000000") test("exit +2147483647") - test("exit ++1") - test("exit ++2") - test("exit ++3") - test("exit ++0") - test("exit ++255") - test("exit ++256") - test("exit ++2000000") - test("exit ++2147483647") - test("exit --1") - test("exit --2") - test("exit --3") - test("exit --0") - test("exit --255") - test("exit --256") - test("exit --2000000") - test("exit --2147483647") - test("exit bonjour") - test("exit 0_") - test("exit _0") + test("exit ++1", hook_status=hooks.platform_status(255, 2)) + test("exit ++2", hook_status=hooks.platform_status(255, 2)) + test("exit ++3", hook_status=hooks.platform_status(255, 2)) + test("exit ++0", hook_status=hooks.platform_status(255, 2)) + test("exit ++255", hook_status=hooks.platform_status(255, 2)) + test("exit ++256", hook_status=hooks.platform_status(255, 2)) + test("exit ++2000000", hook_status=hooks.platform_status(255, 2)) + test("exit ++2147483647", hook_status=hooks.platform_status(255, 2)) + test("exit --1", hook_status=hooks.platform_status(255, 2)) + test("exit --2", hook_status=hooks.platform_status(255, 2)) + test("exit --3", hook_status=hooks.platform_status(255, 2)) + test("exit --0", hook_status=hooks.platform_status(255, 2)) + test("exit --255", hook_status=hooks.platform_status(255, 2)) + test("exit --256", hook_status=hooks.platform_status(255, 2)) + test("exit --2000000", hook_status=hooks.platform_status(255, 2)) + test("exit --2147483647", hook_status=hooks.platform_status(255, 2)) + test("exit bonjour", hook_status=hooks.platform_status(255, 2)) + test("exit 0_", hook_status=hooks.platform_status(255, 2)) + test("exit _0", hook_status=hooks.platform_status(255, 2)) test("exit 0123456789") test("exit -0123456789") test("exit 00000000000000000000000000000000000000000000001") @@ -328,11 +328,11 @@ def suite_exit(test): test("exit -00000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000001") test("exit -99999999999999999999999999999999999999999999" - "99999999999999999999999999999999999999999999") + "99999999999999999999999999999999999999999999", hook_status=hooks.platform_status(255, 2)) test("exit 99999999999999999999999999999999999999999999" - "99999999999999999999999999999999999999999999") + "99999999999999999999999999999999999999999999", hook_status=hooks.platform_status(255, 2)) test("exit 0 bonjour") - test("exit bonjour 0") + test("exit bonjour 0", hook_status=hooks.platform_status(255, 2)) test("exit 0 1") test("exit 0 1 2 3 4 5 6 7 8 9") - test("exit " + config.LOREM) + test("exit " + config.LOREM, hook_status=hooks.platform_status(255, 2)) |
