summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-vars/var_unbackslash.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-vars/var_unbackslash.tests')
-rwxr-xr-xshell/ash_test/ash-vars/var_unbackslash.tests23
1 files changed, 23 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/var_unbackslash.tests b/shell/ash_test/ash-vars/var_unbackslash.tests
new file mode 100755
index 0000000..bb52af3
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_unbackslash.tests
@@ -0,0 +1,23 @@
+# Test for correct handling of backslashes
+a=qwerty
+
+b=-$a-\t-\\-\"-\`-\--\z-\*-\?-
+echo b1=$b
+echo "b1=$b"
+b="-$a-\t-\\-\"-\`-\--\z-\*-\?-"
+echo b2=$b
+echo "b2=$b"
+b='-$a-\t-\\-\"-\`-\--\z-\*-\?-'
+echo b3=$b
+echo "b3=$b"
+
+c=$b
+echo "c=$c"
+c=${b}
+echo "c=$c"
+c="$b"
+echo "c=$c"
+c="${b}"
+echo "c=$c"
+
+echo "Done: $?"