From 8c0b503ea67abe6fe9483b85d4a1d7f379ee8a1d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 6 May 2020 19:21:19 +0300 Subject: Fix unregistered .regex file cleanup error in testscript --- libbuild2/test/script/runner.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx index 3d03bd8..b40dea8 100644 --- a/libbuild2/test/script/runner.cxx +++ b/libbuild2/test/script/runner.cxx @@ -663,7 +663,9 @@ namespace build2 // Output doesn't match the regex. We save the regex to file for // troubleshooting regardless of whether we print the diagnostics or - // not. + // not. We, however, register it for cleanup in the later case (the + // expression may still succeed, we can be evaluating the if + // condition, etc). // path rp (save_regex ()); @@ -680,6 +682,8 @@ namespace build2 // print_file (d, op, ll); } + else + sp.clean_special (rp); // Fall through (to return false). // -- cgit v1.1