summaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-05 23:18:46 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-06 02:07:13 +0200
commit08379321645133ba74dad4ce130055c087130bab (patch)
tree2a90eb01471f449d0b2876adfcb0c8cc224bec20 /qpdf
parent893d38b87e4ad6c6c55f49464f6b721c516ec878 (diff)
downloadqpdf-08379321645133ba74dad4ce130055c087130bab.tar.zst
Update documentation and test suite to lock in hard page copy
Issue #399 mentioned a use case for which qpdf has support, but the fact that it is supported was not documented or in the test suite, making it vulerable to accidental breakage.
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/qtest/qpdf.test15
-rw-r--r--qpdf/qtest/qpdf/deep-duplicate-pages.pdfbin0 -> 1287 bytes
2 files changed, 14 insertions, 1 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index e012b202..788ef2dc 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -2057,7 +2057,7 @@ foreach my $f (qw(page_api_2 direct-pages))
show_ntests();
# ----------
$td->notify("--- Merging and Splitting ---");
-$n_tests += 24;
+$n_tests += 26;
# Select pages from the same file multiple times including selecting
# twice from an encrypted file and specifying the password only the
@@ -2200,6 +2200,19 @@ $td->runtest("check output",
{$td->FILE => "a.pdf"},
{$td->FILE => "duplicate-pages.pdf"});
+# See https://github.com/qpdf/qpdf/issues/399 -- we don't want to
+# break this, especially if we ever implement deduplication of
+# identical streams.
+$td->runtest("force full page duplication",
+ {$td->COMMAND => "qpdf --static-id minimal.pdf" .
+ " --pages . ./minimal.pdf -- a.pdf"},
+ {$td->STRING => "", $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+$td->runtest("check output",
+ {$td->FILE => "a.pdf"},
+ {$td->FILE => "deep-duplicate-pages.pdf"});
+
+
show_ntests();
# ----------
$td->notify("--- Collating ---");
diff --git a/qpdf/qtest/qpdf/deep-duplicate-pages.pdf b/qpdf/qtest/qpdf/deep-duplicate-pages.pdf
new file mode 100644
index 00000000..2d273765
--- /dev/null
+++ b/qpdf/qtest/qpdf/deep-duplicate-pages.pdf
Binary files differ