Make the expect tests run again

These were inadvertently disabled by a bug which was introduced in
cd7e8f4103 . Fix the bug so the tests run
again.

They don't all pass yet; they regressed during the period they were
disabled.
This commit is contained in:
ridiculousfish 2019-05-24 16:09:10 -07:00
parent fae15535db
commit a379e9ffeb

View file

@ -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;
}
}