about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-09-17 10:42:17 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-09-17 10:42:17 +0000
commit41b50445eab2eb71c4446f85e368a273b52c39a3 (patch)
treec36d8bf5da8c8c3727fc411c11e9aae66790d846 /Test
parent49bfbc12483602937380658d67acd6c009d39159 (diff)
downloadzsh-41b50445eab2eb71c4446f85e368a273b52c39a3.tar.gz
zsh-41b50445eab2eb71c4446f85e368a273b52c39a3.tar.xz
zsh-41b50445eab2eb71c4446f85e368a273b52c39a3.zip
17673: Fix bug with &&s and ||s in complex constructs
Diffstat (limited to 'Test')
-rw-r--r--Test/A01grammar.ztst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index c55ca4a83..026539307 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -319,3 +319,21 @@
   done < /dev/null | { read name; print done }
 0:Bug regression: `while' loop with redirection and pipeline
 >done
+
+# This used to be buggy and print X at the end of each iteration.
+  for f in 1 2 3 4; do
+    print $f || break
+  done && print X
+0:Handling of ||'s and &&'s with a for loop in between
+>1
+>2
+>3
+>4
+>X
+
+# Same bug for &&, used to print `no' at the end of each iteration
+  for f in 1 2 3 4; do
+    false && print strange
+  done || print no
+0:Handling of &&'s and ||'s with a for loop in between
+>no