mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-09 12:50:05 +00:00
Fix locale tests on FreeBSD
This commit is contained in:
parent
894b71da85
commit
79e5ae919c
@ -763,7 +763,7 @@ TEST(chrono_test, weekday) {
|
|||||||
EXPECT_EQ(fmt::format("{:%a}", tm), "Sat");
|
EXPECT_EQ(fmt::format("{:%a}", tm), "Sat");
|
||||||
|
|
||||||
if (loc != std::locale::classic()) {
|
if (loc != std::locale::classic()) {
|
||||||
auto saturdays = std::vector<std::string>{"sáb", "sá."};
|
auto saturdays = std::vector<std::string>{"sáb", "sá.", "sáb."};
|
||||||
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:L}", sat)));
|
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:L}", sat)));
|
||||||
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:%a}", sat)));
|
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:%a}", sat)));
|
||||||
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:%a}", tm)));
|
EXPECT_THAT(saturdays, Contains(fmt::format(loc, "{:%a}", tm)));
|
||||||
|
@ -567,11 +567,9 @@ TEST(locale_test, chrono_weekday) {
|
|||||||
auto sat = fmt::weekday(6);
|
auto sat = fmt::weekday(6);
|
||||||
EXPECT_EQ(fmt::format(L"{}", sat), L"Sat");
|
EXPECT_EQ(fmt::format(L"{}", sat), L"Sat");
|
||||||
if (loc != std::locale::classic()) {
|
if (loc != std::locale::classic()) {
|
||||||
// L'\xE1' is 'á'.
|
// L'\341' is 'á'.
|
||||||
auto saturdays = std::vector<std::wstring>{
|
auto saturdays =
|
||||||
L"s\xE1"
|
std::vector<std::wstring>{L"s\341b", L"s\341.", L"s\341b."};
|
||||||
"b",
|
|
||||||
L"s\xE1."};
|
|
||||||
EXPECT_THAT(saturdays, Contains(fmt::format(loc, L"{:L}", sat)));
|
EXPECT_THAT(saturdays, Contains(fmt::format(loc, L"{:L}", sat)));
|
||||||
}
|
}
|
||||||
std::locale::global(loc_old);
|
std::locale::global(loc_old);
|
||||||
|
Loading…
Reference in New Issue
Block a user