aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-06 19:21:19 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:31:42 +0200
commit8c0b503ea67abe6fe9483b85d4a1d7f379ee8a1d (patch)
treee2436c40fa1f90062909b3cdf78c8b9b76f99917 /libbuild2/test
parent02d902cb8e5e69b123fcdf170e5eeb9ca5605304 (diff)
Fix unregistered .regex file cleanup error in testscript
Diffstat (limited to 'libbuild2/test')
-rw-r--r--libbuild2/test/script/runner.cxx6
1 files changed, 5 insertions, 1 deletions
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).
//