]> source.dussan.org Git - poi.git/commitdiff
encode unicode chars in HSLF unit tests
authorYegor Kozlov <yegor@apache.org>
Fri, 1 Jun 2007 07:06:51 +0000 (07:06 +0000)
committerYegor Kozlov <yegor@apache.org>
Fri, 1 Jun 2007 07:06:51 +0000 (07:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@543411 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java

index cd1d9fd6b0df663a6d5db55faff32750bd3e1816..933aa176b7fcdbae347580271ee8391b9b643018 100644 (file)
@@ -277,7 +277,7 @@ public class TestBugs extends TestCase {
         FileInputStream is = new FileInputStream(new File(cwd, "38256.ppt"));\r
         SlideShow ppt = new SlideShow(is);\r
         is.close();\r
-\r
+         \r
         assertTrue("No Exceptions while reading file", true);\r
 \r
         Slide[] slide = ppt.getSlides();\r
@@ -286,14 +286,14 @@ public class TestBugs extends TestCase {
         assertEquals(4, runs.length);\r
 \r
         HashSet txt = new HashSet();\r
-        txt.add("\93HAPPY BIRTHDAY SCOTT\94");\r
+        txt.add("\u201CHAPPY BIRTHDAY SCOTT\u201D");\r
         txt.add("Have a HAPPY DAY");\r
-        txt.add("PS Nobody is allowed to hassle Scott TODAY\85");\r
-        txt.add("Drinks will be in the Boardroom at 5pm today to celebrate Scott\92s B\92Day\85  See you all there!");\r
+        txt.add("PS Nobody is allowed to hassle Scott TODAY\u2026");\r
+        txt.add("Drinks will be in the Boardroom at 5pm today to celebrate Scott\u2019s B\u2019Day\u2026  See you all there!");\r
 \r
         for (int i = 0; i < runs.length; i++) {\r
             String text = runs[i].getRawText();\r
-            assertTrue(txt.contains(text));\r
+            assertTrue(text, txt.contains(text));\r
         }\r
 \r
     }\r
index 2450c66c08c1a910c9dcef4820a54fcec95b878c..7561a5fe563bd2f86d645b17be6dfa94b2e60d74 100644 (file)
@@ -489,7 +489,7 @@ if(false) {
         assertEquals(2, txt.length);
 
         assertEquals(
-                "I\92m a text box\r" +
+                "I\u2019m a text box\r" +
                 "With bullets\r" +
                 "That follow the design pattern\r" +
                 "From the slide master", txt[0].getRawText());
@@ -499,7 +499,7 @@ if(false) {
         assertEquals('\u2022', rt.getBulletChar());
 
         assertEquals(
-                "I\92m a text box with user-defined\r" +
+                "I\u2019m a text box with user-defined\r" +
                 "bullet character", txt[1].getRawText());
         assertEquals(1, txt[1].getRichTextRuns().length);
         rt = txt[1].getRichTextRuns()[0];