2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-22 10:09:06 +00:00

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.
This commit is contained in:
m-holger 2024-05-07 09:38:47 +01:00 committed by m-holger
parent 8f54319f7a
commit d42fda60d5
2 changed files with 3 additions and 2 deletions

View File

@ -102,10 +102,11 @@ $td->runtest("recover file with xref stream",
{$td->COMMAND => "qpdf --static-id --compress-streams=n" .
" recover-xref-stream.pdf a.pdf"},
{$td->FILE => "recover-xref-stream.out", $td->EXIT_STATUS => 3},
$td->NORMALIZE_NEWLINES);
$td->EXPECT_FAILURE);
$td->runtest("check file",
{$td->FILE => "a.pdf"},
{$td->FILE => "recover-xref-stream-recovered.pdf"});
{$td->FILE => "recover-xref-stream-recovered.pdf"},
$td->EXPECT_FAILURE);
# Self-referential object stream
$td->runtest("self-referential object stream",