From c623eeccd0cbd1cf59065d4a63a3cf760f12e43a Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Thu, 26 Sep 2019 15:28:20 -0400
Subject: [PATCH 109/109] fix: test: only set locale if C.utf8 is available
If it's not available, just roll with what's already set in the
environment and hope for the best. This fixes warnings on distros that
may not provide C.UTF-8.
(cherry picked from commit 933adbeb526d97855abc9644d2d93b3364efc7eb)
(cherry picked from commit 07a5378d33fd37f6ef375300fabcf7eea4f78801)
---
src/tests/functions.at | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tests/functions.at b/src/tests/functions.at
index 125a6e06ce6b..013ec098052c 100644
--- a/src/tests/functions.at
+++ b/src/tests/functions.at
@@ -52,10 +52,10 @@ m4_define([FWD_START_TEST], [
dnl We test some unicode strings and autotest overrides LC_ALL=C, so set it
dnl again for every test.
- LC_ALL="C.UTF-8"
- export LC_ALL
- LANGUAGE="C.UTF-8"
- export LANGUAGE
+ if locale -a |grep "^C.utf8" >/dev/null; then
+ LC_ALL="C.UTF-8"
+ export LC_ALL
+ fi
dnl start every test with the default config
if test "x${FIREWALLD_DEFAULT_CONFIG}" != x ; then
--
2.20.1