summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src/test
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-02-18 17:16:03 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-18 17:16:04 +0000
commit83594c625358e4e91eca3f9147c9975786ebe23e (patch)
tree9d58e4d199209a3b02f1a31a6bae7aeddf2d9517 /harmony-tests/src/test
parent76f9f6402ffb9fd069f494d16a61b8652ec85c81 (diff)
parent0f702b5996488b8cc8cbe336e8098dd1b4de8dd3 (diff)
downloadlibcore-83594c625358e4e91eca3f9147c9975786ebe23e.zip
libcore-83594c625358e4e91eca3f9147c9975786ebe23e.tar.gz
libcore-83594c625358e4e91eca3f9147c9975786ebe23e.tar.bz2
Merge "Deal with quoted subformat patterns correctly."
Diffstat (limited to 'harmony-tests/src/test')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/text/MessageFormatTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/MessageFormatTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/MessageFormatTest.java
index 171f247..0920714 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/MessageFormatTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/MessageFormatTest.java
@@ -950,4 +950,12 @@ public class MessageFormatTest extends TestCase {
String res = MessageFormat.format("bgcolor=\"{10}\"", messageArgs);
assertEquals(res, "bgcolor=\"example10\"");
}
+
+ // http://b/19011159
+ public void test19011159() {
+ final String pattern = "ab{0,choice,0#1'2''3'''4''''.}yz";
+ final MessageFormat format = new MessageFormat(pattern, Locale.ENGLISH);
+ final Object[] zero0 = new Object[] { 0 };
+ assertEquals("ab12'3'4''.yz", format.format(zero0));
+ }
}