From 1869eeb393e2499e9949cc3458cdd74685342540 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 13 Dec 2012 10:36:59 +0000 Subject: 30876: fix obscure failures to propagate non-zero status from optimised simple commands within lists --- Test/C03traps.ztst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Test/C03traps.ztst') diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index 321f5e956..757f75ca4 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -388,6 +388,17 @@ >} >No, really exited + (set -e + printf "a\nb\n" | while read line + do + [[ $line = a* ]] || continue + ((ctr++)) + [[ $line = foo ]] + done + echo "ctr = $ctr" + ) +1:ERREXIT in loop with simple commands + %clean rm -f TRAPEXIT -- cgit 1.4.1