summaryrefslogtreecommitdiff
path: root/tests/binary
Commit message (Collapse)AuthorAgeFilesLines
* tests: use "returns_" rather than explicit comparison with "$?"Jim Meyering2016-11-081-3/+1
| | | | | | | | | | | | | | * tests/colors: Use "returns_ 1" rather than testing $? = 1 * tests/basic: Likewise. * tests/binary: Likewise. * tests/filename-quoting: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/ignore-matching-lines: Likewise. * tests/label-vs-func: Likewise. * tests/new-file: Likewise. * tests/no-dereference: Likewise. * tests/no-newline-at-eof: Likewise. * tests/stdin: Likewise.
* diff: exit with status 1, not 2, when binary files differPaul Eggert2014-01-311-2/+2
| | | | | | | | | Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16608>. * NEWS: * doc/diffutils.texi (Binary, Invoking diff): Document this. * src/analyze.c (briefly_report): Return void, not int. All uses changed. Do not futz with exit status. Simplify. * tests/binary: Adjust to match new behavior.
* build: update to latest gnulib and adaptJim Meyering2011-12-141-1/+1
| | | | | | | | | | | | | | | | | * 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.
* tests: use "compare exp out", not "compare out exp"Jim Meyering2011-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Likewise, when an empty file is expected, use "compare /dev/null out", not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 Run these commands: git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,' But manually convert this one: -compare out exp-$(echo $opt|tr ' ' _) +compare exp-$(echo $opt|tr ' ' _) out and avoid an inappropriate change to cfg.mk.
* tests: make test runner a script, not a shell functionStefano Lattarini2011-10-111-0/+0
| | | | | | | | | | | | | | | | | | | | | | | All the test scripts in the diffutils testsuite are shell scripts, so the current definition of TESTS_ENVIRONMENT, which adaptively run tests using either perl or the shell depending on their kind, is an overkill. Moreover, this change is required in order for the testsuite to continue to work with the new testsuite harness that is planned to be introduced in Automake 1.12 (which, as of the writing date, is still under development and in late alpha state). See also related discussion on bug-coreutils: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887> * tests/Makefile.am (TESTS_ENVIRONMENT): Remove definition of the `shell_or_perl_' shell function, which is not required anymore. (LOG_COMPILER): New, define to `$(SHELL)'. * tests/binary: Make executable. * tests/colliding-file-names: Likewise. * tests/excess-slash: Likewise. * tests/no-newline-at-eof: Likewise.
* maint: adjust init.sh use to conformJim Meyering2010-09-041-2/+1
| | | | | | | | | | | | | * tests/help-version: Use one line: "${srcdir=.}/init.sh"; ... * tests/basic: Likewise. * tests/binary: Likewise. * tests/colliding-file-names: Likewise. * tests/excess-slash: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/help-version: Likewise. * tests/label-vs-func: Likewise. * tests/no-newline-at-eof: Likewise. * tests/stdin: Likewise.
* tests: use path_prepend_ consistently; remove unnecessary VERBOSE checkJim Meyering2010-04-071-2/+1
| | | | | | | | * tests/basic: Likewise. * tests/binary: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/label-vs-func: Likewise. * tests/stdin: Likewise.
* tests: test for the "Binary files A and B differ" diagnosticJim Meyering2010-02-231-0/+19
* tests/binary: New script. * tests/Makefile.am (TESTS): Add it.