aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/qtest/qpdf.test
diff options
context:
space:
mode:
Diffstat (limited to 'qpdf/qtest/qpdf.test')
-rw-r--r--qpdf/qtest/qpdf.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index 2a8d20e7..6c88e098 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -2336,6 +2336,29 @@ $td->runtest("convert inline-images to qdf",
compare_pdfs("inline-images.pdf", "a.pdf");
show_ntests();
+
+
+# ----------
+$td->notify("--- PNG filtering Tests ---");
+$n_tests += 2;
+$n_compare_pdfs += 1;
+
+# The PDF file was submitted on bug #83 on github. All the PNG filters
+# are exercised. The test suite does not exercise PNG predictors with
+# LZW because I don't have a way to create such a file, but it's very
+# likely that it will work since the handling of the PNG filters is
+# separate from the regular decompression.
+$td->runtest("decode png-filtering",
+ {$td->COMMAND => "qpdf --static-id" .
+ " --compress-streams=n --decode-level=generalized" .
+ " png-filters.pdf a.pdf"},
+ {$td->STRING => "", $td->EXIT_STATUS => 0});
+$td->runtest("check output",
+ {$td->FILE => "a.pdf"},
+ {$td->FILE => "png-filters-decoded.pdf"});
+compare_pdfs("png-filters.pdf", "a.pdf");
+
+show_ntests();
# ----------
$td->notify("--- fix-qdf Tests ---");
$n_tests += 5;