2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-16 09:37:08 +00:00
qpdf/qpdf/qtest/compression-level.test
2022-05-20 09:16:25 -04:00

30 lines
685 B
Perl

#!/usr/bin/env perl
require 5.008;
use warnings;
use strict;
unshift(@INC, '.');
require qpdf_test_helpers;
chdir("qpdf") or die "chdir testdir failed: $!\n";
require TestDriver;
cleanup();
my $td = new TestDriver('compression-level');
my $n_tests = 4;
check_pdf($td, "recompress with level",
"qpdf --static-id --recompress-flate --compression-level=9" .
" --object-streams=generate minimal.pdf",
"minimal-9.pdf", 0);
check_pdf($td, "recompress with level",
"qpdf --static-id --recompress-flate --compression-level=1" .
" --object-streams=generate minimal.pdf",
"minimal-1.pdf", 0);
cleanup();
$td->report($n_tests);