summaryrefslogtreecommitdiffstats
path: root/test/setup.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2012-10-25 17:42:46 +0200
committerJean Delvare <jdelvare@suse.de>2012-10-25 17:42:46 +0200
commit3fb88165288ecdfece7957cc57cdcd3bccebfd48 (patch)
tree0d6686e8ecf18d7678e69618551a04b17a622dc4 /test/setup.test
parent308f3ca388149c1f62898c1ae3ed76b1456327ba (diff)
downloadquilt-3fb88165288ecdfece7957cc57cdcd3bccebfd48.tar.gz
setup: Run create_db
Run create_db() as part of quilt setup, so that $QUILT_PATCHES and $QUILT_SERIES are recorded for future quilt commands.
Diffstat (limited to 'test/setup.test')
-rw-r--r--test/setup.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/setup.test b/test/setup.test
index e94ef3f..b52614c 100644
--- a/test/setup.test
+++ b/test/setup.test
@@ -7,7 +7,11 @@ $ diff -u dir/foo.orig dir/foo > revert.diff
$ diff -u dir/foo.orig dir/foo > again.diff
$ mv dir/foo.orig dir/foo
$ tar cf - dir | gzip > dir.tar.gz
+$ mkdir dir/patches
+$ echo crap > dir/patches/foo.diff
+$ tar cf - dir | gzip > dir_with_patches.tar.gz
$ rm -rf dir
+
$ cat > series
< # Source: dir.tar.gz
< # Patchdir: dir
@@ -57,6 +61,28 @@ $ quilt push -qa
> Applying patch patches/revert.diff
> Applying patch patches/again.diff
> Now at patch patches/again.diff
+$ cd ../..
+$ rm -rf "dir"
+
+# Now test the case where the tarball contains a patches directory
+$ cat > series_with_patches
+< # Source: dir_with_patches.tar.gz
+< # Patchdir: dir
+< #
+< foo.diff
+$ quilt setup series_with_patches
+> Unpacking archive dir_with_patches.tar.gz
+> Directory dir/patches exists
+> Trying alternative patches and series names...
+$ cd dir
+$ ls -l quilt_patches quilt_series | sed -e 's:.* -> ::'
+> ..
+> ../series_with_patches
+$ quilt push -qa
+> Applying patch quilt_patches/foo.diff
+> Now at patch quilt_patches/foo.diff
+$ cd ..
+$ rm -rf "dir"
# Now a basic test with space in dir name
$ mkdir "space [dir]"