gitu icon indicating copy to clipboard operation
gitu copied to clipboard

Tests fail if locale isn't "C"

Open Tmpod opened this issue 1 year ago • 2 comments

I know that, as a developer, I should probably avoid having my locale set to anything but C, however, I wonder if the tests could easily be tweaked to avoid relying on fixed English strings. Imagine those change between git versions, the tests would just stop passing.

For anyone having the same issue, this can be avoided by setting LC_ALL=C, like this:

LC_ALL=C cargo build

Tmpod avatar Mar 11 '24 11:03 Tmpod

This function already sets some env vars to have the tests not break: https://github.com/altsem/gitu/blob/37311850fc1a6292542295e12fb5481bf40e09a4/tests/helpers.rs#L125

altsem avatar Mar 11 '24 18:03 altsem

@Tmpod I pushed a commit to add this, fingers crossed it works. Ty for reporting it!

altsem avatar Mar 11 '24 18:03 altsem