summaryrefslogtreecommitdiff
path: root/trip.rc
diff options
context:
space:
mode:
authorDrazen Borkovic <borkovic@users.noreply.github.com>2017-05-11 19:49:52 -0700
committerToby Goodwin <toby@paccrat.org>2017-05-25 22:23:17 +0100
commit03bfa8b5f639928fa3f003182a51ee263a8dcc91 (patch)
tree43c675ce7d3d11f7c14b27738d2882fd3e828166 /trip.rc
parent819db03616d13e2b3da646140d74a4879d46f8c8 (diff)
Fix: "rc -e" exits if condition in while statement returns false the second time
Diffstat (limited to 'trip.rc')
-rw-r--r--trip.rc6
1 files changed, 6 insertions, 0 deletions
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'
+}
+###############################################################