aboutsummaryrefslogtreecommitdiff
path: root/suites/preprocess.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-28 17:51:18 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-28 17:51:18 +0200
commit63d58003edaf5621b5fbfc921583ba18d378ba00 (patch)
treebf3b9407074627b87a90bc35e7286cc829c3a465 /suites/preprocess.py
parentaacf088db4d9d3e0b450247abe1d8f258d07d862 (diff)
downloadminishell_test-63d58003edaf5621b5fbfc921583ba18d378ba00.tar.gz
minishell_test-63d58003edaf5621b5fbfc921583ba18d378ba00.tar.bz2
minishell_test-63d58003edaf5621b5fbfc921583ba18d378ba00.zip
Added edge case preprocessing, export test
Diffstat (limited to 'suites/preprocess.py')
-rw-r--r--suites/preprocess.py34
1 files changed, 33 insertions, 1 deletions
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):