Skip to content

Commit

Permalink
Use a more sensible locale in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Oct 8, 2023
1 parent bf497ac commit 397e8f1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/chrono-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ TEST(chrono_test, unsigned_duration) {
}

TEST(chrono_test, weekday) {
auto loc = get_locale("ru_RU.UTF-8");
auto loc = get_locale("es_ES.UTF-8");
std::locale::global(loc);
auto mon = fmt::weekday(1);

Expand All @@ -754,10 +754,9 @@ TEST(chrono_test, weekday) {
EXPECT_EQ(fmt::format("{:%a}", tm), "Mon");

if (loc != std::locale::classic()) {
EXPECT_THAT((std::vector<std::string>{"пн", "Пн", "пнд", "Пнд"}),
Contains(fmt::format(loc, "{:L}", mon)));
EXPECT_THAT((std::vector<std::string>{"пн", "Пн", "пнд", "Пнд"}),
Contains(fmt::format(loc, "{:%a}", tm)));
auto mondays = std::vector<std::string>{"lun"};
EXPECT_THAT(mondays, Contains(fmt::format(loc, "{:L}", mon)));
EXPECT_THAT(mondays, Contains(fmt::format(loc, "{:%a}", tm)));
}
}

Expand Down

0 comments on commit 397e8f1

Please sign in to comment.