about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-06-17 17:13:59 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-06-17 17:13:59 +0000
commit0d22935756f0fe14e63ae9d1d1273d086abe86ef (patch)
treef421647af5266938051359c88180565449a6100a
parentaf1339bacfe3a03c57bad2975c1b297b9ee67cd3 (diff)
downloadzsh-0d22935756f0fe14e63ae9d1d1273d086abe86ef.tar.gz
zsh-0d22935756f0fe14e63ae9d1d1273d086abe86ef.tar.xz
zsh-0d22935756f0fe14e63ae9d1d1273d086abe86ef.zip
Add a test for cascaded case statement.
-rw-r--r--ChangeLog2
-rw-r--r--Test/01grammar.ztst16
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ff1c9435b..eb4cb87c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
 	* 11956: Src/loop.c: Fix off-by-one error in wordcode pc executing
 	case statement fall-through.
 
+	* unposted: Test/01grammar.ztst: Add a test for 11956.
+
 2000-06-16  Clint Adams  <schizo@debian.org>
 
 	* 11951: Completion/Debian/_dpkg: replaced _arguments -A
diff --git a/Test/01grammar.ztst b/Test/01grammar.ztst
index 0ef1a1756..b8a8cd268 100644
--- a/Test/01grammar.ztst
+++ b/Test/01grammar.ztst
@@ -184,6 +184,22 @@
 0:`case' loop, new syntax
 >2
 
+  word=Hilary
+  case $word in
+    (Michaelmas) print 0
+                ;;
+    (Hilary) print 1
+            ;&
+    (Trinity) print 2
+             ;&
+    (*) print 3
+       ;;
+  esac
+0:`case' loop, new syntax, cascaded
+>1
+>2
+>3
+
 ## This doesn't work, because zsh tries to read from the terminal
 ## even in a non-interactive shell.  The manual implies it always reads
 ## from stdin, even in an interactive shell.