Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package a session with locales #38

Open
2 tasks
MatthiasHinz opened this issue Jan 26, 2017 · 1 comment
Open
2 tasks

Package a session with locales #38

MatthiasHinz opened this issue Jan 26, 2017 · 1 comment

Comments

@MatthiasHinz
Copy link
Collaborator

Extends #6 and #33

When reproducing an R session also match the locales.
As shown in #33 (comment) locales are not reproduced yet

In Linux, the locale first has to be generated, if missing, and then configured as default or current locale. That seems not to be trivial, especially in non-interactive mode.

The R functions Sys.getlocale() and Sys.setlocale() may be helpful.

  • A sessionInfo can be reproduced with German locales (or anything other than the default)
  • Testthat file tests/testthat/test_sessioninfo_reproduce.R runs with test (uncomment corresponding lines):
test_that("the locales are the same ", {
  expect_equal(local_sessionInfo$locale, docker_sessionInfo$locale)
})

@nuest
Copy link
Member

nuest commented May 30, 2017

See also existing test boilerplate in test_sessioninfo_reproduce.R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants