[libcxx] [test] Fix one failing part of dsl.sh.py on Windows.

Windows UCRT has got a bug in older versions (present in CI), where
it successfully does set a locale named
`for_sure_this_is_not_an_existing_locale`. By adjusting the tested
locale name to `forsurethisisnotanexistinglocale`, that test works
as expected, failing to set the locale.

The bug is reported upstream at
https://developercommunity.visualstudio.com/t/setlocale-succeeds-for-bogus-locale-names-in-older/1652241,
but as it already is working correctly in newer versions, no action
was prompted there.

We could of course add a bug detection in features.py like other
existing `broken-*` features, but that would seem kinda
pointless as it would be doing exactly what this test does.
Instead just adjust the tested dummy locale name.

This bit was approved to be committed on its own, in
https://reviews.llvm.org/D120546 (which is left open to follow up on
review of the rest of that patch).
This commit is contained in:
Martin Storsjö 2022-01-10 23:08:19 +00:00
parent f1d0d6f70c
commit acf20001a0
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ class TestHasLocale(SetupConfigs):
self.fail("checking for hasLocale should not explode")
def test_nonexistent_locale(self):
self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale']))
self.assertFalse(dsl.hasAnyLocale(self.config, ['forsurethisisnotanexistinglocale']))
def test_localization_program_doesnt_compile(self):
compilerIndex = findIndex(self.config.substitutions, lambda x: x[0] == '%{cxx}')