pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1824536 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
Date Fri, 16 Feb 2018 17:24:48 GMT
Author: tilman
Date: Fri Feb 16 17:24:48 2018
New Revision: 1824536

URL: http://svn.apache.org/viewvc?rev=1824536&view=rev
Log:
PDFBOX-4106: remove CR

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java?rev=1824536&r1=1824535&r2=1824536&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/font/TestFontEmbedding.java
Fri Feb 16 17:24:48 2018
@@ -101,7 +101,7 @@ public class TestFontEmbedding extends T
     public void testCIDFontType2VerticalSubset() throws IOException
     {
         String text = "「ABC」";
-        String expectedExtractedtext = "「\r\nA\r\nB\r\nC\r\n」";
+        String expectedExtractedtext = "「\nA\nB\nC\n」";
         File pdf = new File(OUT_DIR, "CIDFontType2V.pdf");
 
         try (PDDocument document = new PDDocument())
@@ -133,9 +133,8 @@ public class TestFontEmbedding extends T
         }
 
         // Check text extraction
-        String extracted = getUnicodeText(pdf);
-// works only on windows?!        
-//        assertEquals(expectedExtractedtext, extracted.trim());
+        String extracted = getUnicodeText(pdf);        
+        assertEquals(expectedExtractedtext, extracted.replaceAll("\r", "").trim());
     }
 
     private String getUnicodeText(File file) throws IOException



Mime
View raw message