pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1849928 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
Date Sat, 29 Dec 2018 16:27:56 GMT
Author: tilman
Date: Sat Dec 29 16:27:56 2018
New Revision: 1849928

URL: http://svn.apache.org/viewvc?rev=1849928&view=rev
Log:
PDFBOX-4417: add previously failing test

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java?rev=1849928&r1=1849927&r2=1849928&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
Sat Dec 29 16:27:56 2018
@@ -260,6 +260,28 @@ public class PDFMergerUtilityTest extend
         checkForPageOrphans(dst);
         dst.close();
     }
+
+    /**
+     * PDFBOX-4417: Same as the previous tests, but this one failed when the previous tests
+     * succeeded because of more bugs with cloning.
+     *
+     * @throws IOException
+     */
+    public void testStructureTreeMerge4() throws IOException
+    {
+        PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
+        PDDocument src = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
+        PDDocument dst = PDDocument.load(new File(SRCDIR, "PDFBOX-4417-001031.pdf"));
+        pdfMergerUtility.appendDocument(dst, src);
+        src.close();
+        dst.save(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
+        dst.close();
+        dst = PDDocument.load(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
+        checkWithNumberTree(dst);
+        checkForPageOrphans(dst);
+        dst.close();
+    }
+
     /**
      * PDFBOX-4408: Check that StructParent values are found in the ParentTree
      *



Mime
View raw message