From 83c6e2739bab56cfdc56aad160b2cc8d6880936a Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 17 Jan 2014 19:25:32 +0100 Subject: 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. --- quilt.changes | 7 +++++++ test/empty-files.test | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/quilt.changes b/quilt.changes index cedc6b9..e021211 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 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 -- cgit