summaryrefslogtreecommitdiff
path: root/tests/libtest-core.sh
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-11-20 14:51:04 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-14 14:18:44 +0000
commite48a1bcfe7e879479b3b608bd8607cad0dd14149 (patch)
tree314bc73424f103de103a4763064b51b1ea29dd7c /tests/libtest-core.sh
parent5d1753f59bace948f0763e5de533c22e6ed5304b (diff)
downloadostree-e48a1bcfe7e879479b3b608bd8607cad0dd14149.tar.gz
tests: Fix LC_ALL for systems which use .utf8 suffixes
libtest-core.sh tries to clear the locale to a UTF-8 supporting C locale, either by setting it to C.UTF-8 (preferred) or just C. Some systems, like Fedora 26, use the locale name C.utf8, rather than C.UTF-8. Support that too. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1347 Approved by: cgwalters
Diffstat (limited to 'tests/libtest-core.sh')
-rw-r--r--tests/libtest-core.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh
index ce0e4bb1..2144e1ac 100644
--- a/tests/libtest-core.sh
+++ b/tests/libtest-core.sh
@@ -37,6 +37,8 @@ assert_not_reached () {
# (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8)
if locale -a | grep C.UTF-8 >/dev/null; then
export LC_ALL=C.UTF-8
+elif locale -a | grep C.utf8 >/dev/null; then
+ export LC_ALL=C.utf8
else
export LC_ALL=C
fi