aboutsummaryrefslogtreecommitdiff
path: root/minishell_test/suites
diff options
context:
space:
mode:
Diffstat (limited to 'minishell_test/suites')
-rw-r--r--minishell_test/suites/builtin.py6
-rw-r--r--minishell_test/suites/flow.py14
2 files changed, 10 insertions, 10 deletions
diff --git a/minishell_test/suites/builtin.py b/minishell_test/suites/builtin.py
index c373ce6..2591bc3 100644
--- a/minishell_test/suites/builtin.py
+++ b/minishell_test/suites/builtin.py
@@ -6,7 +6,7 @@
# By: juligonz <juligonz@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:43 by charles #+# #+# #
-# Updated: 2021/02/27 12:07:46 by cacharle ### ########.fr #
+# Updated: 2021/02/27 20:36:27 by cacharle ### ########.fr #
# Updated: 2020/09/11 18:01:27 by juligonz ### ########.fr #
# #
# **************************************************************************** #
@@ -168,7 +168,7 @@ def suite_cd(test):
test("echo $PWD; echo $OLDPWD; cd /.; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd /./; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd /././././; pwd; echo $PWD; echo $OLDPWD")
- test("echo $PWD; echo $OLDPWD; cd //; pwd; echo $PWD; echo $OLDPWD", hook=hooks.replace_double_slash)
+ test("echo $PWD; echo $OLDPWD; cd //; pwd; echo $PWD; echo $OLDPWD", hook=hooks.replace_double("/"))
test("echo $PWD; echo $OLDPWD; cd ///; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd ////; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd //////////////////////////////////////////////////////; pwd; echo $PWD; echo $OLDPWD")
@@ -179,7 +179,7 @@ def suite_cd(test):
test("echo $PWD; echo $OLDPWD; cd ' /'; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd ' / '; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd ' // '; pwd; echo $PWD; echo $OLDPWD")
- test("echo $PWD; echo $OLDPWD; cd //home; pwd; echo $PWD; echo $OLDPWD", hook=hooks.replace_double_slash)
+ test("echo $PWD; echo $OLDPWD; cd //home; pwd; echo $PWD; echo $OLDPWD", hook=hooks.replace_double("/"))
test("echo $PWD; echo $OLDPWD; cd ' //home'; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd ' //home '; pwd; echo $PWD; echo $OLDPWD")
test("echo $PWD; echo $OLDPWD; cd d; echo $OLDPWD", setup="mkdir -m 000 d")
diff --git a/minishell_test/suites/flow.py b/minishell_test/suites/flow.py
index 2adbb4b..aa6d395 100644
--- a/minishell_test/suites/flow.py
+++ b/minishell_test/suites/flow.py
@@ -6,7 +6,7 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:52 by charles #+# #+# #
-# Updated: 2021/02/27 12:06:58 by cacharle ### ########.fr #
+# Updated: 2021/02/27 20:35:46 by cacharle ### ########.fr #
# #
# ############################################################################ #
@@ -16,7 +16,7 @@ from minishell_test.hooks import (
error_line0,
platform_status,
discard,
- replace_double_semi_colon,
+ replace_double,
error_eof_to_expected_token
)
@@ -49,11 +49,11 @@ def suite_end(test):
test("; ;", hook=error_line0, hook_status=platform_status(2, 1))
test("; ; ;", hook=error_line0, hook_status=platform_status(2, 1))
test("echo a ; ; echo b", hook=error_line0, hook_status=platform_status(2, 1))
- test(";;", hook=[error_line0, replace_double_semi_colon], hook_status=platform_status(2, 1))
- test(";;;", hook=[error_line0, replace_double_semi_colon], hook_status=platform_status(2, 1))
- test(";;;;;", hook=[error_line0, replace_double_semi_colon], hook_status=platform_status(2, 1))
- test("echo a ;; echo b", hook=[error_line0, replace_double_semi_colon], hook_status=platform_status(2, 1))
- test("echo a ;;;;; echo b", hook=[error_line0, replace_double_semi_colon], hook_status=platform_status(2, 1))
+ test(";;", hook=[error_line0, replace_double(";")], hook_status=platform_status(2, 1))
+ test(";;;", hook=[error_line0, replace_double(";")], hook_status=platform_status(2, 1))
+ test(";;;;;", hook=[error_line0, replace_double(";")], hook_status=platform_status(2, 1))
+ test("echo a ;; echo b", hook=[error_line0, replace_double(";")], hook_status=platform_status(2, 1))
+ test("echo a ;;;;; echo b", hook=[error_line0, replace_double(";")], hook_status=platform_status(2, 1))
test("ls " + 40 * " ; ls", setup="touch a b c")
test("ls " + 80 * " ; ls", setup="touch a b c")
test("ls " + 40 * " ; ls" + ";", setup="touch a b c")