summaryrefslogtreecommitdiffstats
path: root/test/fold.test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-11-17 19:49:43 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-11-17 19:49:43 +0000
commit55d662beaf3ff81a72d2d8c71807d2adba569ebe (patch)
treea4dd345b9248253b1d5444cb56c7738d83574870 /test/fold.test
parent26c7e9c357a45e7afe462708eb6232d72df80469 (diff)
downloadquilt-55d662beaf3ff81a72d2d8c71807d2adba569ebe.tar.gz
- Add new command `quilt fold' to fold one patch into another.
- Fix bug in `quilt files': Files that are neither present in the working directory and have an empty backup copy sometimes were still listed. - Some minor cleanups in apatch. - Add test/fold.test, and fix a now-useless check in one.test.
Diffstat (limited to 'test/fold.test')
-rw-r--r--test/fold.test57
1 files changed, 57 insertions, 0 deletions
diff --git a/test/fold.test b/test/fold.test
new file mode 100644
index 0000000..b0aeb90
--- /dev/null
+++ b/test/fold.test
@@ -0,0 +1,57 @@
+ $ mkdir d
+ $ cd d
+
+ $ mkdir patches
+ $ cat > patches/series
+ < patch1.diff
+ < patch2.diff
+
+ $ cat > patches/patch1.diff
+ < --- q.orig/file1.txt
+ < +++ q/file1.txt
+ < @@ -0,0 +1 @@
+ < +This is file1.txt.
+ < --- q.orig/file2.txt
+ < +++ q/file2.txt
+ < @@ -0,0 +1 @@
+ < +This is file2.txt.
+
+ $ cat > patches/patch2.diff
+ < --- q.orig/file2.txt
+ < +++ q/file2.txt
+ < @@ -1 +0,0 @@
+ < -This is file2.txt.
+ < --- q.orig/file3.txt
+ < +++ q/file3.txt
+ < @@ -0,0 +1 @@
+ < +This is file3.txt.
+
+ $ quilt push -q
+ > Applying patch1
+ > Now at patch patch1
+
+ $ quilt files
+ > file1.txt
+ > file2.txt
+
+ $ quilt fold -q < patches/patch2.diff
+ $ quilt files
+ > file1.txt
+ > file3.txt
+
+ $ quilt diff | sed -e "s/\\t.*//"
+ > Index: d/file1.txt
+ > ===================================================================
+ > --- d.orig/file1.txt
+ > +++ d/file1.txt
+ > @@ -0,0 +1 @@
+ > +This is file1.txt.
+ > Index: d/file3.txt
+ > ===================================================================
+ > --- d.orig/file3.txt
+ > +++ d/file3.txt
+ > @@ -0,0 +1 @@
+ > +This is file3.txt.
+
+ $ cd ..
+ $ rm -rf d