Message ID | 20240410152446.374524-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Adjust expected locale-dependent date formats in tests | expand |
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc index 6104349d254..b582967fddc 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc @@ -35,9 +35,9 @@ void test01() VERIFY( loc_de != loc_c ); istringstream iss; iss.imbue(loc_de); - iss.str("Di 1971"); - tm time1; - iss >> get_time(&time1, "%a %Y"); + iss.str("1971 Di."); // %a is "Di" on some targets, "Di." on others. + tm time1{}; + iss >> get_time(&time1, "%Y %a"); VERIFY(time1.tm_wday == 2); VERIFY(time1.tm_year == 71); } diff --git a/libstdc++-v3/testsuite/std/time/year_month_day/io.cc b/libstdc++-v3/testsuite/std/time/year_month_day/io.cc index cb82ef3b612..632b7a0fc2d 100644 --- a/libstdc++-v3/testsuite/std/time/year_month_day/io.cc +++ b/libstdc++-v3/testsuite/std/time/year_month_day/io.cc @@ -84,7 +84,7 @@ test_format() s = std::format(loc_fr, "{:%x}", 2022y/December/19); VERIFY( s == "12/19/22" ); s = std::format(loc_fr, "{:L%x}", 2022y/December/19); - VERIFY( s == "19/12/2022" ); + VERIFY( s == "19/12/2022" || s == "19.12.2022" ); // depends on locale defs s = std::format(loc_fr, "{}", 2022y/December/19); VERIFY( s == "2022-12-19" ); s = std::format(loc_fr, "{:L%F}", 2022y/December/19);