ICU-13148 Adding known-issue test case for #13148

X-SVN-Rev: 40094
This commit is contained in:
Shane Carr 2017-05-02 00:09:16 +00:00
parent 3a6c706388
commit 2f0ff0e601

View File

@ -5034,6 +5034,19 @@ public class NumberFormatTest extends TestFmwk {
}
}
@Test
public void Test13148() {
if (logKnownIssue("13148", "Currency separators used in non-currency parsing")) return;
DecimalFormat fmt = (DecimalFormat)NumberFormat.getInstance(new ULocale("en", "ZA"));
DecimalFormatSymbols symbols = fmt.getDecimalFormatSymbols();
symbols.setDecimalSeparator('.');
symbols.setGroupingSeparator(',');
fmt.setDecimalFormatSymbols(symbols);
ParsePosition ppos = new ParsePosition(0);
Number number = fmt.parse("300,000", ppos);
assertEquals("Should parse to 300000 using non-monetary separators: " + ppos, 300000L, number);
}
@Test
public void testPercentZero() {
DecimalFormat df = (DecimalFormat) NumberFormat.getPercentInstance();