From 4dad408ead18ea3202e3745a34b566a363d39d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 23 Mar 2018 11:14:18 +0000 Subject: [PATCH] Use C.UTF-8 if available, and en_US.UTF-8 is available, otherwise do nothing and let the test break --- bin/tests/system/idna/tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/idna/tests.sh b/bin/tests/system/idna/tests.sh index b4aaf6e71b..19a086dff2 100644 --- a/bin/tests/system/idna/tests.sh +++ b/bin/tests/system/idna/tests.sh @@ -11,9 +11,13 @@ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh # Set known locale for the tests -LC_ALL="en_US.UTF-8" -export LC_ALL +if locale -a | grep -qE "^C\\.(UTF-8|utf8)"; then + LC_ALL="C.UTF-8" +elif locale -a | grep -qE "^en_US\\.(UTF-8|utf8)"; then + LC_ALL="en_US.UTF-8" +fi +export LC_ALL # This set of tests check the behavior of the IDNA options in "dig". #