[libcxx-commits] [PATCH] D120979: [libcxx] [test] Skip the get/put long_double_ru_RU tests on Glibc < 2.27
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 6 14:12:16 PST 2022
mstorsjo updated this revision to Diff 413312.
mstorsjo added a comment.
Fix the no-localization CI configuration
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120979/new/
https://reviews.llvm.org/D120979
Files:
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
libcxx/utils/libcxx/test/features.py
Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -105,6 +105,18 @@
}
""")),
+ # Check for Glibc < 2.27, where the ru_RU.UTF-8 locale had
+ # mon_decimal_point == ".", which our tests don't handle.
+ Feature(name='glibc-old-ru_RU-decimal-point',
+ when=lambda cfg: not '_LIBCPP_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and not programSucceeds(cfg, """
+ #include <locale.h>
+ #include <string.h>
+ int main(int, char**) {
+ setlocale(LC_ALL, "ru_RU.UTF-8");
+ return strcmp(localeconv()->mon_decimal_point, ",");
+ }
+ """)),
+
# Whether Bash can run on the executor.
# This is not always the case, for example when running on embedded systems.
#
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
+// XFAIL: glibc-old-ru_RU-decimal-point
+
// <locale>
// class money_put<charT, OutputIterator>
Index: libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
+// XFAIL: glibc-old-ru_RU-decimal-point
+
// <locale>
// class money_get<charT, InputIterator>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120979.413312.patch
Type: text/x-patch
Size: 2228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220306/310954cb/attachment-0001.bin>
More information about the libcxx-commits
mailing list