diff options
| -rw-r--r-- | suites/builtin.py | 3 | ||||
| -rw-r--r-- | suites/preprocess.py | 34 |
2 files changed, 35 insertions, 2 deletions
diff --git a/suites/builtin.py b/suites/builtin.py index 4cdee9a..4e79432 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/20 10:06:47 by charles ### ########.fr # +# Updated: 2020/08/28 17:36:12 by charles ### ########.fr # # # # ############################################################################ # @@ -86,6 +86,7 @@ def suite_export(test): test("export A 'asdf ' B ' asdf asdf asd f' ' asdf ' '' 'asdf ' C; echo $A$B$C") 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 A B C; echo $A$B$C") test("export $TEST", exports={"TEST": "A=a"}) diff --git a/suites/preprocess.py b/suites/preprocess.py index b7ddddf..90b37ca 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/08/19 17:08:59 by charles ### ########.fr # +# Updated: 2020/08/28 17:28:35 by charles ### ########.fr # # # # ############################################################################ # @@ -133,6 +133,38 @@ def suite_interpolation(test): test("echo $\A $\B", exports={"A": "a", "B": "b"}) test("echo $\A$\B", exports={"A": "a", "B": "b"}) + test("echo $A", exports={"A": " "}) + test("echo $A", exports={"A": " "}) + test("echo $A", exports={"A": " "}) + test("echo $A", exports={"A": " "}) + test("echo $A", exports={"A": " a "}) + test("echo $A", exports={"A": " "}) + test("echo $A", exports={"A": " a "}) + + test("echo @$A@", exports={"A": " "}) + test("echo @ $A@", exports={"A": " "}) + test("echo @$A @", exports={"A": " "}) + test("echo @$A@", exports={"A": " "}) + test("echo '@'$A'@'", exports={"A": " "}) + test("echo '@' $A'@'", exports={"A": " "}) + test("echo '@'$A '@'", exports={"A": " "}) + test('echo "@"$A"@"', exports={"A": " "}) + test('echo "@" $A"@"', exports={"A": " "}) + test('echo "@"$A "@"', exports={"A": " "}) + + test('echo @"$A"@', exports={"A": " "}) + test('echo @ "$A"@', exports={"A": " "}) + test('echo @"$A" @', exports={"A": " "}) + test('echo @"$A"@', exports={"A": " "}) + test("echo '@'\"$A\"'@'", exports={"A": " "}) + test("echo '@' \"$A\"'@'", exports={"A": " "}) + test("echo '@'\"$A\" '@'", exports={"A": " "}) + test('echo "@""$A""@"', exports={"A": " "}) + test('echo "@" "$A""@"', exports={"A": " "}) + test('echo "@""$A" "@"', exports={"A": " "}) + + test('echo $A$B$C', exports={"A": "", "B": "", "C": ""}) + @suite def suite_escape(test): |
