aboutsummaryrefslogtreecommitdiff
path: root/tests/process/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/process/driver.cxx')
-rw-r--r--tests/process/driver.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx
index b154bce..4694d5b 100644
--- a/tests/process/driver.cxx
+++ b/tests/process/driver.cxx
@@ -94,9 +94,7 @@ exec (const path& p,
cwd, args.data (), pr, bin_mode (move (pr3.out_fd)).get (), -2);
ifdstream is (bin_mode (move (pr3.in_ofd)));
-
- o = vector<char> (
- (istreambuf_iterator<char> (is)), istreambuf_iterator<char> ());
+ o = is.read_binary ();
r = pr2.wait () && r;
r = pr3.wait () && r;
@@ -104,9 +102,7 @@ exec (const path& p,
else
{
ifdstream is (bin_mode (move (pr.in_ofd)));
-
- o = vector<char> (
- (istreambuf_iterator<char> (is)), istreambuf_iterator<char> ());
+ o = is.read_binary ();
}
if (err)
@@ -125,9 +121,7 @@ exec (const path& p,
if (err && !out)
{
ifdstream is (bin_mode (move (pr.in_efd)));
-
- vector<char> e
- ((istreambuf_iterator<char> (is)), istreambuf_iterator<char> ());
+ vector<char> e (is.read_binary ());
r = in == e && r;
}