aboutsummaryrefslogtreecommitdiff
path: root/tests/recipe
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-06-09 16:08:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-06-09 16:08:42 +0200
commitd822a0ae2c9fe312ad7a31e829ce2951be6a3ea0 (patch)
treede570a7e216ff768f87bdf8dea2111ab5b2a6eed /tests/recipe
parentf8e6ed173b9b77ec7ac1b0d39ae83f29fb9468a9 (diff)
Fix cxx pattern rule test
Diffstat (limited to 'tests/recipe')
-rw-r--r--tests/recipe/cxx/testscript13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/recipe/cxx/testscript b/tests/recipe/cxx/testscript
index 9a87c24..c94148e 100644
--- a/tests/recipe/cxx/testscript
+++ b/tests/recipe/cxx/testscript
@@ -180,19 +180,20 @@ if (!$static && $test.target == $build.host)
--
recipe
- apply (action, target&) const override
+ apply (action, target& t) const override
{
- return [this] (action a, const target& t)
+ const auto& mrs (t.data<regex_match_results> ());
+
+ return [this, mr = mrs.str (1)] (action a, const target& t)
{
- return perform_update (a, t);
+ return perform_update (a, t, mr);
};
}
target_state
- perform_update (action, const target& t) const
+ perform_update (action, const target&, const string& mr) const
{
- const auto& mr (t.data<regex_match_results> ());
- text << pattern->rule_name << ": " << mr.str (1);
+ text << pattern->rule_name << ": " << mr;
return target_state::changed;
}
}}