ICU-11250 Add test for SimplePatternFormatter.getPatternWithNoPlaceholders.

X-SVN-Rev: 36465
This commit is contained in:
Travis Keep 2014-09-11 17:31:56 +00:00
parent b2d06e91fc
commit 02f78e8bbb

View File

@ -70,6 +70,14 @@ public class SimplePatternFormatterTest extends TestFmwk {
SimplePatternFormatter.compile("{0} meter").format("1"));
}
public void TestGetPatternWithNoPlaceholders() {
assertEquals(
"",
"Templates and are here.",
SimplePatternFormatter.compile(
"Templates {1}{2} and {3} are here.").getPatternWithNoPlaceholders());
}
public void TestWithPlaceholders() {
SimplePatternFormatter fmt = SimplePatternFormatter.compile(
"Templates {2}{1} and {4} are out of order.");