-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add test for non invariant default locale and collation #3759
Conversation
|
@dotnet-bot test this please |
|
@dotnet-bot test this please (after Jenkins changes related to setting culture-related env vars) |
|
@dotnet-bot test this please |
|
@steveharter, given what we saw today with Jenkins and the various LANG/LC_*/etc. env vars, are there any additional tests we can/should add to validate behavior in such cases in the future? |
037f07c to
5e7f8e7
Compare
|
@stephentoub the other tests that were failing should probably be using Invariant culture explicitly and not assume en-us or other compatible culture for string formatting... For now, however, we could verify en-us in this test. |
|
FWIW, the default locale if no LANG is set is to use en-US-POSIX which has different default formatting settings than en-US or invariant. |
|
Four potential ways to address:
|
|
@ellismg do you have thoughts on the best way to address. I prefer option 2 (change tests to use invariant) and\or option 3 (verify en-us in unit test). Thanks |
|
FYI the list of tests that assume en-us or invariant (UPDATE: some of these tests fail due to unrelated case-insensitive string comparison failing for en-US-POSIX) |
|
I would prefer if these tests use Invariant. |
|
Should we merge these test changes, and then address the non-invariant issue separately? |
|
Added issue #3850 to address the tests listed above. I will merge this pull request once I get the OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pre-existing, but we should probably be resetting the current culture in a finally block. That way, if there's a bug that causes one of the asserts to fail, subsequent tests won't be thrown off by the change.
|
One pre-existing nit, otherwise LGTM. |
Add test for non invariant default locale and collation
…leTest Add test for non invariant default locale and collation Commit migrated from dotnet/corefx@839706d
No description provided.