diff options
Diffstat (limited to 'tests/case1.sub')
-rw-r--r-- | tests/case1.sub | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/case1.sub b/tests/case1.sub new file mode 100644 index 0000000..7db09ab --- /dev/null +++ b/tests/case1.sub @@ -0,0 +1,64 @@ +x='\x' + +case x in +\x) echo ok 1;; +*) echo bad 1;; +esac + +case x in +$x) echo ok 2;; +*) echo bad 2;; +esac + +case $x in +\x) echo bad 3;; +\\x) echo ok 3 ;; +*) echo bad 3.1 ;; +esac + +case $x in +\\$x) echo ok 4 ;; +x) echo bad 4;; +$x) echo bad 4.1 ;; +*) echo bad 4.2;; +esac + +case x in +\\x) echo bad 5;; +\x) echo ok 5;; +*) echo bad 5.1;; +esac + +case x in +\\x) echo bad 6;; +x) echo ok 6;; +*) echo bad 6.1;; +esac + +case x in +$x) echo ok 7 ;; +\\$x) echo bad 7 ;; +*) echo bad 7.1 ;; +esac + +case x in +\x) echo ok 8 ;; +\\x) echo bad 8 ;; +*) echo bad 8.1 ;; +esac + +case \x in +\x) echo ok 9 ;; +\\x) echo bad 9 ;; +*) echo bad 9.1 ;; +esac + +case $x in +$x) echo oops 1 ;; +*) echo mysterious 1 ;; +esac + +case \x in +\x) echo mysterious 2 ;; +*) echo oops 2 ;; +esac |