diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-15 21:34:35 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-15 22:13:12 +0100 |
commit | fbd3e56da787d18e7a8794580d0e95b7669d1bc4 (patch) | |
tree | 33536b518187508d284771504f09c90c70ae5201 /qpdf | |
parent | 19608ec151f218aa5f7c47a2d1e497d88acbb3be (diff) | |
download | qpdf-fbd3e56da787d18e7a8794580d0e95b7669d1bc4.tar.zst |
Ignore -- at the top level arg parser (fixes #652)
This was unintended behavior that was added back for backward
compatibility. It is intentionally undocumented.
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/qtest/qpdf.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index ecc51bb8..14205d88 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -149,7 +149,7 @@ foreach my $c (@completion_tests) show_ntests(); # ---------- $td->notify("--- Argument Parsing ---"); -$n_tests += 12; +$n_tests += 13; $td->runtest("required argument", {$td->COMMAND => "qpdf --password minimal.pdf"}, @@ -211,6 +211,14 @@ $td->runtest("duplicated pages password", {$td->REGEXP => ".*password already specified.*", $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 +# intentionally not documented. +$td->runtest("ignore -- at top level", + {$td->COMMAND => "qpdf -- --check -- minimal.pdf --"}, + {$td->REGEXP => ".*No syntax or stream encoding errors found.*", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); show_ntests(); # ---------- |