Skip to content

Fix tests when run under non English locales: - #554

Merged
vspinu merged 2 commits into
tidyverse:masterfrom
zeehio:fix_tests_in_other_locales
Jun 16, 2017
Merged

Fix tests when run under non English locales:#554
vspinu merged 2 commits into
tidyverse:masterfrom
zeehio:fix_tests_in_other_locales

Conversation

@zeehio

@zeehio zeehio commented Jun 16, 2017

Copy link
Copy Markdown
Contributor

The testsuite was failing on a computer with a non-English default locale. This PR fixes the tests so they work well under any locale.

  • days_in_month: As N_DAYS_IN_MONTHS has English month names, month() needs to be called with an English locale (the "C" locale is English and always available)

  • wday test: The wday in the test is compared with the English week day, so needs to be in English

  • "month accessor extracts correct month": Comparison with English month names, needs C locale as well

zeehio added 2 commits June 16, 2017 12:02
- days_in_month: As N_DAYS_IN_MONTHS has English month names, month() needs to be called with an English locale (the "C" locale is English and always available)

- wday test: The wday in the test is compared with the English week day, so needs to be in English

- "month accessor extracts correct month": Comparison with English month names, needs C locale as well
@vspinu
vspinu merged commit 9e5894a into tidyverse:master Jun 16, 2017
@vspinu

vspinu commented Jun 16, 2017

Copy link
Copy Markdown
Member

Thanks!

@zeehio
zeehio deleted the fix_tests_in_other_locales branch February 18, 2018 17:56
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.

2 participants