From a3ec215973c3653ebdeb81dcdd1274519c376a3d Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 21 Aug 2016 05:23:24 +0000 Subject: diffutils-3.5 --- tests/binary | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tests/binary (limited to 'tests/binary') diff --git a/tests/binary b/tests/binary new file mode 100755 index 0000000..0110f6e --- /dev/null +++ b/tests/binary @@ -0,0 +1,17 @@ +#!/bin/sh +# small examples + +. "${srcdir=.}/init.sh"; path_prepend_ ../src + +printf 'Binary files - and /dev/null differ\n' > out-exp || fail_ setup + +fail=0 + +printf '\0'|diff - /dev/null > out 2> err + +# diff must exit with status 1, stdout as above, and no stderr. +test $? = 1 || fail=1 +compare out-exp out || fail=1 +compare /dev/null err || fail=1 + +Exit $fail -- cgit v1.2.1