diff options
author | Jean Delvare <jdelvare@suse.de> | 2021-06-10 17:14:19 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2021-06-10 17:14:19 +0200 |
commit | c539338458e4aa8b2d6c4c87b9192def3800d0b5 (patch) | |
tree | e403af8feb8b41061e1457379c31c7b11bfba4c2 /test | |
parent | ca85fbd8202219737e14aaaff17d1c479536831f (diff) | |
download | quilt-c539338458e4aa8b2d6c4c87b9192def3800d0b5.tar.gz |
Delay sourcing patchfns until options have been processed
Commit 8b39a960afcf ("Consistently complain early if no series file
is found") unexpectedly broke commands like "quilt add -h", because
the check for a series file happens before the command line options
are processed. This, in turn, breaks the generation of the quilt
manual page, which relies on the output of each command when called
with option -h.
Reorder the code so that options are always processed first, and then
patchfns is sourced. That way, option "-h" will work again even if
not in a quilt working tree.
Fixes: 8b39a960afcf ("Consistently complain early if no series file is found")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/help.test | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/test/help.test b/test/help.test new file mode 100644 index 0000000..4754a67 --- /dev/null +++ b/test/help.test @@ -0,0 +1,91 @@ +# We simulate a working tree root so that quilt does not attempt to find one +# in a parent directory, as this would invalidate this test +$ mkdir $QUILT_PC +$ echo 2 > $QUILT_PC/.version + +$ quilt add -h | grep -c '^Usage:' +> 1 + +$ quilt annotate -h | grep -c '^Usage:' +> 1 + +$ quilt applied -h | grep -c '^Usage:' +> 1 + +$ quilt delete -h | grep -c '^Usage:' +> 1 + +$ quilt diff -h | grep -c '^Usage:' +> 1 + +$ quilt edit -h | grep -c '^Usage:' +> 1 + +$ quilt files -h | grep -c '^Usage:' +> 1 + +$ quilt fold -h | grep -c '^Usage:' +> 1 + +$ quilt fork -h | grep -c '^Usage:' +> 1 + +$ quilt graph -h | grep -c '^Usage:' +> 1 + +$ quilt grep -h | grep -c '^Usage:' +> 1 + +$ quilt header -h | grep -c '^Usage:' +> 1 + +$ quilt import -h | grep -c '^Usage:' +> 1 + +$ quilt mail -h | grep -c '^Usage:' +> 1 + +$ quilt new -h | grep -c '^Usage:' +> 1 + +$ quilt next -h | grep -c '^Usage:' +> 1 + +$ quilt patches -h | grep -c '^Usage:' +> 1 + +$ quilt pop -h | grep -c '^Usage:' +> 1 + +$ quilt previous -h | grep -c '^Usage:' +> 1 + +$ quilt push -h | grep -c '^Usage:' +> 1 + +$ quilt refresh -h | grep -c '^Usage:' +> 1 + +$ quilt remove -h | grep -c '^Usage:' +> 1 + +$ quilt rename -h | grep -c '^Usage:' +> 1 + +$ quilt series -h | grep -c '^Usage:' +> 1 + +$ quilt setup -h | grep -c '^Usage:' +> 1 + +$ quilt snapshot -h | grep -c '^Usage:' +> 1 + +$ quilt top -h | grep -c '^Usage:' +> 1 + +$ quilt unapplied -h | grep -c '^Usage:' +> 1 + +$ quilt upgrade -h | grep -c '^Usage:' +> 1 |