[libcxx] [test] Fix the locale ctype widen tests on Windows
authorMartin Storsjö <martin@martin.st>
Thu, 20 Jan 2022 22:38:52 +0000 (22:38 +0000)
committerMartin Storsjö <martin@martin.st>
Tue, 5 Apr 2022 17:06:44 +0000 (20:06 +0300)
commit6efda5e6d6531ced6e35ccb3f6499ca13b8edb60
tree4ce8e6bdad4354bed16d9061ef0feaeebd40da4a
parent357afd952852db0be3f690f8b647bd4b02f38cad
[libcxx] [test] Fix the locale ctype widen tests on Windows

On Windows, like on macOS and FreeBSD, widening char(-5) in the
"C" locale succeeds and produces L'\u00fb'.

Switch widen_many to test \xfb instead of \x85; the mingw
version of btowc widens \x85 in the "C" locale into
\u2026 (which is the corresponding character according to the
Windows-1252 codepage), while Microsoft CRT's btowc widens it
into \u0085 (just like macOS and FreeBSD). Switch this to test \xfb
which is the character tested by the widen_1 test (as `char(-5)`),
which gets handled the same by all Windows implementations of btowc.

Differential Revision: https://reviews.llvm.org/D121003
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp