pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1688514 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/PDFMergerUtilityTest.java
Date Tue, 30 Jun 2015 20:03:24 GMT
Author: tilman
Date: Tue Jun 30 20:03:23 2015
New Revision: 1688514

URL: http://svn.apache.org/r1688514
Log:
PDFBOX-2847: use scratchFile for mergeDocumentsNonSeq, as suggested by Jim deVos

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=1688514&r1=1688513&r2=1688514&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
Tue Jun 30 20:03:23 2015
@@ -60,12 +60,20 @@ public class PDFMergerUtilityTest extend
     {
         checkMergeIdentical("PDFBox.GlobalResourceMergeTest.Doc01.decoded.pdf",
                 "PDFBox.GlobalResourceMergeTest.Doc02.decoded.pdf",
-                "GlobalResourceMergeTestResult.pdf");
+                "GlobalResourceMergeTestResult.pdf", 
+                false);
+        
+        // once again, with scratch file
+        checkMergeIdentical("PDFBox.GlobalResourceMergeTest.Doc01.decoded.pdf",
+                "PDFBox.GlobalResourceMergeTest.Doc02.decoded.pdf",
+                "GlobalResourceMergeTestResult2.pdf", 
+                true);
     }
 
     // checks that the result file of a merge has the same rendering as the two
     // source files
-    private void checkMergeIdentical(String filename1, String filename2, String mergeFilename)
+    private void checkMergeIdentical(String filename1, String filename2, String mergeFilename,

+            boolean useScratchFiles)
             throws IOException
     {
         PDDocument srcDoc1 = PDDocument.load(new File(SRCDIR, filename1), null);
@@ -92,7 +100,7 @@ public class PDFMergerUtilityTest extend
         pdfMergerUtility.addSource(new File(SRCDIR, filename1));
         pdfMergerUtility.addSource(new File(SRCDIR, filename2));
         pdfMergerUtility.setDestinationFileName(TARGETTESTDIR + mergeFilename);
-        pdfMergerUtility.mergeDocuments();
+        pdfMergerUtility.mergeDocuments(useScratchFiles);
 
         PDDocument mergedDoc
                 = PDDocument.load(new File(TARGETTESTDIR, mergeFilename), null);



Mime
View raw message