27 Commits

Author SHA1 Message Date
Paul Eggert
95e0092f97 maint: make update-copyright 2025-01-05 13:33:00 -08:00
Andreas Gruenbacher
910fecf695 Add missing feature tests to the test suite
Check for chmod, hardlink, symlink, and special character support to
prevent test suite failures in feature constrained environments.

Thanks to Bruno Haible and Nelson H. F. Beebe for their testing and
analysis.

* tests/test-lib.sh: Add new feature tests.
* tests/hardlinks: Split this hardlinks related test off from
tests/remember-backup-files.
* tests/Makefile.am (TESTS): Add new hardlinks test here.
* tests/file-create-modes, tests/file-modes, tests/read-only-files,
tests/preserve-mode-and-timestamp, tests/no-mode-change-git-diff: These
tests require chmod support.
* tests/hardlinks, tests/unmodified-files: These tests require hardlink
support.
* tests/symlinks: This test requires symlink support.
* tests/quoted-filenames: This test requires special character support
in filenames.
2024-11-11 22:21:27 +01:00
Andreas Gruenbacher
ee3cc4016d Revert "Remove obsolete require_gnu_diff function"
Oops, function require_gnu_diff is still needed in two places.

This reverts commit 8cae4fc2213649e36e8f9a4cf21c28a82de3705c.
2024-09-18 14:51:33 +02:00
Andreas Gruenbacher
8cae4fc221 Remove obsolete require_gnu_diff function
* tests/test-lib.sh (require_gnu_diff): Remove.
2024-09-18 14:42:49 +02:00
Paul Eggert
d18c05d5bd Update copyright notices
Switch to single intervals for FSF notices,
and consistently put them first.
Update copyright notices for 2024.
* cfg.mk (update-copyright-env): Use UPDATE_COPYRIGHT_FORCE=1,
UPDATE_COPYRIGHT_USE_INTERVALS=2.
* patch.man: Always use \(co, so that update-copyright
updates these dates.
* src/version.c: Correct Larry Wall copyright years.
2024-08-28 23:13:44 -07:00
Kerin Millar
7623b2dc0d Fix test for presence of BASH_LINENO[0]
eval is not some sort of magical sandbox for executing code that might cause
the shell's parser to take exception. Render the test resilient by carrying
it out within a subshell. While at it, position the redirection so that
STDERR is, in fact, muted.

Signed-off-by: Kerin Millar <kfm@plushkava.net>
Reported-by: Paolo Pedroni <paolo.pedroni@iol.it>
Closes: https://bugs.gentoo.org/738810
2021-01-08 10:15:31 +01:00
Andreas Gruenbacher
f6bc5b14bd Test suite compatibility fixes
* tests/crlf-handling, tests/git-cleanup, tests/test-lib.sh: Use printf
instead of echo -e / echo -n for compatibility with systems that don't
support these echo options.
* tests/merge: Minor other cleanups.
2018-02-07 13:19:24 +01:00
Quentin Casasnovas
c80b1a06a9 test-lib.sh: factorize require_* functions
Since the code is identical when just checking if a utility is present on
the system or not, we can factorize it.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
2015-01-31 22:14:01 +01:00
Jim Meyering
2d38b11799 maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:26:02 +01:00
Jim Meyering
db2fb7cdba maint: update copyright date year ranges to include 2011
* bootstrap.conf (gnulib_modules): Add update-copyright.
Run "make update-copyright".
2011-03-27 09:16:46 +02:00
Jim Meyering
2876ed918f maint: avoid non-portable use of test -a
With these changes, "make sc_prohibit_test_minus_ao" almost passes.
Uses of "test -o" remain.
Note: unchecked uses of test -ot/-nt also remain.
* tests/empty-files: Use "test C1 && test C2", not "test C1 -a C2"
* tests/merge: Likewise.
* tests/symlinks: Likewise.
* tests/test-lib.sh: Likewise.
2011-03-26 14:20:28 +01:00
Jim Meyering
02e3376350 maint: allow the sc_prohibit_empty_lines_at_EOF test to pass
* tests/test-lib.sh: Remove empty line at end of file.
2011-03-26 14:20:28 +01:00
Andreas Gruenbacher
d94b00785d test suite: Ignore error messages during cleanup
* tests/test-lib.sh: Ignore error messages when cleaning up after a
test has finished.
2010-05-06 18:44:24 +02:00
Andreas Gruenbacher
7e9296614a test library: Only use GNU diff when available
* tests/test-lib.sh: Only use GNU diff when available.
* tests/dash-o-append: Fix the expected result.
2010-05-05 13:09:18 +02:00
Andreas Gruenbacher
9dbdc0e748 Create temporary test directories in builddir
* tests/test-lib.sh: Create temporary directories in builddir; this
removes the need to do it safely: some systems do not have mktemp -d.
2010-05-04 21:46:12 +02:00
Andreas Gruenbacher
dbb26b7e99 Some test suite fixes and improvements
* tests/test-lib.sh: Flag tests with missing pre-requirements as
SKIPped instead of PASSed.  Do not use GNU diff extensions, but
still require a diff that understands "-u".
* tests: Do not unnecessarily require GNU diff in a lot of tests.
Make the sed utility optional.
2010-05-04 04:07:45 +02:00
Andreas Gruenbacher
c86f4a2c80 Portability fixes
* tests/test-lib.sh: Some versions of mktemp require a filename
template; use one.  Provide a seq replacement on platforms which don't
have seq.
2010-04-12 17:19:33 +02:00
Andreas Gruenbacher
7fa8417c05 Convert to automake and use a git submodule for gnulib
* configure.ac: Add automake and gnulib macros, replace several
obsolete macros.
* Makefile.am, lib/Makefile.am, src/Makefile.am, tests/Makefile.am:
Add for automake.
* autogen.sh, INSTALL, Makefile.in, mkinstalldirs, update-version.sh:
Obsolete; remove.
* README-hacking: Import from diffutils, replace cvs with git.
* build-aux: Move gnulib auxiliary files here from the top-level
directory.
* gnulib: Add gnulib git submodule.
* bootstrap, bootstrap.conf: Import from gnulib and adjust.
* gl/lib: Remove gnulib files from the repository; they are now
imported into lib/ from gnulib as needed.
* tests/test-lib.sh: Use $abs_top_builddir exported from
tests/Makefile.am here instead of $PWD.
* m4/utimbuf.m4: This macro has been removed from gnulib. Add it here
for now; this will be replaced by gnulib's utimens module soon.
2010-04-12 16:27:55 +02:00
Andreas Gruenbacher
fea737a1b5 Document that merging can be slow 2009-04-05 23:46:02 +02:00
Andreas Gruenbacher
85cd8a4cfe Move all source and header files into src/ 2009-04-05 08:12:05 +02:00
Andreas Gruenbacher
ccba56be0c Make the ed utility optional in the test suite 2009-04-03 18:53:13 +02:00
Andreas Gruenbacher
900dd889c0 Unset GDB in case it is set in the environment 2009-04-02 02:41:29 +02:00
Andreas Gruenbacher
0f1c530a4d Test suite: when $GDB is set, run patch in gdbserver for debugging 2009-04-02 02:40:06 +02:00
Andreas Gruenbacher
af57793704 Test suite and debug message fixes
* tests/test-lib.sh: Unset environment variables that influence
the behavior of patch.
* util.c (move_file): Add debug message when files have been seen
already.  Fix leftover "empty uneadable" debug message.
2009-03-30 03:11:38 +02:00
Andreas Gruenbacher
df890caf03 Prepare for second alpha release
Update NEWS.
Packaging and various other minor fixes.
2009-03-29 00:59:26 +01:00
Andreas Gruenbacher
1818b03d6e Cross-platform compatibility improvements 2009-03-24 18:30:58 +01:00
Andreas Gruenbacher
78a818a550 Add a simple regression test framework 2009-03-22 13:37:24 +01:00