diff options
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-quoting/bkslash_case1.right | 10 | ||||
-rwxr-xr-x | shell/ash_test/ash-quoting/bkslash_case1.tests | 38 |
2 files changed, 48 insertions, 0 deletions
diff --git a/shell/ash_test/ash-quoting/bkslash_case1.right b/shell/ash_test/ash-quoting/bkslash_case1.right new file mode 100644 index 000000000..1b52491f7 --- /dev/null +++ b/shell/ash_test/ash-quoting/bkslash_case1.right @@ -0,0 +1,10 @@ +ok1 +ok2 +ok3 +ok4 +ok5 +Ok:0 +ok6 +ok7 +ok8 +Ok:0 diff --git a/shell/ash_test/ash-quoting/bkslash_case1.tests b/shell/ash_test/ash-quoting/bkslash_case1.tests new file mode 100755 index 000000000..d0c359927 --- /dev/null +++ b/shell/ash_test/ash-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:$? |