about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-11 21:51:20 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-11 21:51:20 +0000
commit66ae2822dd269332a06641d8fc0da0c0e60734eb (patch)
treedb8451cd0044899ae62b5cc63e44503e744cb66a /Test
parent469921ba16eae89eb7ecfb1ea8fcdd34c1b0a642 (diff)
downloadzsh-66ae2822dd269332a06641d8fc0da0c0e60734eb.tar.gz
zsh-66ae2822dd269332a06641d8fc0da0c0e60734eb.tar.xz
zsh-66ae2822dd269332a06641d8fc0da0c0e60734eb.zip
Merge of 23115: add ";|" at end of case statement to cause testing of later patterns.
Diffstat (limited to 'Test')
-rw-r--r--Test/A01grammar.ztst23
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index 093ef5635..42ff8d405 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -413,6 +413,29 @@
 0:`case' with braces
 >schmavo
 
+  for word in artichoke bladderwort chrysanthemum Zanzibar
+  case $word in
+    (*der*) print $word contains the forbidden incantation der
+         ;;
+    (a*) print $word begins with a
+         ;&
+    ([[:upper:]]*) print $word either begins with a or an upper case letter
+         ;|
+    ([[:lower:]]*) print $word begins with a lower case letter
+         ;|
+    (*e*) print $word contains an e
+         ;;
+  esac
+0:`case' with mixed ;& and ;|
+>artichoke begins with a
+>artichoke either begins with a or an upper case letter
+>artichoke begins with a lower case letter
+>artichoke contains an e
+>bladderwort contains the forbidden incantation der
+>chrysanthemum begins with a lower case letter
+>chrysanthemum contains an e
+>Zanzibar either begins with a or an upper case letter
+
   print 'This test hangs the shell when it fails...' >&8
   name=0
 # The number 4375 here is chosen to produce more than 16384 bytes of output