diffutils/tests/binary
Jim Meyering c88c3b6b2a build: update to latest gnulib and adapt
* tests/binary: Reverse arguments to compare to avoid failure of
new syntax-check rule.
* configure.ac: Use -Wno-format-nonliteral.
Mark functions as pure of const, per recommendations enabled by
new gcc -W options.  Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* lib/cmpbuf.h (buffer_lcm, block_compare):
Apply pure and/or const attributes.
* src/cmp.c (block_compare): Likewise.
* src/context.c (find_hunk): Likewise.
* src/diff.h (lines_differ): Likewise.
* src/diff3.c (skipwhite): Likewise.
* src/dir.c (dir_loop): Likewise.
* src/util.c (find_change, find_reverse_change): Likewise.
(translate_line_number): Likewise.
2011-12-14 15:07:57 +01:00

18 lines
359 B
Bash
Executable File

#!/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 2, stdout as above, and no stderr.
test $? = 2 || fail=1
compare out-exp out || fail=1
compare /dev/null err || fail=1
Exit $fail