diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-05-19 23:27:41 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-05-20 15:16:25 +0200 |
commit | 6c5e590673331aa685afe8aa997b0b7e64996004 (patch) | |
tree | 66f14ee6b4a5bb6bc1f6bfa006d40ec9c8760b74 /qpdf/qtest/specialized-filter.test | |
parent | 6f43bf8de36b08c55b172b4f4133c79657651666 (diff) | |
download | qpdf-6c5e590673331aa685afe8aa997b0b7e64996004.tar.zst |
Rename all test files: _ to -
Diffstat (limited to 'qpdf/qtest/specialized-filter.test')
-rw-r--r-- | qpdf/qtest/specialized-filter.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/qpdf/qtest/specialized-filter.test b/qpdf/qtest/specialized-filter.test new file mode 100644 index 00000000..284d5195 --- /dev/null +++ b/qpdf/qtest/specialized-filter.test @@ -0,0 +1,44 @@ +#!/usr/bin/env perl +require 5.008; +use warnings; +use strict; +use Digest::MD5; +use File::Copy; + +unshift(@INC, '.'); +require qpdf_test_helpers; + +chdir("qpdf") or die "chdir testdir failed: $!\n"; + +require TestDriver; + +cleanup(); + +my $td = new TestDriver('specialized-filter'); + +my $n_tests = 3; +my $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($td, "png-filters.pdf", "a.pdf"); + +$td->runtest("stream with tiff predictor", + {$td->COMMAND => "qpdf --check tiff-predictor.pdf"}, + {$td->FILE => "tiff-predictor.out", + $td->EXIT_STATUS => 0}, + $td->NORMALIZE_NEWLINES); + +cleanup(); +$td->report(calc_ntests($n_tests, $n_compare_pdfs)); |