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