Commit 9ac249e7e7c3a6747d72e7c14682f6f295ec179b

Authored by Jay Berkenbilt
1 parent f62bec3e

add damaged stream test case

git-svn-id: svn+q:///qpdf/trunk@664 71b93d88-0707-0410-a8cf-f5a4172ac649
qpdf/qtest/qpdf.test
@@ -338,7 +338,7 @@ for (my $n = 16; $n <= 19; ++$n) @@ -338,7 +338,7 @@ for (my $n = 16; $n <= 19; ++$n)
338 show_ntests(); 338 show_ntests();
339 # ---------- 339 # ----------
340 $td->notify("--- Specific File Tests ---"); 340 $td->notify("--- Specific File Tests ---");
341 -$n_tests += 2; 341 +$n_tests += 3;
342 $n_compare_pdfs += 1; 342 $n_compare_pdfs += 1;
343 343
344 # Special PDF files that caused problems at some point 344 # Special PDF files that caused problems at some point
@@ -361,6 +361,11 @@ $td->runtest("convert to qdf", @@ -361,6 +361,11 @@ $td->runtest("convert to qdf",
361 361
362 compare_pdfs("old-and-complex.pdf", "a.qdf"); 362 compare_pdfs("old-and-complex.pdf", "a.qdf");
363 363
  364 +$td->runtest("damaged stream",
  365 + {$td->COMMAND => "qpdf --check damaged-stream.pdf"},
  366 + {$td->FILE => "damaged-stream.out", $td->EXIT_STATUS => 3},
  367 + $td->NORMALIZE_NEWLINES);
  368 +
364 show_ntests(); 369 show_ntests();
365 # ---------- 370 # ----------
366 $td->notify("--- Mutability Tests ---"); 371 $td->notify("--- Mutability Tests ---");
qpdf/qtest/qpdf/damaged-stream.out 0 → 100644
  1 +checking damaged-stream.pdf
  2 +File is not encrypted
  3 +File is not linearized
  4 +WARNING: damaged-stream.pdf: offset 426: error decoding stream data for object 5 0: LZWDecoder: bad code received
qpdf/qtest/qpdf/damaged-stream.pdf 0 → 100644
No preview for this file type