diff options
Diffstat (limited to 'build2/test/script/runner.cxx')
-rw-r--r-- | build2/test/script/runner.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/build2/test/script/runner.cxx b/build2/test/script/runner.cxx index 995da4f..f065389 100644 --- a/build2/test/script/runner.cxx +++ b/build2/test/script/runner.cxx @@ -64,7 +64,11 @@ namespace build2 { ofdstream os (orp); sp.cleanups.emplace_back (orp); - os << rd.value; + + os << (rd.type == redirect_type::here_string + ? rd.str + : rd.doc.doc); + os.close (); } catch (const io_error& e) @@ -298,11 +302,12 @@ namespace build2 so.close (); se.close (); - if (c.in.type == redirect_type::here_string || - c.in.type == redirect_type::here_document) + const redirect& r (c.in); + if (r.type == redirect_type::here_string || + r.type == redirect_type::here_document) { ofdstream os (pr.out_fd); - os << c.in.value; + os << (r.type == redirect_type::here_string ? r.str : r.doc.doc); os.close (); } |