diff options
| -rw-r--r-- | suites/builtin.py | 12 | ||||
| -rw-r--r-- | suites/preprocess.py | 9 |
2 files changed, 19 insertions, 2 deletions
diff --git a/suites/builtin.py b/suites/builtin.py index 22c3683..6828200 100644 --- a/suites/builtin.py +++ b/suites/builtin.py @@ -6,7 +6,7 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:43 by charles #+# #+# # -# Updated: 2020/07/15 18:24:44 by charles ### ########.fr # +# Updated: 2020/07/17 13:42:15 by charles ### ########.fr # # # # ############################################################################ # @@ -84,6 +84,7 @@ def suite_export(test): test("export 'asdf ' B ' asdf asdf asd f' ' asdf ' '' 'asdf ' C; echo $A$B$C") test("export A 'asdf ' B ' asdf asdf asd f' ' asdf ' '' 'asdf '; echo $A$B$C") + test("export $TEST", exports={"TEST": "A=a"}) @suite def suite_cd(test): @@ -155,6 +156,15 @@ def suite_exit(test): test("exit 1") test("exit 2") test("exit 3") + test("exit ' 3'") + test("exit '\t3'") + 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 0") test("exit -0") test("exit -1") diff --git a/suites/preprocess.py b/suites/preprocess.py index 891747e..503f3be 100644 --- a/suites/preprocess.py +++ b/suites/preprocess.py @@ -6,7 +6,7 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:25:00 by charles #+# #+# # -# Updated: 2020/07/15 18:25:01 by charles ### ########.fr # +# Updated: 2020/07/17 10:53:43 by charles ### ########.fr # # # # ############################################################################ # @@ -67,6 +67,8 @@ def suite_interpolation(test): test("$ECHO $ECHO", exports={"ECHO": "echo"}) test("$A$B bonjour", exports={"A": "ec", "B": "ho"}) + test("$LS", exports={"LS": "ls -l"}, setup="touch a b c") + test("echo $") @suite @@ -146,6 +148,11 @@ def suite_escape(test): test(r"\e\c\h\o bonjour") test(r"echo charles\ ") test(r"echo \ \ jesuis\ \ charles") + test(r"echo \ \ jesuis\; \ charles") + test(r"echo \ \ jesuis\&\& \ charles") + test(r"echo \ \ jesuis\|\| \ charles") + test(r"echo \ \ jesuis \|\| \ charles") + test(r"echo \ \ jesuis\; \ charles") test(r"echo \ \ \ \ \ \ \ \ ") test(r"echo \ \ \ \ \ \ \ \ \ \ \ \ \ \ ") test(r"echo \$PATH") |
