From b7d094edf89cd34c14344cc37e413b4a1d6d64be Mon Sep 17 00:00:00 2001 From: Karl-Philipp Richter Date: Tue, 1 Sep 2020 21:09:03 +0200 Subject: [PATCH] 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 --- t/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 | -- 2.39.2