diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-01-17 19:25:32 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2014-01-17 19:25:32 +0100 |
commit | 83c6e2739bab56cfdc56aad160b2cc8d6880936a (patch) | |
tree | f6ba385824a39270bd94d5f6d70e4cb9763b7a3c | |
parent | f2f17aae2cafdeff2b6b8fb4a30c431794534f02 (diff) | |
download | quilt-83c6e2739bab56cfdc56aad160b2cc8d6880936a.tar.gz |
Test quilt refresh on a patch leaving an empty file
Add a test case for "quilt refresh" on a patch leaving an empty file.
We were already testing that imported patches doing that were handled
properly, now we want to ensure that refreshing such patches preserves
the information.
-rw-r--r-- | quilt.changes | 7 | ||||
-rw-r--r-- | test/empty-files.test | 36 |
2 files changed, 43 insertions, 0 deletions
diff --git a/quilt.changes b/quilt.changes index cedc6b9..e021211 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Jan 17 19:12:34 CET 2014 - jdelvare@suse.de + +- Fix handling of patches emptying a file. +- Add a test case for "quilt refresh" on a patch leaving an empty + file. + +------------------------------------------------------------------- Fri Jan 17 18:26:55 CET 2014 - mquinson@debian.org - test/refresh_patch_order.test: enforces the file order within a patch diff --git a/test/empty-files.test b/test/empty-files.test index c03ad3a..2fc505a 100644 --- a/test/empty-files.test +++ b/test/empty-files.test @@ -83,3 +83,39 @@ > File deleted2 does not exist $ if test -e emptied2; then if test -s emptied2; then echo "File emptied2 is not empty" ; else echo "File emptied2 is empty" ; fi ; else echo "File emptied2 does not exist" ; fi > File emptied2 is empty + +# Test quilt refresh + $ quilt delete + > Removing patch patches/fold.patch + > No patches applied + > Removed patch patches/fold.patch + $ quilt push -q + > Applying patch patches/using-filenames.patch + > Now at patch patches/using-filenames.patch + + $ quilt refresh -pab --sort --no-index + > Refreshed patch patches/using-filenames.patch + $ quilt pop -q + > Removing patch patches/using-filenames.patch + > No patches applied + + $ quilt push + > Applying patch patches/using-filenames.patch + > patching file deleted1 + > patching file emptied1 + > + > Now at patch patches/using-filenames.patch + $ if test -e deleted1; then if test -s deleted1; then echo "File deleted1 is not empty" ; else echo "File deleted1 is empty" ; fi ; else echo "File deleted1 does not exist" ; fi + > File deleted1 does not exist + $ if test -e emptied1; then if test -s emptied1; then echo "File emptied1 is not empty" ; else echo "File emptied1 is empty" ; fi ; else echo "File emptied1 does not exist" ; fi + > File emptied1 is empty + + $ cat patches/using-filenames.patch + > --- a/deleted1 + > +++ /dev/null + > @@ -1 +0,0 @@ + > -will be deleted + > --- a/emptied1 + > +++ b/emptied1 + > @@ -1 +0,0 @@ + > -will be emptied |