summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2004-02-20 14:30:45 +0000
committerAndreas Gruenbacher <agruen@suse.de>2004-02-20 14:30:45 +0000
commitbd0773bed9c43affd7f0af8b04fa9850bdd588b2 (patch)
tree381c147a8a42ed8f595c0446f8f67fcb31e29ad8 /test
parent2e083b83410563b1bc5ff8b2379315178ccc7bfd (diff)
downloadquilt-bd0773bed9c43affd7f0af8b04fa9850bdd588b2.tar.gz
- Sub-directory support:
+ Fix another bug that triggers when /patches exists. + Working in sub-directories: Force `quilt new' to always create the new patch in the current working directory even if there is a patches/ sub-directory further up the directory tree. This should restore the behavior from before Jan 28 very well. - quilt files, diff, refresh: Sort the files in the patch alphabetically.
Diffstat (limited to 'test')
-rw-r--r--test/new-nosubdir.test11
-rw-r--r--test/reorder.test21
-rw-r--r--test/snapshot2.test7
-rw-r--r--test/two.test13
4 files changed, 38 insertions, 14 deletions
diff --git a/test/new-nosubdir.test b/test/new-nosubdir.test
new file mode 100644
index 0000000..e1008f3
--- /dev/null
+++ b/test/new-nosubdir.test
@@ -0,0 +1,11 @@
+ $ mkdir d
+ $ cd d
+
+ $ mkdir patches sub
+ $ cd sub
+ $ quilt new here.diff
+ > Warning: directory ../../patches exists; ignoring
+ > Patch here.diff is now on top
+
+ $ cd ../..
+ $ rm -rf d
diff --git a/test/reorder.test b/test/reorder.test
index 154e2e9..b592932 100644
--- a/test/reorder.test
+++ b/test/reorder.test
@@ -6,13 +6,13 @@ Regression test: Quilt did reorder files in patches.
$ echo one > g
$ mkdir patches
$ cat > patches/test.diff
- < --- g.orig 2003-04-09 01:48:01.000000000 +0200
- < +++ g 2003-04-09 01:49:17.000000000 +0200
+ < --- g.orig
+ < +++ g
< @@ -1 +1 @@
< -one
< +two
- < --- f.orig 2003-04-09 01:48:01.000000000 +0200
- < +++ f 2003-04-09 01:49:17.000000000 +0200
+ < --- f.orig
+ < +++ f
< @@ -1 +1 @@
< -one
< +two
@@ -30,8 +30,8 @@ Regression test: Quilt did reorder files in patches.
$ echo one > h
$ sleep 2
$ cat >> patches/test.diff
- < --- h.orig 2003-04-09 01:48:01.000000000 +0200
- < +++ h 2003-04-09 01:49:17.000000000 +0200
+ < --- h.orig
+ < +++ h
< @@ -1 +1 @@
< -one
< +two
@@ -41,9 +41,16 @@ Regression test: Quilt did reorder files in patches.
> Now at patch test.diff
$ quilt files
- > g
> f
+ > g
> h
+ $ quilt refresh
+ > Refreshed patch test.diff
+ $ grep "^+++ " patches/test.diff
+ > +++ f
+ > +++ g
+ > +++ h
+
$ cd ..
$ rm -rf d
diff --git a/test/snapshot2.test b/test/snapshot2.test
index e8aa8a8..b0d91e7 100644
--- a/test/snapshot2.test
+++ b/test/snapshot2.test
@@ -1,8 +1,9 @@
- $ mkdir -p d/patches d/d
- $ cd d/d
-
+ $ mkdir -p d/d
+ $ cd d
$ quilt new snapshot
> Patch snapshot is now on top
+
+ $ cd d
$ quilt add f.txt
> File d/f.txt added to patch snapshot
$ cat > f.txt
diff --git a/test/two.test b/test/two.test
index e365afe..372dd72 100644
--- a/test/two.test
+++ b/test/two.test
@@ -1,12 +1,13 @@
(To run, type `./run two.test' in this directory.)
- $ mkdir -p d/patches d/d
- $ cd d/d
- $ mkdir dir
- $ echo "This is file one." > dir/file1
+ $ mkdir -p d/d
+ $ cd d
$ quilt new patch1.diff
> Patch patch1.diff is now on top
+ $ cd d
+ $ mkdir dir
+ $ echo "This is file one." > dir/file1
$ quilt add dir/file1
> File d/dir/file1 added to patch patch1.diff
@@ -64,9 +65,11 @@
$ quilt refresh
> Refreshed patch patch1.diff
+ $ cd ..
$ quilt new patch2.diff
> Patch patch2.diff is now on top
+ $ cd d
$ quilt add dir/file3
> File d/dir/file3 added to patch patch2.diff
@@ -96,9 +99,11 @@
>
> Now at patch patch2.diff
+ $ cd ..
$ quilt new subdir/patch3.diff
> Patch subdir/patch3.diff is now on top
+ $ cd d
$ quilt add file4
> File d/file4 added to patch subdir/patch3.diff