diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-09-02 15:37:17 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-09-02 15:37:17 +0200 |
commit | 31396f61c98ff955118f192f75bf02320c7a2abc (patch) | |
tree | 037ef427d5537c588d13c9408c672597927ff6b9 /qpdf | |
parent | fa15042ce9f95b69dcd1dc89449ff3b295b9eff3 (diff) | |
download | qpdf-31396f61c98ff955118f192f75bf02320c7a2abc.tar.zst |
Disallow --empty with --replace-input (fixes #728)
Diffstat (limited to 'qpdf')
-rw-r--r-- | qpdf/qtest/arg-parsing.test | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qpdf/qtest/arg-parsing.test b/qpdf/qtest/arg-parsing.test index 99c48b27..ad6bc0d2 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 = 16; +my $n_tests = 17; $td->runtest("required argument", {$td->COMMAND => "qpdf --password minimal.pdf"}, @@ -102,6 +102,11 @@ $td->runtest("ignore -- at top level", {$td->REGEXP => ".*No syntax or stream encoding errors found.*", $td->EXIT_STATUS => 0}, $td->NORMALIZE_NEWLINES); +$td->runtest("empty and replace-input", + {$td->COMMAND => "qpdf --empty --replace-input"}, + {$td->REGEXP => ".*--replace-input may not be used with --empty.*", + $td->EXIT_STATUS => 2}, + $td->NORMALIZE_NEWLINES); cleanup(); $td->report($n_tests); |