2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-01 01:40:51 +00:00

Add missing test case from long ago

I noticed a test output file that was not accessed in the test suite
and added a test case for it.
This commit is contained in:
Jay Berkenbilt 2012-12-29 21:43:09 -05:00
parent 4eccb9d87b
commit 4fe6f61def
2 changed files with 10 additions and 2 deletions

View File

@ -932,7 +932,7 @@ for (my $n = 16; $n <= 19; ++$n)
show_ntests();
# ----------
$td->notify("--- Specific File Tests ---");
$n_tests += 4;
$n_tests += 5;
$n_compare_pdfs += 1;
# Special PDF files that caused problems at some point
@ -961,6 +961,10 @@ $td->runtest("damaged stream",
{$td->COMMAND => "qpdf --check damaged-stream.pdf"},
{$td->FILE => "damaged-stream.out", $td->EXIT_STATUS => 3},
$td->NORMALIZE_NEWLINES);
$td->runtest("damaged stream (C)",
{$td->COMMAND => "qpdf-ctest 2 damaged-stream.pdf '' a.pdf"},
{$td->FILE => "damaged-stream-c-check.out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
show_ntests();
# ----------

View File

@ -1 +1,5 @@
warning: damaged-stream.pdf: offset 426: error decoding stream data for object 5 0: LZWDecoder: bad code received
warning: damaged-stream.pdf (file position 426): error decoding stream data for object 5 0: LZWDecoder: bad code received
code: 5
file: damaged-stream.pdf
pos : 426
text: error decoding stream data for object 5 0: LZWDecoder: bad code received