summaryrefslogtreecommitdiff
path: root/tests/no-newline-at-eof
Commit message (Collapse)AuthorAgeFilesLines
* tests: use "returns_" rather than explicit comparison with "$?"Jim Meyering2016-11-081-6/+3
| | | | | | | | | | | | | | * 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: fix bug with diff -B and incomplete linesPaul Eggert2014-09-031-0/+6
| | | | | | | | Reported by Navin Kabra via Eric Blake in: http://bugs.gnu.org/18402 * src/util.c (analyze_hunk): Don't mishandle incomplete lines at end of file. * tests/no-newline-at-eof: Test for the bug.
* tests: use "compare exp out", not "compare out exp"Jim Meyering2011-11-291-4/+4
| | | | | | | | | | | | | | | | | | | | | 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 original no-newline-at-eof test, but with -U1, not -U2Jim Meyering2010-04-171-12/+8
| | | | | * tests/no-newline-at-eof: Revert to the smaller test, but with -U1 rather than -U2, since that actually triggers the bug.
* Followon improvements for the fix for Debian bug 577832.Paul Eggert2010-04-161-7/+11
| | | | | | | * src/io.c (find_and_hash_each_line): Omit the inserted newline in a simpler way. * tests/no-newline-at-eof: Fix the test case so that it rejects the old, buggy behavior.
* tests: test for the no-newline-at-EOF bugJim Meyering2010-04-161-0/+54
* tests/no-newline-at-eof: New file. * tests/Makefile.am (TESTS): Add it.