summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-vars/var_unbackslash.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-vars/var_unbackslash.tests')
-rwxr-xr-xshell/hush_test/hush-vars/var_unbackslash.tests23
1 files changed, 23 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_unbackslash.tests b/shell/hush_test/hush-vars/var_unbackslash.tests
new file mode 100755
index 0000000..3c35d7d
--- /dev/null
+++ b/shell/hush_test/hush-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: $?"