altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.74k stars 89 forks source link

Tests fail if locale isn't "C" #47

Closed Tmpod closed 5 months ago

Tmpod commented 6 months ago

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
altsem commented 6 months ago

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 commented 6 months ago

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