From a379e9ffebaec9f4902eccdfc24dc418d1548f6f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 24 May 2019 16:09:10 -0700 Subject: [PATCH] Make the expect tests run again These were inadvertently disabled by a bug which was introduced in cd7e8f41033ea76c68b7f03cad466fd04ca9a03e . Fix the bug so the tests run again. They don't all pass yet; they regressed during the period they were disabled. --- src/parse_execution.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index 2ca3cb585..235235dfb 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -593,10 +593,12 @@ parse_execution_result_t parse_execution_context_t::run_while_statement( if (cancel_reason == execution_cancellation_loop_control) { // Handle break or continue. - if (ld.loop_status == loop_status_t::continues) { - continue; - } else if (ld.loop_status == loop_status_t::breaks) { + bool do_break = (ld.loop_status == loop_status_t::breaks); + ld.loop_status = loop_status_t::normals; + if (do_break) { break; + } else { + continue; } }