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.test24
1 files changed, 22 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index b45f32a1..15b73e5f 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -1624,7 +1624,7 @@ foreach my $f (qw(screen print))
show_ntests();
# ----------
$td->notify("--- Merging and Splitting ---");
-$n_tests += 18;
+$n_tests += 22;
# Select pages from the same file multiple times including selecting
# twice from an encrypted file and specifying the password only the
@@ -1692,7 +1692,7 @@ $td->runtest("check output",
{$td->FILE => "a.pdf"},
{$td->FILE => "merge-multiple-labels.pdf"});
-$td->runtest("split with shared resources", # QXXXQ
+$td->runtest("split with shared resources",
{$td->COMMAND =>
"qpdf --qdf --static-id" .
" shared-images.pdf --pages . 1,3" .
@@ -1702,6 +1702,16 @@ $td->runtest("check output",
{$td->FILE => "a.pdf"},
{$td->FILE => "shared-images-pages-out.pdf"});
+$td->runtest("split with really shared resources",
+ {$td->COMMAND =>
+ "qpdf --qdf --static-id" .
+ " shared-images.pdf --pages . 1,3" .
+ " . 1,2 -- a.pdf"},
+ {$td->STRING => "", $td->EXIT_STATUS => 0});
+$td->runtest("check output",
+ {$td->FILE => "a.pdf"},
+ {$td->FILE => "really-shared-images-pages-out.pdf"});
+
$td->runtest("shared resources relevant errors",
{$td->COMMAND =>
"qpdf --qdf --static-id" .
@@ -1733,6 +1743,16 @@ $td->runtest("check output",
{$td->FILE => "a.pdf"},
{$td->FILE => "shared-images-errors-1-3-out.pdf"});
+$td->runtest("duplicate pages",
+ {$td->COMMAND =>
+ "qpdf --qdf --static-id 11-pages-with-labels.pdf" .
+ " --pages . 6,5,6 . 5 minimal.pdf 1,1 minimal.pdf 1 --" .
+ " a.pdf"},
+ {$td->STRING => "", $td->EXIT_STATUS => 0});
+$td->runtest("check output",
+ {$td->FILE => "a.pdf"},
+ {$td->FILE => "duplicate-pages.pdf"});
+
show_ntests();
# ----------
$td->notify("--- Collating ---");