diff options
Diffstat (limited to 'qpdf/qtest/qpdf.test')
-rw-r--r-- | qpdf/qtest/qpdf.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index 877c3f5e..92a9412b 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -921,6 +921,34 @@ $td->runtest("check output", show_ntests(); # ---------- +$td->notify("--- Page with no contents ---"); +$n_tests += 7; + +$td->runtest("check no contents", + {$td->COMMAND => "qpdf --check no-contents.pdf"}, + {$td->FILE => "no-contents-check.out", $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + +foreach my $arg ('--qdf', '--coalesce-contents', '') +{ + $td->runtest("convert no contents ($arg)", + {$td->COMMAND => + "qpdf $arg --static-id no-contents.pdf a.pdf"}, + {$td->STRING => "", $td->EXIT_STATUS => 0}); + + my $suf = $arg; + $suf =~ s/--//; + if ($suf eq '') + { + $suf = "none"; + } + $td->runtest("check output", + {$td->FILE => "a.pdf"}, + {$td->FILE => "no-contents-$suf.pdf"}); +} + +show_ntests(); +# ---------- $td->notify("--- Token filters ---"); $n_tests += 2; |