aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-10-24 21:43:23 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:35 +0200
commit56ce654f7e4608599369b303ed39eaddb0f77eee (patch)
tree85deb385c4353c198d6f2147348c0edbacdac0b7 /tests/test/script/runner/driver.cxx
parent79a83d6dd0f312a5e390f5627f68cc96c4427d33 (diff)
Fix printing no-newline here-doc and here-str
Diffstat (limited to 'tests/test/script/runner/driver.cxx')
-rw-r--r--tests/test/script/runner/driver.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test/script/runner/driver.cxx b/tests/test/script/runner/driver.cxx
index 940a68c..9eb36a0 100644
--- a/tests/test/script/runner/driver.cxx
+++ b/tests/test/script/runner/driver.cxx
@@ -6,6 +6,7 @@
#include <string>
#include <cassert>
#include <ostream> // endl, *bit
+#include <istream> // istream::traits_type::eof()
#include <iostream>
#include <exception>
@@ -50,7 +51,7 @@ main (int argc, char* argv[])
if (ifd == 0)
cin.ignore (numeric_limits<streamsize>::max ());
- else
+ else if (cin.peek () != istream::traits_type::eof ())
(ifd == 1 ? cout : cerr) << cin.rdbuf ();
}
else if (o == "-o")