encode unicode chars in HSLF unit tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@543411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab160b0ca4
commit
c5a4a5b891
@ -277,7 +277,7 @@ public class TestBugs extends TestCase {
|
||||
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 @@ public class TestBugs extends TestCase {
|
||||
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 Scott’s B’Day… 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ if(false) {
|
||||
assertEquals(2, txt.length);
|
||||
|
||||
assertEquals(
|
||||
"I’m 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’m 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];
|
||||
|
Loading…
Reference in New Issue
Block a user