aboutsummaryrefslogtreecommitdiff
path: root/tests/fdstream/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-30 19:05:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-31 00:51:43 +0300
commitc7ec29b2d6a66700933ede6ae2371e1d54744d67 (patch)
tree119ff80f333892422e99cd352c99702f0ae7eb7c /tests/fdstream/driver.cxx
parent95ff8f359cfc2189bd4d7e02e15373027d2bda32 (diff)
Add ifdstream::read_text() and ifdstream::read_binary()
Diffstat (limited to 'tests/fdstream/driver.cxx')
-rw-r--r--tests/fdstream/driver.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/fdstream/driver.cxx b/tests/fdstream/driver.cxx
index c8748b1..41a39b0 100644
--- a/tests/fdstream/driver.cxx
+++ b/tests/fdstream/driver.cxx
@@ -37,8 +37,7 @@ static const string text3 ("ABCDEF\r\nXYZ");
static string
from_stream (ifdstream& is)
{
- string s;
- getline (is, s, '\0');
+ string s (is.read_text ());
is.close (); // Not to miss failed close of the underlying file descriptor.
return s;
}