]> git.donarmstrong.com Git - debbugs.git/blobdiff - Makefile
Set LC_ALL to an UTF-8 locale before running tests
[debbugs.git] / Makefile
index 19a074bb0abba18683d8e3c56cc5b2028c94b58f..3e48fc1fc28d45926a35493f2fa115d935532d3e 100644 (file)
--- 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:
-       PERLLIB=t/cover_lib/ cover -test
+       LC_ALL=$(UTF8_LOCALE) PERL5LIB=t/cover_lib/:. cover -test
 
 clean:
        if [ -e Makefile.perl ]; then \
@@ -72,8 +74,8 @@ $(var_dir)/spool/db-h $(scripts_dir) $(examples_dir) $(man8_dir); \
        $(install_data) scripts/errorlib $(scripts_dir)/errorlib
 
        # install examples
-       $(install_data) scripts/config $(examples_dir)/config
-       $(install_data) scripts/config.debian $(examples_dir)/config.debian
+       $(install_data) examples/config $(examples_dir)/config
+       $(install_data) examples/config.debian $(examples_dir)/config.debian
        $(install_data) scripts/text $(examples_dir)/text
        $(install_data) debian/crontab misc/nextnumber misc/Maintainers \
          misc/Maintainers.override misc/pseudo-packages.description \