21 Commits

Author SHA1 Message Date
Paul Eggert
95e0092f97 maint: make update-copyright 2025-01-05 13:33:00 -08: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
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
Andreas Gruenbacher
f926295f4f Improve error message when refusing to delete file
* src/patch.c: Improve error message.
* tests/create-delete: Update the test case.
2014-08-13 01:16:44 +02:00
Andreas Gruenbacher
47191c287d Don't fail test suite if printf '\0' is broken
* tests/create-delete: Skip binary diff test if printf '\0' is broken.
2012-09-30 13:06:35 +02:00
Andreas Gruenbacher
fc5ddce20e Repair 'backup of unmodified file' test
tests/create-delete: Repair 'backup of unmodified file' test.
2012-09-28 18:39:33 +02:00
Andreas Gruenbacher
e8bfce6547 Improve the previous commit
* src/patch.c: Only print the "file is not empty after patch" message when
trying to delete the output file.  Say that we were trying to delete the file.
* tests/create-delete: Fix the expected messages.  Add test cases for the
--remove-empty-files and --posix options.
* NEWS: Better describe this change.
2012-09-26 01:33:22 +02:00
Andreas Gruenbacher
1d9ed51e9c Only expect files to become empty if the patch says so
Test cases based on patches from Dmitry V. Levin <ldv@altlinux.org>.
* src/patch.c (main): Only expect files to become empty if the patch says so.
* NEWS: Document this change.
* tests/create-delete: Add (more) empty vs. non-empty test cases.
2012-09-25 04:07:53 +02:00
Andreas Gruenbacher
281537bcd9 In a git-style diff, make sure not to unlink the original by accident
* src/patch.c (main): Fail if a file is not empty as expected.
(output_files): In a git-style diff, make sure not to unlink the original when
making a backup of an unmodified file.
* tests/create-delete: Fix failed-file-deletion test and add
successful-file-deletion test.
2012-09-13 16:32:53 +02:00
Andreas Gruenbacher
90d4e1f3d5 Fix segfault in output_file_later()
Bug reported by Dmitry V. Levin <ldv@altlinux.org>.
* src/patch.c (output_file_later): Fix case where the output file is identical
with the input file (and to == NULL).
2012-04-24 12:37:26 +02:00
Andreas Gruenbacher
b9a1ff0cfa Fix "delete file which does not exist" test case
* tests/create-delete: Remove left-over file f.orig before the test.
2012-04-17 16:48:19 +02: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
07d4792620 maint: remove trailing blanks
* bootstrap.conf: Remove trailing blanks.
* tests/reject-format: Define a dummy, empty variable, and use it in
here-doc to protect required trailing blanks from accidental removal.
* tests/no-newline-triggers-assert: Likewise.
* tests/preserve-c-function-names: Likewise.
* tests/create-delete: Likewise.
* tests/global-reject-files: Complete a sentence that ended in a space.
2011-03-26 14:20:28 +01:00
Andreas Gruenbacher
99d75edf46 More test suite fixes
* tests/create-delete: Do not use 'diff' here.
* tests/merge: Require GNU diff.
2010-05-05 12:18:41 +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
a93dea1dce Stick to the best name in the reversed-patch check
* src/pch.c (intuit_diff_type): Fix a bug where the reversed-patch
check would wrongly pick the last name instead of the best name.
* src/create-delete: Add test cases for that.
2010-05-03 21:58:40 +02:00
Andreas Gruenbacher
b3a9ff4f13 Fix the "patch would create" fix from 2009-03-28 2009-04-06 05:47:52 +02:00
Jim Meyering
0d4e18782d "make check" failures
tests: accommodate ls' "alternate access control method" indicator
ls can output an additional byte after a file's permissions string,
e.g., rather than "rwxr--r-- ..." it can output "rwxr--r--+ ..."
or "rwxr--r--. ..." to indicate the presence of an ACL.
* tests/create-delete: Adjust sed filter to accommodate that.
* tests/preserve-mode-and-timestamp: Likewise.
2009-03-30 07:16:05 +02:00
Andreas Gruenbacher
ad80a8ed1e No more empty unreadable backup files
This is bug 25834.
2009-03-29 00:26:55 +01:00
Andreas Gruenbacher
d85ba027a7 Fix failed `i0 != NONE' assertion and fix the create/delete/empty out checking
This is bug 25970.
2009-03-28 23:48:24 +01:00