summaryrefslogtreecommitdiffstats
path: root/test/edit.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2017-05-09 16:54:48 +0200
committerJean Delvare <jdelvare@suse.de>2017-05-09 16:54:48 +0200
commit1d8867cd1fac531f576ad3a9a7eea4eef3ab8ed0 (patch)
tree727c431232cd03769b62b58372b1c937e4275b1e /test/edit.test
parentce137ed78de177a92a867979cdea8aabc9e43a32 (diff)
downloadquilt-1d8867cd1fac531f576ad3a9a7eea4eef3ab8ed0.tar.gz
test: Consistently use %{P} and %{_P}
There is no point in defining P and _P in the Makefile to allow for QUILT_PATCHES_PREFIX to be set or unset if we do not use these variables consistently in the test suite. Replace hardcoded "patches/" with %{P} or %{_P} throughout the test suite wherever relevant so that unsetting QUILT_PATCHES_PREFIX in test.quiltrc actually works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'test/edit.test')
-rw-r--r--test/edit.test20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/edit.test b/test/edit.test
index 2091305..98fd393 100644
--- a/test/edit.test
+++ b/test/edit.test
@@ -10,11 +10,11 @@ $ chmod +x editor
$ export EDITOR=%{PWD}/editor
$ quilt new patch
-> Patch patches/patch is now on top
+> Patch %{P}patch is now on top
$ echo foobar > foobar
$ quilt edit foobar
-> File foobar added to patch patches/patch
+> File foobar added to patch %{P}patch
> Editing foobar
$ cat foobar
@@ -23,7 +23,7 @@ $ cat foobar
$ cd subdir
$ echo foo > foo
$ quilt edit foo
-> File subdir/foo added to patch ../patches/patch
+> File subdir/foo added to patch %{_P}patch
> Editing subdir/foo
$ cd ..
@@ -35,7 +35,7 @@ $ quilt files
> subdir/foo
$ quilt refresh
-> Refreshed patch patches/patch
+> Refreshed patch %{P}patch
# Test the behavior if the editor deletes a file completely
$ echo foobaz > foobaz
@@ -45,7 +45,7 @@ $ cat > editor
< rm -f $1
$ quilt edit foobaz
-> File foobaz added to patch patches/patch
+> File foobaz added to patch %{P}patch
> Deleting foobaz
$ [ ! -e foobaz ] || echo "File foobaz shouldn't exist"
@@ -57,15 +57,15 @@ $ cat > editor
< echo Doing nothing to $1
$ quilt edit nofoo
-> File nofoo added to patch patches/patch
+> File nofoo added to patch %{P}patch
> Doing nothing to nofoo
-> File nofoo removed from patch patches/patch
+> File nofoo removed from patch %{P}patch
# Test the behavior if the patch is deleting a file and the
# user calls "quilt edit" on that file but makes no change to it
$ rm -f foobar
$ quilt refresh
-> Refreshed patch patches/patch
+> Refreshed patch %{P}patch
$ quilt diff -p ab --no-index foobar
> --- a/foobar
> +++ /dev/null
@@ -73,7 +73,7 @@ $ quilt diff -p ab --no-index foobar
> -foobar
$ quilt edit foobar
-> File foobar is already in patch patches/patch
+> File foobar is already in patch %{P}patch
> Doing nothing to foobar
$ [ ! -e foobar ] || echo "File foobar shouldn't exist"
@@ -85,7 +85,7 @@ $ cat > editor
< echo "new line" > $1
$ quilt edit foo2
-> File foo2 added to patch patches/patch
+> File foo2 added to patch %{P}patch
> Creating foo2
$ cat foo2
> new line