add damaged stream test case

git-svn-id: svn+q:///qpdf/trunk@664 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-03-09 16:39:33 +00:00
parent f62bec3ee5
commit 9ac249e7e7
3 changed files with 10 additions and 1 deletions

View File

@ -338,7 +338,7 @@ for (my $n = 16; $n <= 19; ++$n)
show_ntests();
# ----------
$td->notify("--- Specific File Tests ---");
$n_tests += 2;
$n_tests += 3;
$n_compare_pdfs += 1;
# Special PDF files that caused problems at some point
@ -361,6 +361,11 @@ $td->runtest("convert to qdf",
compare_pdfs("old-and-complex.pdf", "a.qdf");
$td->runtest("damaged stream",
{$td->COMMAND => "qpdf --check damaged-stream.pdf"},
{$td->FILE => "damaged-stream.out", $td->EXIT_STATUS => 3},
$td->NORMALIZE_NEWLINES);
show_ntests();
# ----------
$td->notify("--- Mutability Tests ---");

View File

@ -0,0 +1,4 @@
checking damaged-stream.pdf
File is not encrypted
File is not linearized
WARNING: damaged-stream.pdf: offset 426: error decoding stream data for object 5 0: LZWDecoder: bad code received

Binary file not shown.