From d822a0ae2c9fe312ad7a31e829ce2951be6a3ea0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Jun 2021 16:08:42 +0200 Subject: Fix cxx pattern rule test --- tests/recipe/cxx/testscript | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/recipe') 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 ()); + + 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 ()); - text << pattern->rule_name << ": " << mr.str (1); + text << pattern->rule_name << ": " << mr; return target_state::changed; } }} -- cgit v1.1