]> arthur.barton.de Git - bup.git/commitdiff
test.sh: set LC_ALL=C for git fsck to avoid localized output
authorKarl-Philipp Richter <krichter@posteo.de>
Tue, 1 Sep 2020 19:09:03 +0000 (21:09 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sun, 22 Nov 2020 21:09:50 +0000 (15:09 -0600)
Observed on Ubuntu 20.04 with German as the primary language. The test
clearly parses output in English and since adapting the parsing to the
language of the test environment is not what the test tests,
specifying the language is the way to go.

The original problem can be reproduced via

  LC_ALL=de_DE.utf8  ./wvtest run t/test.sh

if your system has de_DE.utf8 avalilable.

Signed-off-by: Karl-Philipp Richter <krichter@posteo.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: adjust commit message; set LC_ALL=C just for
 fsck rather than setting LANGUAGE globally]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test.sh

index 3f578f1f38a103f9d058dc3ce25ad42a953c2a46..fb2002354a7e07fc7ab1af148b10172ab67defd4 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -51,7 +51,7 @@ WVSTART "save/git-fsck"
     #git prune
     WVPASS bup random 4k | WVPASS bup split -b
     (WVPASS cd "$top/t/sampledata" && WVPASS bup save -vvn master /) || exit $?
     #git prune
     WVPASS bup random 4k | WVPASS bup split -b
     (WVPASS cd "$top/t/sampledata" && WVPASS bup save -vvn master /) || exit $?
-    result="$(git fsck --full --strict 2>&1)" || exit $?
+    result="$(LC_ALL=C git fsck --full --strict 2>&1)" || exit $?
     n=$(echo "$result" |
         WVFAIL egrep -v 'dangling (commit|tree|blob)' |
         WVPASS tee -a /dev/stderr |
     n=$(echo "$result" |
         WVFAIL egrep -v 'dangling (commit|tree|blob)' |
         WVPASS tee -a /dev/stderr |