aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2024-01-09 14:35:10 +0100
committerJay Berkenbilt <ejb@ql.org>2024-01-10 12:49:31 +0100
commit20a134826c6f33fab81b0cdb9ba2d75fb03d1b59 (patch)
tree21cb545861a09435dab3c91156ab23a175f27be5 /qpdf
parent8b0ae8bb99e377979e692dea8d8de579dab64af5 (diff)
downloadqpdf-20a134826c6f33fab81b0cdb9ba2d75fb03d1b59.tar.zst
Fix arg parsing check with --collate
The check for the number of items was in the wrong place.
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qtest/arg-parsing.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/qpdf/qtest/arg-parsing.test b/qpdf/qtest/arg-parsing.test
index 82594674..297141d4 100644
--- a/qpdf/qtest/arg-parsing.test
+++ b/qpdf/qtest/arg-parsing.test
@@ -15,7 +15,7 @@ cleanup();
my $td = new TestDriver('arg-parsing');
-my $n_tests = 23;
+my $n_tests = 24;
$td->runtest("required argument",
{$td->COMMAND => "qpdf --password minimal.pdf"},
@@ -101,6 +101,13 @@ $td->runtest("wrong number of collate args",
{$td->REGEXP => ".*--collate has more than one value.*",
$td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
+$td->runtest("wrong number of collate args",
+ {$td->COMMAND =>
+ "qpdf collate-odd.pdf --pages . minimal.pdf collate-even.pdf --" .
+ " --collate=2,3 a.pdf"},
+ {$td->REGEXP => ".*--collate has more than one value.*",
+ $td->EXIT_STATUS => 2},
+ $td->NORMALIZE_NEWLINES);
# Ignoring -- at the top level was never intended but turned out to
# have been there for a long time so that people relied on it. It is