You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/12/30 08:29:07 UTC

svn commit: r1849956 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java

Author: tilman
Date: Sun Dec 30 08:29:07 2018
New Revision: 1849956

URL: http://svn.apache.org/viewvc?rev=1849956&view=rev
Log:
PDFBOX-4417: test the individual file

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=1849956&r1=1849955&r2=1849956&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 Sun Dec 30 08:29:07 2018
@@ -264,7 +264,7 @@ public class PDFMergerUtilityTest extend
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
         dst.close();
-        checkStructTreeRootCount();
+        checkStructTreeRootCount(new File(TARGETTESTDIR, "PDFBOX-4408-merged.pdf"));
     }
 
     /**
@@ -286,7 +286,7 @@ public class PDFMergerUtilityTest extend
         checkWithNumberTree(dst);
         checkForPageOrphans(dst);
         dst.close();
-        checkStructTreeRootCount();
+        checkStructTreeRootCount(new File(TARGETTESTDIR, "PDFBOX-4417-001031-merged.pdf"));
     }
 
     /**
@@ -322,14 +322,13 @@ public class PDFMergerUtilityTest extend
 
         dst.close();
         
-        checkStructTreeRootCount();
+        checkStructTreeRootCount(new File(TARGETTESTDIR, "PDFBOX-4417-054080-merged.pdf"));
     }
 
     // PDFBOX-4417: check for multiple /StructTreeRoot entries that was due to
     // incorrect merging of /K entries
-    private void checkStructTreeRootCount() throws FileNotFoundException, IOException
+    private void checkStructTreeRootCount(File file) throws FileNotFoundException, IOException
     {
-        File file = new File(TARGETTESTDIR, "PDFBOX-4417-054080-merged.pdf");
         int count = 0;
         BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
         String line;