Skip to content

Commit

Permalink
Expand fallback test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Feb 28, 2024
1 parent 21d4347 commit a31a070
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ void fallbackLocale() {
CommandSender::locale
);

when(this.commandSender.locale()).thenReturn(Locale.forLanguageTag("es"));
when(this.commandSender.locale()).thenReturn(new Locale("es", "MX", ""));

assertThat(bundle.provide(Caption.of("present"), this.commandSender)).isEqualTo("ES");
assertThat(bundle.provide(Caption.of("present"), this.commandSender)).isEqualTo("ES_MX");
assertThat(bundle.provide(Caption.of("present1"), this.commandSender)).isEqualTo("ES1");
assertThat(bundle.provide(Caption.of("missing"), this.commandSender)).isEqualTo("ENGLISH FALLBACK");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
present=EN
present1=EN1
missing=ENGLISH FALLBACK
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
present=ES
present1=ES1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
present=ES_MX

0 comments on commit a31a070

Please sign in to comment.