LocaleEditor supports BCP 47 language tags as well
Closes gh-33348
This commit is contained in:
@@ -648,6 +648,10 @@ class CustomEditorTests {
|
||||
assertThat(localeEditor.getValue()).isEqualTo(Locale.CANADA);
|
||||
assertThat(localeEditor.getAsText()).isEqualTo("en_CA");
|
||||
|
||||
localeEditor = new LocaleEditor();
|
||||
localeEditor.setAsText("zh-Hans");
|
||||
assertThat(localeEditor.getValue()).isEqualTo(Locale.forLanguageTag("zh-Hans"));
|
||||
|
||||
localeEditor = new LocaleEditor();
|
||||
assertThat(localeEditor.getAsText()).isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user