about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-02-01 23:34:28 +0000
committerEric Wong <e@80x24.org>2022-02-03 19:44:58 +0000
commit303c3507b4aefc0e08d792de02357ea9ab0fc322 (patch)
tree20241712c6388f50405d3bdd09959c63e6492a39
parent760c225c3831a9164f11ddf9d5318ad6c3f84bb8 (diff)
downloadpublic-inbox-303c3507b4aefc0e08d792de02357ea9ab0fc322.tar.gz
git-config(1) error messages are locale-dependent, so follow
the lead taken by git's own test suite and set LC_ALL=C and LANG=C
to ensure error messages we check against are not localized.

Reported-by: Julien Moutinho <julm+public-inbox@sourcephile.fr>
-rw-r--r--lib/PublicInbox/TestCommon.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 052d6e45..ca732811 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -568,6 +568,7 @@ SKIP: {
         delete $ENV{XDG_CACHE_HOME};
         $ENV{GIT_COMMITTER_EMAIL} = 'lei@example.com';
         $ENV{GIT_COMMITTER_NAME} = 'lei user';
+        $ENV{LANG} = $ENV{LC_ALL} = 'C';
         my (undef, $fn, $lineno) = caller(0);
         my $t = "$fn:$lineno";
         state $lei_daemon = PublicInbox::Spawn->can('send_cmd4') ||