From a1fbb4bd9781129fc5998e055ef47bdf28e4f0d8 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 3 May 2009 20:03:21 +0000 Subject: update test suite git-svn-id: svn+q:///qpdf/trunk@675 71b93d88-0707-0410-a8cf-f5a4172ac649 --- libqpdf/QPDF_Stream.cc | 2 ++ qpdf/qpdf.testcov | 1 + qpdf/qtest/qpdf.test | 9 ++++++++- qpdf/qtest/qpdf/fax-decode-parms.out | 4 ++++ qpdf/qtest/qpdf/fax-decode-parms.pdf | Bin 0 -> 1565966 bytes 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 qpdf/qtest/qpdf/fax-decode-parms.out create mode 100644 qpdf/qtest/qpdf/fax-decode-parms.pdf diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 51617e7d..5d12da32 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -145,6 +145,8 @@ QPDF_Stream::filterable(std::vector& filters, { // Ignore for now -- some filter types, like CCITTFaxDecode, // use types other than dictionary for this. + QTC::TC("qpdf", "QPDF_Stream ignore non-dictionary DecodeParms"); + filterable = false; } diff --git a/qpdf/qpdf.testcov b/qpdf/qpdf.testcov index 3110f76a..4c5e80d4 100644 --- a/qpdf/qpdf.testcov +++ b/qpdf/qpdf.testcov @@ -118,3 +118,4 @@ unable to filter 0 QPDF_String non-trivial UTF-16 0 QPDF xref overwrite object 0 QPDF decoding error warning 0 +QPDF_Stream ignore non-dictionary DecodeParms 0 diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test index de808d65..55f7c594 100644 --- a/qpdf/qtest/qpdf.test +++ b/qpdf/qtest/qpdf.test @@ -81,7 +81,7 @@ flush_tiff_cache(); show_ntests(); # ---------- $td->notify("--- Miscellaneous Tests ---"); -$n_tests += 3; +$n_tests += 4; foreach (my $i = 1; $i <= 3; ++$i) { @@ -91,6 +91,13 @@ foreach (my $i = 1; $i <= 3; ++$i) $td->NORMALIZE_NEWLINES); } +# Make sure we ignore decode parameters that we don't understand +$td->runtest("unknown decode parameters", + {$td->COMMAND => "qpdf --check fax-decode-parms.pdf"}, + {$td->FILE => "fax-decode-parms.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + show_ntests(); # ---------- $td->notify("--- Error Condition Tests ---"); diff --git a/qpdf/qtest/qpdf/fax-decode-parms.out b/qpdf/qtest/qpdf/fax-decode-parms.out new file mode 100644 index 00000000..78c65c18 --- /dev/null +++ b/qpdf/qtest/qpdf/fax-decode-parms.out @@ -0,0 +1,4 @@ +checking fax-decode-parms.pdf +File is not encrypted +File is not linearized +No errors found diff --git a/qpdf/qtest/qpdf/fax-decode-parms.pdf b/qpdf/qtest/qpdf/fax-decode-parms.pdf new file mode 100644 index 00000000..2d8c336b Binary files /dev/null and b/qpdf/qtest/qpdf/fax-decode-parms.pdf differ -- cgit v1.2.3-70-g09d2