summaryrefslogtreecommitdiffstats
path: root/test/empty-files.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-01-17 19:25:32 +0100
committerJean Delvare <jdelvare@suse.de>2014-01-17 19:25:32 +0100
commit83c6e2739bab56cfdc56aad160b2cc8d6880936a (patch)
treef6ba385824a39270bd94d5f6d70e4cb9763b7a3c /test/empty-files.test
parentf2f17aae2cafdeff2b6b8fb4a30c431794534f02 (diff)
downloadquilt-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.
Diffstat (limited to 'test/empty-files.test')
-rw-r--r--test/empty-files.test36
1 files changed, 36 insertions, 0 deletions
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