diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2011-01-07 21:22:40 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2011-01-07 21:22:40 +0000 |
commit | dfa4c54704d8c10499557fd6dc2ab4312aa84a2c (patch) | |
tree | a1ef04132898d347d5259f0b84b884bacaeda784 /test/java/org/apache/fop/text | |
parent | 4de3abbc235c7e7d8efa0bc9bfd2bfa701e1767b (diff) | |
download | xmlgraphics-fop-dfa4c54704d8c10499557fd6dc2ab4312aa84a2c.tar.gz xmlgraphics-fop-dfa4c54704d8c10499557fd6dc2ab4312aa84a2c.zip |
Bugzilla 50471: Avoid ArrayIndexOutOfBoundsException for codepoints without a linebreak class
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1056518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/text')
-rw-r--r-- | test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java | 6 | ||||
-rw-r--r-- | test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java b/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java index 8d2936127..e9b2ff90d 100644 --- a/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java +++ b/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java @@ -320,6 +320,12 @@ public class LineBreakStatusTest extends TestCase { "^^^^^^" + "^" + "_^^^^" )); + // Unassigned codepoint: should yield same result as AL + assertTrue(testBreak( + "No" + "\u1F7E" + "break", + "^^" + "^" + "^^^^^" + )); + } /** diff --git a/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java b/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java index 31ad950c7..bb6d209c2 100644 --- a/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java +++ b/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java @@ -41,6 +41,7 @@ public class LineBreakUtilsTest extends TestCase { assertEquals(LineBreakUtils.getLineBreakProperty('\n'), LineBreakUtils.LINE_BREAK_PROPERTY_LF); assertEquals(LineBreakUtils.getLineBreakProperty('\r'), LineBreakUtils.LINE_BREAK_PROPERTY_CR); assertEquals(LineBreakUtils.getLineBreakProperty('('), LineBreakUtils.LINE_BREAK_PROPERTY_OP); + assertEquals(LineBreakUtils.getLineBreakProperty('\u1F7E'), 0); } public void testLineBreakPair() { |