From abb4f72db0baf9bc9fa01664ca4f45b17d47fadf Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 21 Aug 2016 09:46:32 +0000 Subject: [PATCH] Set LC_ALL to an UTF-8 locale before running tests To avoid noisy warnings from some tests that implicitly expect to be run under an UTF-8 locale. Signed-off-by: Niels Thykier --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3e6dd58..3e48fc1 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ install_exec := install -m755 -p install_data := install -m644 -p PERL ?= /usr/bin/perl +# Some tests need to run under an UTF-8 locale. +UTF8_LOCALE ?= C.UTF-8 all: build test @@ -32,13 +34,13 @@ build: $(MAKE) -f Makefile.perl test: - $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))' + LC_ALL=$(UTF8_LOCALE) $(PERL) -MTest::Harness -I. -e 'runtests(glob(q(t/*.t)))' test_%: t/%.t - $(PERL) -MTest::Harness -I. -e 'runtests(q($<))' + LC_ALL=$(UTF8_LOCALE) $(PERL) -MTest::Harness -I. -e 'runtests(q($<))' testcover: - PERL5LIB=t/cover_lib/:. cover -test + LC_ALL=$(UTF8_LOCALE) PERL5LIB=t/cover_lib/:. cover -test clean: if [ -e Makefile.perl ]; then \ -- 2.39.2