From: Karl-Philipp Richter Date: Tue, 1 Sep 2020 19:09:03 +0000 (+0200) Subject: test.sh: set LC_ALL=C for git fsck to avoid localized output X-Git-Tag: 0.32~26 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=b7d094edf89cd34c14344cc37e413b4a1d6d64be test.sh: set LC_ALL=C for git fsck to avoid localized output 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 Reviewed-by: Rob Browning [rlb@defaultvalue.org: adjust commit message; set LC_ALL=C just for fsck rather than setting LANGUAGE globally] Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/t/test.sh b/t/test.sh index 3f578f1..fb20023 100755 --- 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 $? - 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 |