summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2017-05-09 16:54:53 +0200
committerJean Delvare <jdelvare@suse.de>2017-05-09 16:54:53 +0200
commitf18893bb3b12d93e4d263a75d2ffa9dd41ddaad8 (patch)
tree05a7381965eb8503eb885e2a1a9db73c9ef7e3ad
parent1d8867cd1fac531f576ad3a9a7eea4eef3ab8ed0 (diff)
downloadquilt-f18893bb3b12d93e4d263a75d2ffa9dd41ddaad8.tar.gz
test: Handle alternative QUILT_PATCHES values
When using an alternative QUILT_PATCHES value, we can't use %{P} in the test case, because P is set in the Makefile before the test case has a chance to redefine QUILT_PATCHES. Instead we have to make the prefix optional in the output of the quilt commands, so that the test will succeed regardless of QUILT_PATCHES_PREFIX being set or not. Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r--test/project-settings.test4
-rw-r--r--test/remember-locations.test8
-rw-r--r--test/setup.test4
3 files changed, 8 insertions, 8 deletions
diff --git a/test/project-settings.test b/test/project-settings.test
index 744342d..0f6ba3f 100644
--- a/test/project-settings.test
+++ b/test/project-settings.test
@@ -16,7 +16,7 @@ $ cat > quilt_patches/create.patch
< +new line
$ quilt push
-> Applying patch quilt_patches/create.patch
+>~ Applying patch (quilt_patches/)?create.patch
> patching file file
>
-> Now at patch quilt_patches/create.patch
+>~ Now at patch (quilt_patches/)?create.patch
diff --git a/test/remember-locations.test b/test/remember-locations.test
index 65e62f7..4e30c27 100644
--- a/test/remember-locations.test
+++ b/test/remember-locations.test
@@ -3,7 +3,7 @@
$ export QUILT_PATCHES=my/changes
$ export QUILT_SERIES=patchlist
$ quilt new mychange1
- > Patch my/changes/mychange1 is now on top
+ >~ Patch (my/changes/)?mychange1 is now on top
$ unset QUILT_PATCHES
$ unset QUILT_SERIES
$ cat .pc/.quilt_patches
@@ -16,12 +16,12 @@
# Verify that the custom location is still used even
# if QUILT_PATCHES is not set
$ quilt new mychange2
- > Patch my/changes/mychange2 is now on top
+ >~ Patch (my/changes/)?mychange2 is now on top
# Verify that the root directory can be identified even
# without QUILT_PATCHES with the .pc directory
$ cd my
$ quilt applied
- > ../my/changes/mychange1
- > ../my/changes/mychange2
+ >~ (../my/changes/)?mychange1
+ >~ (../my/changes/)?mychange2
$ cd ..
diff --git a/test/setup.test b/test/setup.test
index 690008e..32b02ba 100644
--- a/test/setup.test
+++ b/test/setup.test
@@ -91,8 +91,8 @@ $ 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
+>~ Applying patch (quilt_patches/)?foo.diff
+>~ Now at patch (quilt_patches/)?foo.diff
$ cd ..
$ rm -rf "dir"