Author: yegor
Date: Fri Jun 1 00:06:51 2007
New Revision: 543411
URL: http://svn.apache.org/viewvc?view=rev&rev=543411
Log:
encode unicode chars in HSLF unit tests
Modified:
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
Modified:
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
URL:
http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java?view=diff&rev=543411&r1=543410&r2=543411
==============================================================================
---
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
(original)
+++
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
Fri Jun 1 00:06:51 2007
@@ -277,7 +277,7 @@
FileInputStream is = new FileInputStream(new File(cwd, "38256.ppt"));
SlideShow ppt = new SlideShow(is);
is.close();
-
+
assertTrue("No Exceptions while reading file", true);
Slide[] slide = ppt.getSlides();
@@ -286,14 +286,14 @@
assertEquals(4, runs.length);
HashSet txt = new HashSet();
- txt.add("HAPPY BIRTHDAY SCOTT");
+ txt.add("\u201CHAPPY BIRTHDAY SCOTT\u201D");
txt.add("Have a HAPPY DAY");
- txt.add("PS Nobody is allowed to hassle Scott TODAY
");
- txt.add("Drinks will be in the Boardroom at 5pm today to celebrate
Scotts BDay
See you all there!");
+ txt.add("PS Nobody is allowed to hassle Scott TODAY\u2026");
+ txt.add("Drinks will be in the Boardroom at 5pm today to celebrate
Scott\u2019s B\u2019Day\u2026 See you all there!");
for (int i = 0; i < runs.length; i++) {
String text = runs[i].getRawText();
- assertTrue(txt.contains(text));
+ assertTrue(text, txt.contains(text));
}
}
Modified:
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
URL:
http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java?view=diff&rev=543411&r1=543410&r2=543411
==============================================================================
---
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
(original)
+++
jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestRichTextRun.java
Fri Jun 1 00:06:51 2007
@@ -489,7 +489,7 @@
assertEquals(2, txt.length);
assertEquals(
- "Im 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 @@
assertEquals('\u2022', rt.getBulletChar());
assertEquals(
- "Im 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];
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]