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.test18
1 files changed, 13 insertions, 5 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index 560bee07..e012b202 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -1698,6 +1698,8 @@ my @sp_cases = (
[11, '%d in middle', '--encrypt u o 128 --', 'a-%d-split-out.zdf'],
[11, 'pdf extension', '', 'split-out.Pdf'],
[4, 'fallback', '--pages 11-pages.pdf 1-3 minimal.pdf --', 'split-out'],
+ [1, 'broken data', '--pages broken-lzw.pdf --', 'split-out.pdf',
+ {$td->FILE => "broken-lzw.out", $td->EXIT_STATUS => 3}],
);
$n_tests += 35;
$n_compare_pdfs += 1;
@@ -1713,7 +1715,7 @@ $td->runtest("split page group > 1",
$td->NORMALIZE_NEWLINES);
foreach my $f ('01-05', '06-10', '11-11')
{
- $td->runtest("checkout group $f",
+ $td->runtest("check out group $f",
{$td->FILE => "split-out-group-$f.pdf"},
{$td->FILE => "split-exp-group-$f.pdf"});
}
@@ -1761,12 +1763,17 @@ foreach my $i (qw(01-10 11-20 21-30))
foreach my $d (@sp_cases)
{
- my ($n, $description, $xargs, $out) = @$d;
+ my ($n, $description, $xargs, $out, $exp) = @$d;
+ if (! defined $exp)
+ {
+ $exp = {$td->STRING => "", $td->EXIT_STATUS => 0};
+ }
$td->runtest("split pages " . $description,
{$td->COMMAND =>
"qpdf --static-id --split-pages 11-pages.pdf" .
" $xargs $out"},
- {$td->STRING => "", $td->EXIT_STATUS => 0});
+ $exp,
+ $td->NORMALIZE_NEWLINES);
my $pattern = $out;
my $nlen = length($n);
if ($pattern =~ m/\%d/)
@@ -1786,7 +1793,7 @@ foreach my $d (@sp_cases)
my $actual = sprintf($pattern, $i);
my $expected = $actual;
$expected =~ s/split-out/split-exp/;
- $td->runtest("checkout output page $i",
+ $td->runtest("check output page $i ($description)",
{$td->FILE => $actual},
{$td->FILE => $expected});
}
@@ -2390,7 +2397,8 @@ foreach my $d ([25, 1], [26, 2], [27, 3])
$td->runtest("copy objects $outn",
{$td->COMMAND => "test_driver $testn" .
" minimal.pdf copy-foreign-objects-in.pdf"},
- {$td->STRING => "test $testn done\n", $td->EXIT_STATUS => 0},
+ {$td->FILE => "copy-foreign-objects-$testn.out",
+ $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("check output",
{$td->FILE => "a.pdf"},