summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2017-05-09 11:55:46 -0700
committerJim Meyering <meyering@fb.com>2017-05-09 11:55:46 -0700
commit20b31314c3d72af7159cc6ba3cdb9b1288263858 (patch)
treec837973619db4b624a5f3350351d49ef27de3983
parentc881afb9b82a4943b47880d2e607825ceff286be (diff)
downloaddiffutils-20b31314c3d72af7159cc6ba3cdb9b1288263858.tar.gz
tests: new-file: closed-stdin: also ensure stdout was empty
* tests/new-file: Also require that "out" be empty.
-rwxr-xr-xtests/new-file3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/new-file b/tests/new-file
index ab99708..4400051 100755
--- a/tests/new-file
+++ b/tests/new-file
@@ -28,7 +28,10 @@ echo '1d0
returns_ 1 diff -N a - <&- > out || fail=1
compare exp out || fail=1
+# With closed standard input, require an exit status of 2
+# and empty stdout.
returns_ 2 diff --unidirectional-new-file a - <&- > out || fail=1
+compare /dev/null out || fail=1
returns_ 1 diff -N - b < a > out || fail=1
compare exp out || fail=1