diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:33:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:33:23 +0000 |
commit | 1d5cace9db9aef76f26b2d7ba54bbb76443b00b2 (patch) | |
tree | 314a15dd1aa103da13bdc83ba1d2105a290bc5ba /tests/case1.sub | |
parent | Initial commit. (diff) | |
download | bash-upstream/5.0.tar.xz bash-upstream/5.0.zip |
Adding upstream version 5.0.upstream/5.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 |