summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fold.test57
-rw-r--r--test/one.test4
2 files changed, 57 insertions, 4 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
diff --git a/test/one.test b/test/one.test
index d1298c5..d72858f 100644
--- a/test/one.test
+++ b/test/one.test
@@ -23,10 +23,6 @@ of the installed quilt with `make check'.
$ quilt refresh
> Nothing in patch patch1
- $ quilt files
- > dir/file1
- > file2
-
$ echo "This is file two." > file2
$ quilt diff | sed -e "s/\\t.*//"
> Index: d/file2