bats-assert testsuite fails in non English locales (+ no longer builds reproducibly)
Hi, after #89 (thanks!) bats-assert's tests run flawlessly in English-based, but fails in locales based in other languages.
The issue is that the various assert_line() --regexp tests check for the presence of a specific string that Bash produces only when run in an English-based locale.
This issue also breaks the reproducibility of the Debian packages (reproducible packages are supposed to successfully build under different locales).
There are two possible approaches to fix this issue:
-
Force the language inside the testsuite. This is what I'm doing in Debian. Regardless of the locale set in the environment, inside the testsuite everything will be run in English. In Debian I'm using
LC_ALL=C.UTF-8, butC.UTF-8may not be available in other systems (mac? win? musl?), so perhapsLC_ALL=Cworks better for you. -
Change the regexp tests to check something else than the text of the output.
Approach 2 is surely more robust, but I would suggest going for approach 1 because I don't see the a big advantage for bats-assert to extend its internal test coverage to non-English locales.