programming-scala-book-code-examples icon indicating copy to clipboard operation
programming-scala-book-code-examples copied to clipboard

sbt test fails for wrong LANG

Open grisuji opened this issue 3 years ago • 3 comments

Hi :-) in the very beginning of the book (3rd edition), Chapter 1, Building the Code Examples, the recommended sbt test fails in case you have the wrong LANG set. In my case it was set to "de_DE.UTF-8" and the tests failed with:

[info] Passed: Total 7, Failed 0, Errors 0, Passed 7
[error] Failed: Total 233, Failed 7, Errors 0, Passed 226
[error] Failed tests:
[error]         progscala3.fp.combinators.PayrollSuite
[error]         progscala3.fp.curry.TupledFuncSuite
[error]         progscala3.dsls.payroll.PayrollSuite
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 2 s, completed 31.07.2021, 16:56:39

After changing it with export LANG="en_US.UTF-8"

the tests run successfull. Would be nice to have this mentioned in a short note, because it took me a few hours to find the reason.

Greetings Grisuji

grisuji avatar Jul 31 '21 15:07 grisuji

Curious! I tried export LANG="de_DE.UTF-8; sbt test and it worked fine, but that just mean it doesn't always "respect" the setting. I'll add a troubleshooting note to the README. Sorry you wasted a few hours on this, but thanks for reporting it.

deanwampler avatar Aug 02 '21 00:08 deanwampler

I pushed an update to the README.

deanwampler avatar Aug 02 '21 00:08 deanwampler

@grisuji I just merged PR 42, https://github.com/deanwampler/programming-scala-book-code-examples/pull/42, which should fix this issue. Let me know if you still have problems.

deanwampler avatar Nov 06 '21 14:11 deanwampler