diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-20 14:36:03 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-28 12:25:29 +0200 |
commit | 58f0086b70f2f409b9f88de1611efcf18756f9e5 (patch) | |
tree | 80ac7bb98d0047b5e28f7c5b30953b3e2a333085 /libraries/base | |
parent | bafd615e40c2a11af1390e736f6122033eecc4c6 (diff) | |
download | haskell-58f0086b70f2f409b9f88de1611efcf18756f9e5.tar.gz |
Testsuite: open/close stdin/stdout/stderr explicitly
This allows run_command's to contain `|`, and `no_stdin` isn't necessary
anymore.
Unfortunately it doesn't fix T7037 on Windows which I had hoped it would
(testsuite driver tries to read a file that it just created itself, but
the OS says it doesn't exist).
The only drawback of this commit is that the command that the testsuite
prints to the terminal (for debugging purposes) doesn't mention the
files that stdout and stderr are redirected to anymore. This is probably
ok.
Update submodule unix.
Differential Revision: https://phabricator.haskell.org/D1234
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/tests/IO/all.T | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T index 295553fa9a..56bb44df49 100644 --- a/libraries/base/tests/IO/all.T +++ b/libraries/base/tests/IO/all.T @@ -41,9 +41,8 @@ test('hReady001', normal, compile_and_run, ['-cpp']) # data to read. It relies on piping input from 'sleep 1', which doesn't # work for the 'ghci' way because in that case we already pipe input from # a script, so hence omit_ways(['ghci']) -test('hReady002', [ no_stdin, cmd_prefix('sleep 1 |'), - omit_ways(['ghci']) ], - compile_and_run, ['']) +test('hReady002', [cmd_prefix('sleep 1 |'), omit_ways(['ghci'])], + compile_and_run, ['']) test('hSeek001', normal, compile_and_run, ['']) test('hSeek002', normal, compile_and_run, ['-cpp']) @@ -61,7 +60,7 @@ test('hSetBuffering004', set_stdin('hSetBuffering004.hs'), compile_and_run, [''] test('ioeGetErrorString001', normal, compile_and_run, ['-cpp']) test('ioeGetFileName001', normal, compile_and_run, ['-cpp']) test('ioeGetHandle001', normal, compile_and_run, ['-cpp']) -test('isEOF001', normal, compile_and_run, ['']) +test('isEOF001', extra_run_opts('</dev/null'), compile_and_run, ['']) test('misc001', [extra_run_opts('misc001.hs misc001.out'), |