tests: Explicitly unset LANGUAGE after setting LC_ALL
authorSimon McVittie <smcv@collabora.com>
Tue, 19 Sep 2017 13:41:18 +0000 (14:41 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 19 Sep 2017 15:16:09 +0000 (15:16 +0000)
As a GNU extension, LANGUAGE takes precedence over LC_ALL for
gettext(3) whenever the locale is not C, causing tests that grep for
specific English strings to fail when run in non-English locales.
The upstream glibc proposal for C.UTF-8 would give C.UTF-8 the same
special case as C here, but the implementation in Debian does not
currently have this, so we have to unset LANGUAGE too.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Closes: #1188
Approved by: jlebon

tests/libtest-core.sh

index d0b7d372f0da9dbe64a81e057722205171031f8e..ce0e4bb10aa34d5598d9cd884514b042dfcb3346 100644 (file)
@@ -40,6 +40,8 @@ if locale -a | grep C.UTF-8 >/dev/null; then
 else
     export LC_ALL=C
 fi
+# A GNU extension, used whenever LC_ALL is not C
+unset LANGUAGE
 
 # This should really be the default IMO
 export G_DEBUG=fatal-warnings