diff options
Diffstat (limited to 'qpdf/qtest/qpdf.test')
-rw-r--r-- | qpdf/qtest/qpdf.test | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index ae070735..b4d926e2 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -240,7 +240,7 @@ foreach my $d (@bug_tests) show_ntests(); # ---------- $td->notify("--- Miscellaneous Tests ---"); -$n_tests += 87; +$n_tests += 93; $td->runtest("qpdf version", {$td->COMMAND => "qpdf --version"}, @@ -303,7 +303,8 @@ $td->runtest("check output", {$td->FILE => "unreferenced-indirect-scalar.out"}); # Encrypt files whose /ID strings are other than 32 bytes long (bug -# 2991412). +# 2991412). Also linearize these files, which was reported in a +# separate bug by email. foreach my $file (qw(short-id long-id)) { $td->runtest("encrypt $file.pdf", @@ -318,6 +319,23 @@ foreach my $file (qw(short-id long-id)) {$td->FILE => "$file-check.out", $td->EXIT_STATUS => 0}, $td->NORMALIZE_NEWLINES); + + $td->runtest("linearize $file.pdf", + {$td->COMMAND => + "qpdf --deterministic-id --linearize $file.pdf a.pdf"}, + {$td->STRING => "", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + + $td->runtest("check output", + {$td->FILE => "a.pdf"}, + {$td->FILE => "$file-linearized.pdf"}); + + $td->runtest("check $file.pdf", + {$td->COMMAND => "qpdf --check a.pdf"}, + {$td->FILE => "$file-linearized-check.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); } # Handle file with invalid xref table and object 0 as a regular object |