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
@ -286,14 +286,14 @@ public class TestBugs extends TestCase {
|
|||||||
assertEquals(4, runs.length);
|
assertEquals(4, runs.length);
|
||||||
|
|
||||||
HashSet txt = new HashSet();
|
HashSet txt = new HashSet();
|
||||||
txt.add("“HAPPY BIRTHDAY SCOTT”");
|
txt.add("\u201CHAPPY BIRTHDAY SCOTT\u201D");
|
||||||
txt.add("Have a HAPPY DAY");
|
txt.add("Have a HAPPY DAY");
|
||||||
txt.add("PS Nobody is allowed to hassle Scott TODAY…");
|
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’s B’Day… See you all there!");
|
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++) {
|
for (int i = 0; i < runs.length; i++) {
|
||||||
String text = runs[i].getRawText();
|
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(2, txt.length);
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"I’m a text box\r" +
|
"I\u2019m a text box\r" +
|
||||||
"With bullets\r" +
|
"With bullets\r" +
|
||||||
"That follow the design pattern\r" +
|
"That follow the design pattern\r" +
|
||||||
"From the slide master", txt[0].getRawText());
|
"From the slide master", txt[0].getRawText());
|
||||||
@ -499,7 +499,7 @@ if(false) {
|
|||||||
assertEquals('\u2022', rt.getBulletChar());
|
assertEquals('\u2022', rt.getBulletChar());
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"I’m a text box with user-defined\r" +
|
"I\u2019m a text box with user-defined\r" +
|
||||||
"bullet character", txt[1].getRawText());
|
"bullet character", txt[1].getRawText());
|
||||||
assertEquals(1, txt[1].getRichTextRuns().length);
|
assertEquals(1, txt[1].getRichTextRuns().length);
|
||||||
rt = txt[1].getRichTextRuns()[0];
|
rt = txt[1].getRichTextRuns()[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user