about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-03-23 18:59:10 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-03-23 18:59:10 +0000
commitfd305eb30a08a9ec6d130a4adf9a2a4582c77c73 (patch)
treeaf869ff815d1fabdd0f634031fae8f75db1a94e8
parentcb2de78cca4ee82af612fde80ae67470a8a5b1c0 (diff)
downloadzsh-fd305eb30a08a9ec6d130a4adf9a2a4582c77c73.tar.gz
zsh-fd305eb30a08a9ec6d130a4adf9a2a4582c77c73.tar.xz
zsh-fd305eb30a08a9ec6d130a4adf9a2a4582c77c73.zip
Clean up grammar tests.
-rw-r--r--ChangeLog5
-rw-r--r--Test/01grammar.ztst56
2 files changed, 35 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 3fd0c5d1d..73e9bf411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-23  Bart Schaefer  <schaefer@zsh.org>
+
+	* 13736: Test/01grammar.ztst: Enable more tests as they seem to
+	work now; add regression test for the fix from 13706.
+
 2001-03-23  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 13733: Completion/Builtins/_pids: don't auto-start menu
diff --git a/Test/01grammar.ztst b/Test/01grammar.ztst
index b8a8cd268..b45b6d7ab 100644
--- a/Test/01grammar.ztst
+++ b/Test/01grammar.ztst
@@ -41,9 +41,7 @@
 0:Basic subshell list with error
 >false
 
-# Can someone convince me the following is really supposed to fail
-# without the semicolon present?
-  { cd /NonExistentDirectory >&/dev/null; } || print false
+  { cd /NonExistentDirectory >&/dev/null } || print false
 0:Basic current shell list with error
 >false
 
@@ -235,17 +233,13 @@
 # Tests for `Alternate Forms For Complex Commands'
 #
 
-## I simply can't get these to work.
-## I suspect that the lists which are allowed here are only syntactically
-## special tests.
-#  if true; { print true-1; } elif true; { print true-2; } else { false; }
-#  if false; { print true-1; } elif true; { print true-2; } else { false; }
-#  if false; { print true-1; } elif false; { print true-2; } else { false; }
-#0:Alternate `if' with braces
-## Are all those semicolons necessary?  If not, what are the rules?
-#>true-1
-#>true-2
-#>false
+  if (true) { print true-1 } elif (true) { print true-2 } else { print false }
+  if (false) { print true-1 } elif (true) { print true-2 } else { print false }
+  if (false) { print true-1 } elif (false) { print true-2 } else { print false }
+0:Alternate `if' with braces
+>true-1
+>true-2
+>false
 
   if true; print true
 0:Short form of `if'
@@ -295,15 +289,25 @@
 >Hip hip hooray
 >Hip hip hooray
 
-## Why doesn't this one work here?  It works from the command line
-## or with zsh -fc.
-#  case bravo {
-#    (alpha) print schmalpha
-#	    ;;
-#    (bravo) print schmavo
-#	    ;;
-#    (charlie) print schmarlie
-#	    ;;
-#  }
-#0:`case' with braces
-#>schmavo
+# Why doesn't this one work here?  It works from the command line
+# or with zsh -fc.
+  case bravo {
+    (alpha) print schmalpha
+	    ;;
+    (bravo) print schmavo
+	    ;;
+    (charlie) print schmarlie
+	    ;;
+  }
+0:`case' with braces
+>schmavo
+
+  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
+  while (( name < 4375 )); do
+    print -n $name
+    (( name++ ))
+  done < /dev/null | { read name; print done }
+0:Bug regression: `while' loop with redirection and pipeline
+>done