summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-12-30 03:43:09 +0100
committerJay Berkenbilt <ejb@ql.org>2012-12-31 16:32:32 +0100
commit4fe6f61def5bee74a3f190d51e2a7c3d41a76ae4 (patch)
tree89341bfce5406c160e176de323f896a737ba53b7
parent4eccb9d87b793ad2b6e1532ef4c89ab9d2bb3a90 (diff)
downloadqpdf-4fe6f61def5bee74a3f190d51e2a7c3d41a76ae4.tar.zst
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.
-rw-r--r--qpdf/qtest/qpdf.test6
-rw-r--r--qpdf/qtest/qpdf/damaged-stream-c-check.out6
2 files changed, 10 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index cf73c992..db1c6033 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -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();
# ----------
diff --git a/qpdf/qtest/qpdf/damaged-stream-c-check.out b/qpdf/qtest/qpdf/damaged-stream-c-check.out
index b1723623..501806d2 100644
--- a/qpdf/qtest/qpdf/damaged-stream-c-check.out
+++ b/qpdf/qtest/qpdf/damaged-stream-c-check.out
@@ -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