summaryrefslogtreecommitdiff
path: root/tests/create-delete
Commit message (Collapse)AuthorAgeFilesLines
* test-lib.sh: factorize require_* functionsQuentin Casasnovas2015-01-311-2/+2
| | | | | | | 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>
* Improve error message when refusing to delete fileAndreas Gruenbacher2014-08-131-3/+3
| | | | | * src/patch.c: Improve error message. * tests/create-delete: Update the test case.
* Don't fail test suite if printf '\0' is brokenAndreas Gruenbacher2012-09-301-4/+8
| | | | * tests/create-delete: Skip binary diff test if printf '\0' is broken.
* Repair 'backup of unmodified file' testAndreas Gruenbacher2012-09-281-8/+5
| | | | tests/create-delete: Repair 'backup of unmodified file' test.
* Improve the previous commitAndreas Gruenbacher2012-09-261-3/+23
| | | | | | | | * 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.
* Only expect files to become empty if the patch says soAndreas Gruenbacher2012-09-251-10/+70
| | | | | | | 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.
* In a git-style diff, make sure not to unlink the original by accidentAndreas Gruenbacher2012-09-131-1/+26
| | | | | | | | * 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.
* Fix segfault in output_file_later()Andreas Gruenbacher2012-04-241-0/+21
| | | | | | 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).
* Fix "delete file which does not exist" test caseAndreas Gruenbacher2012-04-171-4/+2
| | | | * tests/create-delete: Remove left-over file f.orig before the test.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update copyright date year ranges to include 2011Jim Meyering2011-03-271-1/+1
| | | | | * bootstrap.conf (gnulib_modules): Add update-copyright. Run "make update-copyright".
* maint: remove trailing blanksJim Meyering2011-03-261-2/+4
| | | | | | | | | | * 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.
* More test suite fixesAndreas Gruenbacher2010-05-051-25/+50
| | | | | * tests/create-delete: Do not use 'diff' here. * tests/merge: Require GNU diff.
* Some test suite fixes and improvementsAndreas Gruenbacher2010-05-041-1/+1
| | | | | | | | * 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.
* Stick to the best name in the reversed-patch checkAndreas Gruenbacher2010-05-031-0/+30
| | | | | | * 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.
* Fix the "patch would create" fix from 2009-03-28Andreas Gruenbacher2009-04-061-0/+29
|
* "make check" failuresJim Meyering2009-03-301-1/+1
| | | | | | | | | 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.
* No more empty unreadable backup filesAndreas Gruenbacher2009-03-291-1/+7
| | | | This is bug 25834.
* Fix failed `i0 != NONE' assertion and fix the create/delete/empty out checkingAndreas Gruenbacher2009-03-281-0/+80
This is bug 25970.