diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-11-04 10:51:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-11-08 16:12:59 +0300 |
commit | 278140ebf2bc97eb72a1e8adb04a40a0a5807d8f (patch) | |
tree | bf6ea4e55c98b0543bb51c6eb46f48e29b58aecb /build2/test/script/script.cxx | |
parent | 6e1f59670b7aaabb27830a345aad9532af111016 (diff) |
Add mkdir and touch builtins
Diffstat (limited to 'build2/test/script/script.cxx')
-rw-r--r-- | build2/test/script/script.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/build2/test/script/script.cxx b/build2/test/script/script.cxx index cfc1d91..7d1d8cf 100644 --- a/build2/test/script/script.cxx +++ b/build2/test/script/script.cxx @@ -347,7 +347,16 @@ namespace build2 assert (!implicit || c.type == cleanup_type::always); - auto pr = [&c] (const cleanup& v) -> bool {return v.path == c.path;}; + const path& p (c.path); + if (!p.sub (root->wd_path)) + { + if (implicit) + return; + else + assert (false); // Error so should have been checked. + } + + auto pr = [&p] (const cleanup& v) -> bool {return v.path == p;}; auto i (find_if (cleanups.begin (), cleanups.end (), pr)); if (i == cleanups.end ()) |