diff options
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r-- | shell/hush_test/hush-vars/var_unbackslash.right | 11 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_unbackslash.tests | 23 |
2 files changed, 34 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_unbackslash.right b/shell/hush_test/hush-vars/var_unbackslash.right new file mode 100644 index 000000000..20c2ddf55 --- /dev/null +++ b/shell/hush_test/hush-vars/var_unbackslash.right @@ -0,0 +1,11 @@ +b1=-qwerty-t-\-"---z-*-?- +b1=-qwerty-t-\-"---z-*-?- +b2=-qwerty-\t-\-"-\--\z-\*-\?- +b2=-qwerty-\t-\-"-\--\z-\*-\?- +b3=-$a-\t-\\-\"-\--\z-\*-\?- +b3=-$a-\t-\\-\"-\--\z-\*-\?- +c=-$a-\t-\\-\"-\--\z-\*-\?- +c=-$a-\t-\\-\"-\--\z-\*-\?- +c=-$a-\t-\\-\"-\--\z-\*-\?- +c=-$a-\t-\\-\"-\--\z-\*-\?- +Done: 0 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 000000000..3c35d7df5 --- /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: $?" |