summaryrefslogtreecommitdiffstats
path: root/qpdf/qtest/qpdf.test
diff options
context:
space:
mode:
Diffstat (limited to 'qpdf/qtest/qpdf.test')
-rw-r--r--qpdf/qtest/qpdf.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index cad3633c..0fe27d79 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -1739,6 +1739,28 @@ $td->runtest("check output",
show_ntests();
# ----------
+$td->notify("--- Collating ---");
+my @collate = (
+ ["three-files", "collate-odd",
+ "collate-odd.pdf 1-5 minimal.pdf collate-even.pdf 7-1"],
+ );
+$n_tests += 2 * scalar(@collate);
+
+foreach my $d (@collate)
+{
+ my ($description, $first, $args) = @$d;
+ $td->runtest("collate pages: $description",
+ {$td->COMMAND =>
+ "qpdf --qdf --static-id --collate $first.pdf" .
+ " --pages $args -- a.pdf"},
+ {$td->STRING => "", $td->EXIT_STATUS => 0});
+ $td->runtest("check output",
+ {$td->FILE => "a.pdf"},
+ {$td->FILE => "$description-collate-out.pdf"});
+}
+
+show_ntests();
+# ----------
$td->notify("--- PDF From Scratch ---");
$n_tests += 2;