Set LC_COLLATE rather than LANG to override collation.

On a system with LC_COLLATE=C, this takes precedence over a non-C LANG
the test tries to impose and the test fails.

llvm-svn: 251131
This commit is contained in:
Tim Northover 2015-10-23 17:56:08 +00:00
parent a3cebaf5e9
commit a745ddd9a7
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
int main()
{
// Ensure that the default locale is not C. If it is, the second tests will fail.
putenv(const_cast<char*>("LANG=" LOCALE_en_US_UTF_8));
putenv(const_cast<char*>("LC_COLLATE=" LOCALE_en_US_UTF_8));
{
std::locale l(LOCALE_en_US_UTF_8);
{