[libcxx] [test] XFAIL the get/put long_double_ru_RU tests on Glibc < 2.27

Those older versions used a different monetary decimal separator.
To avoid unnecessary churn to support that, just XFAIL the test
on those older versions. (Up until
df1e43c496, the whole test was XFAILed
on all versions of glibc.)

Differential Revision: https://reviews.llvm.org/D120979
This commit is contained in:
Martin Storsjö 2022-03-04 10:53:32 +02:00
parent abe46776f3
commit 9286a8238b
3 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
// XFAIL: glibc-old-ru_RU-decimal-point
// <locale>
// class money_get<charT, InputIterator>

View File

@ -11,6 +11,8 @@
// REQUIRES: locale.ru_RU.UTF-8
// XFAIL: glibc-old-ru_RU-decimal-point
// <locale>
// class money_put<charT, OutputIterator>

View File

@ -105,6 +105,18 @@ DEFAULT_FEATURES = [
}
""")),
# 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.
#