Skip to content

Conversation

@thinkbeforecoding
Copy link
Contributor

Fix culture sensitive tests. Fix #13212

Some tests run FCS in process, in this case it uses the SetUICulture and SetCulture attributes.

For tests that run Fsc or Fsi as an external exe, it adds the --preferreduilang to force the culture.

Some tests still failed because the SR module caches the CurrentUICulture. In Fsi, an early call to SR.GetString is done before changing the culture indicated by the preferreduilang flag, so the local machine's default culture is cached for some error messages instead of using indicated culture. This as been fix by using CurrentUICulture directly.

Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @thinkbeforecoding, are the tests passing on your locale now, shall we merge it, or do you have any other changes pending?

@thinkbeforecoding
Copy link
Contributor Author

You can merge it.
There are still 2 test failing locally but this is not related to culture. If I find why I will open a different PR.

@vzarytovskii vzarytovskii merged commit e6b9dc6 into dotnet:main Jun 3, 2022
@thinkbeforecoding
Copy link
Contributor Author

🎉

@thinkbeforecoding thinkbeforecoding deleted the contrib/culture branch June 3, 2022 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Culture sensitive tests

3 participants