diff options
Diffstat (limited to 'shell/hush_test/hush-quoting/bkslash_case1.tests')
-rwxr-xr-x | shell/hush_test/hush-quoting/bkslash_case1.tests | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/bkslash_case1.tests b/shell/hush_test/hush-quoting/bkslash_case1.tests new file mode 100755 index 0000000..d0c3599 --- /dev/null +++ b/shell/hush_test/hush-quoting/bkslash_case1.tests @@ -0,0 +1,38 @@ +# Case argument is globbed, match patterns are not. +# This caught some bugs in the past. + +case z in +\z ) echo ok1 ;; +* ) echo BUG ;; +esac +case \z in +z ) echo ok2 ;; +* ) echo BUG ;; +esac +case \z in +\z ) echo ok3 ;; +* ) echo BUG ;; +esac +case z in +\z ) echo ok4 ;; +* ) echo BUG ;; +esac +case \\z in +\\z ) echo ok5 ;; +* ) echo BUG ;; +esac +echo Ok:$? + +case "\z" in +"\z" ) echo ok6 ;; +* ) echo BUG ;; +esac +case "\\z" in +"\\z" ) echo ok7 ;; +* ) echo BUG ;; +esac +case "\\\z" in +"\\\z") echo ok8 ;; +* ) echo BUG ;; +esac +echo Ok:$? |