Commit d42fda60d55d27bc61828901d09d15d2d536e5a7
Committed by
m-holger
1 parent
8f54319f
Amend "recover file with xref stream" test
Change first xref stream dictionary to point to an invalid root in order to detect failure to recover the last valid trailer.
Showing
2 changed files
with
3 additions
and
2 deletions
qpdf/qtest/object-stream.test
| @@ -102,10 +102,11 @@ $td->runtest("recover file with xref stream", | @@ -102,10 +102,11 @@ $td->runtest("recover file with xref stream", | ||
| 102 | {$td->COMMAND => "qpdf --static-id --compress-streams=n" . | 102 | {$td->COMMAND => "qpdf --static-id --compress-streams=n" . |
| 103 | " recover-xref-stream.pdf a.pdf"}, | 103 | " recover-xref-stream.pdf a.pdf"}, |
| 104 | {$td->FILE => "recover-xref-stream.out", $td->EXIT_STATUS => 3}, | 104 | {$td->FILE => "recover-xref-stream.out", $td->EXIT_STATUS => 3}, |
| 105 | - $td->NORMALIZE_NEWLINES); | 105 | + $td->EXPECT_FAILURE); |
| 106 | $td->runtest("check file", | 106 | $td->runtest("check file", |
| 107 | {$td->FILE => "a.pdf"}, | 107 | {$td->FILE => "a.pdf"}, |
| 108 | - {$td->FILE => "recover-xref-stream-recovered.pdf"}); | 108 | + {$td->FILE => "recover-xref-stream-recovered.pdf"}, |
| 109 | + $td->EXPECT_FAILURE); | ||
| 109 | 110 | ||
| 110 | # Self-referential object stream | 111 | # Self-referential object stream |
| 111 | $td->runtest("self-referential object stream", | 112 | $td->runtest("self-referential object stream", |
qpdf/qtest/qpdf/recover-xref-stream.pdf
No preview for this file type