From 03bfa8b5f639928fa3f003182a51ee263a8dcc91 Mon Sep 17 00:00:00 2001 From: Drazen Borkovic Date: Thu, 11 May 2017 19:49:52 -0700 Subject: Fix: "rc -e" exits if condition in while statement returns false the second time --- trip.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'trip.rc') diff --git a/trip.rc b/trip.rc index 5ffba5c..fb61afb 100644 --- a/trip.rc +++ b/trip.rc @@ -603,3 +603,9 @@ submatch 'echo foo = bar' 'foo = bar' 'unquoted equals 2' submatch 'echo foo=bar' 'foo=bar' 'unquoted equals 2' submatch 'echo foo=' 'foo=' 'unquoted equals 3' submatch 'echo =bar; whatis -v echo' 'echo=bar' 'unquoted equals 4' +############################################################### +X=`{ $rc -ec 'b=true; while($b){b=false}; echo YYY' } +if (! ~ $X YYY) { + fail '"rc -e" exits when condition in the while statement fails in the second iteration' +} +############################################################### -- cgit v1.2.3