From 2421fe859969171914aac4e9280b96db1b173763 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 17 Sep 2002 10:46:30 +0000 Subject: 17673: Fix bug with &&s and ||s in complex constructs --- Test/A01grammar.ztst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Test') diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 8b6b403fb..7a1e39934 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 -- cgit 1.4.1