From c7ec29b2d6a66700933ede6ae2371e1d54744d67 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 30 May 2017 19:05:43 +0300 Subject: Add ifdstream::read_text() and ifdstream::read_binary() --- tests/process/driver.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'tests/process') 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 ( - (istreambuf_iterator (is)), istreambuf_iterator ()); + 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 ( - (istreambuf_iterator (is)), istreambuf_iterator ()); + 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 e - ((istreambuf_iterator (is)), istreambuf_iterator ()); + vector e (is.read_binary ()); r = in == e && r; } -- cgit v1.1