File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libcxx/test/libcxx/utilities/text_encoding Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1515// UNSUPPORTED: android
1616// UNSUPPORTED: windows
1717
18+ #include < algorithm>
1819#include < cassert>
1920#include < cstdlib>
2021#include < text_encoding>
2122
2223#include " platform_support.h" // locale name macros
2324
2425int main (int , char **) {
25- // text_encoding::environment() is affected by changes to the "LANG" environment variable on POSIX systems.
26+ // text_encoding::environment() is (unfortunately) affected by changes to the "LANG" environment variable on POSIX systems.
2627 {
2728 setenv (" LANG" , LOCALE_fr_CA_ISO8859_1, 1 );
2829
2930 auto te = std::text_encoding::environment ();
3031
32+ assert (std::text_encoding::environment_is<std::text_encoding::id::ISOLatin1>());
3133 assert (te == std::text_encoding::environment ());
3234 assert (te.mib () == std::text_encoding::id::ISOLatin1);
33- assert (std::string_view (te.name ()) == " ISO_8859-1:1987" );
34-
35- assert (std::text_encoding::environment_is<std::text_encoding::id::ISOLatin1>());
35+ assert (std::ranges::contains (te.aliases (), std::string_view (" ISO_8859-1" )));
3636 }
3737}
You can’t perform that action at this time.
0 commit comments