29 Commits

Author SHA1 Message Date
Jim Meyering
e2ed9d279b build: update bootstrap and tests/init.sh from gnulib
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
2011-09-02 14:16:04 +02:00
Jim Meyering
c06794dacf tests: update init.sh from gnulib
* tests/init.sh: Update from gnulib.
2011-08-03 18:07:33 +02:00
Jim Meyering
4e0d3664c7 tests: avoid newer but less-portable tail option syntax
* tests/function-line-vs-leading-space: Use sed -n '3,$p' rather than
tail -n+3.  Older versions of tail do not accept that newer syntax.
Reported by Sudhakara Peram.
2011-01-24 16:34:32 +01:00
Jim Meyering
bf4003c13d tests: fix an erroneous test
On most systems, like-named files were compared, by luck.
However, on others, different-named files would be compared
since their names were being treated as equal -- but they had
different content, so the test would fail.
* tests/colliding-file-names: Use different sets of file names
in d1 and d2 so that they cannot accidentally match.
Put the same line in each test file.  This is required
when files named e.g., abc and ABC are compared.
This test was failing on a NixOS 86_64-darwin system.
2011-01-24 13:36:17 +01:00
Jim Meyering
13b0958f25 tests: fix typo that silently disabled all tests
* tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/
2011-01-24 12:13:16 +01:00
Jim Meyering
ce5367b6b3 maint: update copyright year ranges to include 2011
Run "make update-copyright", so "make syntax-check" works in 2011.
2011-01-03 22:13:35 +01:00
Jim Meyering
361b3b13da maint: adjust init.sh use to conform
* 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.
2010-09-04 09:15:32 +02:00
Jim Meyering
0d0c959471 build: update build/test tools from gnulib
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
2010-09-04 08:54:18 +02:00
Jim Meyering
53de393ca3 diff -r: avoid printing excess slashes in concatenated file names
* bootstrap.conf (gnulib_modules): Add filenamecat.
* src/diff.c: Include "filenamecat.h".
(compare_files): Use file_name_concat, rather than dir_file_pathname.
* src/util.c (dir_file_pathname): Remove now-unused function.
* src/diff.h: Remove its declaration.
* tests/excess-slash: New script to test for this.
* tests/Makefile.am (TESTS): Add it.
Forwarded by Santiago Vila from <bugs.debian.org/586301a>,
reported by Jari Aalto.
2010-08-14 17:15:57 -05:00
Paul Eggert
f2ad578b24 diff: avoid spurious diffs when two distinct dir entries compare equal
Problem reported by Christoph Anton Mitterer in:
http://lists.gnu.org/archive/html/bug-diffutils/2010-08/msg00000.html

* NEWS: Mention this bug fix.
* src/dir.c (compare_names_for_qsort): Fall back on file_name_cmp
if two distinct entries in the same directory compare equal.
(diff_dirs): Prefer a file_name_cmp match when available.
* tests/Makefile.am (TESTS): New test colliding-file-names.
* tests/colliding-file-names: New file.
2010-08-12 17:55:38 -07:00
Jim Meyering
5c63f4d416 build: update gnulib submodule to latest
* bootstrap: Also update from gnulib.
* tests/init.sh: Likewise
2010-04-30 18:56:15 +02:00
Jim Meyering
59669066e7 tests: use original no-newline-at-eof test, but with -U1, not -U2
* tests/no-newline-at-eof: Revert to the smaller test, but with
-U1 rather than -U2, since that actually triggers the bug.
2010-04-17 08:29:36 +02:00
Paul Eggert
4ba438168d Followon improvements for the fix for Debian bug 577832.
* 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.
2010-04-16 22:20:04 -07:00
Jim Meyering
6bb3d29008 tests: test for the no-newline-at-EOF bug
* tests/no-newline-at-eof: New file.
* tests/Makefile.am (TESTS): Add it.
2010-04-16 11:28:46 +02:00
Jim Meyering
648802169a tests: update init.sh from gnulib
* tests/init.sh: Update from gnulib.
2010-04-16 11:03:34 +02:00
Jim Meyering
fe2d46d4aa tests: pull latest help-version from gzip
* tests/help-version: Update from gzip.
* Makefile.am (TESTS_ENVIRONMENT): Export VERSION,
as required for this new help-version script.
2010-04-07 11:01:31 +02:00
Jim Meyering
55cf264a2b tests: use path_prepend_ consistently; remove unnecessary VERBOSE check
* tests/basic: Likewise.
* tests/binary: Likewise.
* tests/function-line-vs-leading-space: Likewise.
* tests/label-vs-func: Likewise.
* tests/stdin: Likewise.
2010-04-07 11:01:31 +02:00
Jim Meyering
adc5cf557b tests: get latest init.sh from gnulib
* tests/init.sh: Update from gnulib.
2010-04-05 22:19:57 +02:00
Jim Meyering
f21d1195ae tests: exercise new behavior of -F RE
* tests/function-line-vs-leading-space: New file.
* tests/Makefile.am (TESTS): Add it.
2010-03-18 18:05:10 +01:00
Jim Meyering
1afa803849 tests: test for the "Binary files A and B differ" diagnostic
* tests/binary: New script.
* tests/Makefile.am (TESTS): Add it.
2010-02-23 10:29:02 +01:00
Jim Meyering
b22f6671d7 tests: honor VERBOSE
* tests/basic: Enable "set -x" if $VERBOSE.
* tests/help-version: Likewise.
* tests/label-vs-func: Likewise.
* tests/stdin: Likewise.
2010-02-10 08:55:59 +01:00
Jim Meyering
07e844a96d tests: ensure that an argument of "-" is treated as standard input
* tests/stdin: New test.
* tests/Makefile.am (TESTS): Add it.
2010-01-13 13:54:55 +01:00
Jim Meyering
4e1233f063 tests: add a test of basic functionality
* tests/basic: Start adding tests.
* tests/Makefile.am (TESTS): Add it.
2010-01-09 11:07:25 +01:00
Jim Meyering
a6b73e6dd7 tests: prepend ../src, not "." to PATH
* tests/help-version: Correct PATH.
2010-01-03 18:40:33 +01:00
Jim Meyering
6a44886e24 maint: update all FSF copyright year lists to include 2010
Use this command:
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
2010-01-01 16:18:27 +01:00
Jim Meyering
9fe26edf84 tests: exercise diff -p's function-name matching
* tests/label-vs-func: New file.
* tests/Makefile.am (TESTS): Add label-vs-func.
Reported by Simon Arlott <simon@fire.lp0.eu>
http://article.gmane.org/gmane.linux.kernel.janitors/14260
2009-12-31 17:30:50 +01:00
Jim Meyering
e0fc06c5ce tests: use gnulib's init.sh
* tests/Makefile.am (EXTRA_DIST): Add init.sh.
Remove test-lib.sh.
* tests/init.sh: New file.
* tests/test-lib.sh: Remove file.
* tests/help-version: Use init.sh, not test-lib.sh.
2009-12-31 17:29:55 +01:00
Eric Blake
e5b1ef85fb build: fix test run on cygwin
This, plus a gnulib update for xalloc-die-tests, are necessary
for make check to pass on cygwin.

* tests/Makefile.am (built_programs): Ignore $(EXEEXT).
* src/Makefile.am (paths.h): Add missing dependency.
2009-11-20 14:53:32 -07:00
Jim Meyering
e454c1471a tests: add the first script; hook up gnulib-tests
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile and
gnulib-tests/Makefile.
* tests/help-version: New file, from coreutils.
* tests/test-lib.sh: Likewise.
* tests/Makefile.am: New file, from gzip.
* Makefile.am (SUBDIRS): Add tests and gnulib-tests.
* tests/t-local.sh: New, empty(for now) file.
2009-11-14 11:16:20 +01:00