]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_lei: use consistent locale for error messages
authorEric Wong <e@80x24.org>
Tue, 1 Feb 2022 23:34:28 +0000 (23:34 +0000)
committerEric Wong <e@80x24.org>
Thu, 3 Feb 2022 19:44:58 +0000 (19:44 +0000)
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>
lib/PublicInbox/TestCommon.pm

index 052d6e45e45b498809ec2a79cbc0731c66d78918..ca7328111dcc47dc974aa3d3e5e83549130f111c 100644 (file)
@@ -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') ||