Skip to content

Commit 2332d7a

Browse files
committed
Auto merge of #13935 - Urgau:local-independent-git-test, r=epage
Make `git::use_the_cli` test truly locale independent ### What does this PR try to resolve? The current `git::use_the_cli` test part the output of Git but that output is locale dependant, making it fail on my non-english system. Specifically this part of the test is local-dependent: ``` From [..] * [new ref] [..] -> origin/HEAD[..] ``` Adding the `LC_ALL=C` env to the cargo invocation solve the issue, making the test locale independent. ### How should we test and review this PR? Trying putting a different `LC_ALL` locale and the test will fail without this PR and will not fail with my PR.
2 parents c256d74 + 8fdac92 commit 2332d7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testsuite/git.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2831,7 +2831,11 @@ From [..]
28312831
[FINISHED] [..]
28322832
";
28332833

2834-
project.cargo("check -v").with_stderr(stderr).run();
2834+
project
2835+
.cargo("check -v")
2836+
.env("LC_ALL", "C")
2837+
.with_stderr(stderr)
2838+
.run();
28352839
assert!(paths::home().join(".cargo/git/CACHEDIR.TAG").is_file());
28362840
}
28372841

0 commit comments

Comments
 (0)