diff options
Diffstat (limited to 'harmony-tests/src/test')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ChoiceFormatTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ChoiceFormatTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ChoiceFormatTest.java index 63232ae..d52e586 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ChoiceFormatTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ChoiceFormatTest.java @@ -21,6 +21,7 @@ import java.text.ChoiceFormat; import java.text.FieldPosition; import java.text.MessageFormat; import java.text.ParsePosition; +import java.util.Locale; import junit.framework.TestCase; @@ -474,4 +475,15 @@ public class ChoiceFormatTest extends TestCase { assertEquals("-\u221E<are negative|0.0<are fractions|1.0#is one|1.0<is 1+|\u221E<are many.", fmt.toPattern()); } + + // http://b/19011159 + public void testEscapedPatternWithConsecutiveQuotes() { + ChoiceFormat format = new ChoiceFormat("0#1'2''3'''4''''."); + String formatted = format.format(0); + assertEquals("12'3'4''.", formatted); + + format = new ChoiceFormat("0#1'2''3'''''4''''."); + formatted = format.format(0); + assertEquals("12'3''4''.", formatted); + } } |