mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-21 12:40:02 +00:00
ICU-10131 Add test for fallback prevention with empty set for JAVA.
X-SVN-Rev: 33754
This commit is contained in:
parent
cb0f19fc45
commit
e29ab729e8
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2dd62bbd4ef0fe4b89295bffdb22c67e718effb1ada3a5e28e516b7e3576adec
|
||||
size 724514
|
||||
oid sha256:afe332a33bed44b1fe7ae0665c82cbd68f6fac9d83dedf1d03a84780f021c56a
|
||||
size 724582
|
||||
|
|
|
@ -630,6 +630,20 @@ public final class ICUResourceBundleTest extends TestFmwk {
|
|||
warnln("could not load resource data: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void TestPreventFallback() {
|
||||
String noFallbackResource = "string_in_te_no_te_IN_fallback";
|
||||
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance("com/ibm/icu/dev/data/testdata","te_IN_NE",testLoader);
|
||||
try {
|
||||
rb.getStringWithFallback(noFallbackResource);
|
||||
fail("Expected MissingResourceException.");
|
||||
} catch (MissingResourceException e) {
|
||||
// Expected
|
||||
}
|
||||
rb.getStringWithFallback("string_only_in_te");
|
||||
rb = (ICUResourceBundle) UResourceBundle.getBundleInstance("com/ibm/icu/dev/data/testdata","te",testLoader);
|
||||
rb.getStringWithFallback(noFallbackResource);
|
||||
}
|
||||
|
||||
public void TestGetWithFallback(){
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue