summaryrefslogtreecommitdiffstats
path: root/test/import.test
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2021-09-03 17:01:56 +0200
committerJean Delvare <jdelvare@suse.de>2021-09-03 17:01:56 +0200
commit62d53007cc96d488f1b108118bbb6568f93041e8 (patch)
tree5c2beeddc2999164056d03c02885b1c78705094b /test/import.test
parentc539338458e4aa8b2d6c4c87b9192def3800d0b5 (diff)
downloadquilt-62d53007cc96d488f1b108118bbb6568f93041e8.tar.gz
import: Fix option -P
I broke "import -P" with my previous commit. Using this option now fails with the following error message: /usr/share/quilt/import: line 168: [: missing `]' This is caused by a missing space before the closing square bracket, which prevents bash from parsing the line. Fix that, and add a test case to cover this code path, so that no such bug can creep in in the future. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: c539338458e4 ("Delay sourcing patchfns until options have been processed")
Diffstat (limited to 'test/import.test')
-rw-r--r--test/import.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/import.test b/test/import.test
index e9cc85b..466d808 100644
--- a/test/import.test
+++ b/test/import.test
@@ -255,3 +255,19 @@
> Importing patch ../empty.patch (stored as %{_P}empty.patch)
$ quilt import %{PWD}/empty2.patch
> Importing patch %{PWD}/empty2.patch (stored as %{_P}empty2.patch)
+
+# Test importing under a different name
+ $ cd ..
+ $ quilt delete -rn
+ > Removed patch %{P}empty2.patch
+ $ quilt delete -rn
+ > Removed patch %{P}empty.patch
+ $ quilt import t/patch1.diff -P patch1-renamed.diff
+ > Importing patch t/patch1.diff (stored as %{P}patch1-renamed.diff)
+ $ quilt push
+ > Applying patch %{P}patch1-renamed.diff
+ > patching file f
+ >
+ > Now at patch patches/patch1-renamed.diff
+ $ cat f
+ > f