Skip to content

Commit

Permalink
[libcxx] [test] Add a 'win32-' prefix to the 'broken-utf8-wchar-ctype…
Browse files Browse the repository at this point in the history
…' feature

This was suggested in the review of https://reviews.llvm.org/D120022.

Also indent the code for the compilation test one step compared
to the surrounding expression.

Differential Revision: https://reviews.llvm.org/D120469
  • Loading branch information
mstorsjo committed Mar 1, 2022
1 parent 2614192 commit eb4dcc7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: locale.en_US.UTF-8
// XFAIL: broken-utf8-wchar-ctype
// XFAIL: win32-broken-utf8-wchar-ctype

// <locale>

Expand Down
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: locale.en_US.UTF-8
// XFAIL: broken-utf8-wchar-ctype
// XFAIL: win32-broken-utf8-wchar-ctype

// <locale>

Expand Down
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: locale.en_US.UTF-8
// XFAIL: broken-utf8-wchar-ctype
// XFAIL: win32-broken-utf8-wchar-ctype

// <locale>

Expand Down
Expand Up @@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//

// REQUIRES: locale.en_US.UTF-8
// XFAIL: broken-utf8-wchar-ctype
// XFAIL: win32-broken-utf8-wchar-ctype

// <locale>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
Expand Up @@ -13,7 +13,7 @@
// charT translate_nocase(charT c) const;

// REQUIRES: locale.en_US.UTF-8
// XFAIL: broken-utf8-wchar-ctype
// XFAIL: win32-broken-utf8-wchar-ctype

#include <regex>
#include <cassert>
Expand Down
14 changes: 7 additions & 7 deletions libcxx/utils/libcxx/test/features.py
Expand Up @@ -75,14 +75,14 @@

# Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0):
# https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678
Feature(name='broken-utf8-wchar-ctype',
Feature(name='win32-broken-utf8-wchar-ctype',
when=lambda cfg: '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
#include <locale.h>
#include <wctype.h>
int main(int, char**) {
setlocale(LC_ALL, "en_US.UTF-8");
return towlower(L'\\xDA') != L'\\xFA';
}
#include <locale.h>
#include <wctype.h>
int main(int, char**) {
setlocale(LC_ALL, "en_US.UTF-8");
return towlower(L'\\xDA') != L'\\xFA';
}
""")),

# Whether Bash can run on the executor.
Expand Down

0 comments on commit eb4dcc7

Please sign in to comment.