aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/driver.cxx
diff options
context:
space:
mode:
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")