From f881f6ff62bba53448c5d8997287ea2e628b3a65 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 12 Oct 2015 12:24:41 +0200 Subject: Add dependencies on needed locales in each subdir tests (bug 18969) --- wcsmbs/Makefile | 13 +++++++++++++ wcsmbs/wcsmbs-tst1.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'wcsmbs') diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index dc72ba4..a59a005 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -51,6 +51,19 @@ tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ include ../Rules +ifeq ($(run-built-tests),yes) +LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 hr_HR.ISO-8859-2 \ + ja_JP.EUC-JP zh_TW.EUC-TW +include ../gen-locales.mk + +$(objpfx)tst-btowc.out: $(gen-locales) +$(objpfx)tst-c16c32-1.out: $(gen-locales) +$(objpfx)tst-mbrtowc.out: $(gen-locales) +$(objpfx)tst-mbrtowc2.out: $(gen-locales) +$(objpfx)tst-wcrtomb.out: $(gen-locales) +$(objpfx)wcsmbs-tst1.out: $(gen-locales) +endif + CFLAGS-wcwidth.c = -I../wctype CFLAGS-wcswidth.c = -I../wctype diff --git a/wcsmbs/wcsmbs-tst1.c b/wcsmbs/wcsmbs-tst1.c index 9cdef45..0d0e18f 100644 --- a/wcsmbs/wcsmbs-tst1.c +++ b/wcsmbs/wcsmbs-tst1.c @@ -18,7 +18,7 @@ main (void) char str[] = "Hello"; int result = 0; - pchar = setlocale (LC_ALL, ""); + pchar = setlocale (LC_ALL, "de_DE.UTF-8"); printf ("locale : %s\n",pchar); printf ("MB_CUR_MAX %Zd\n", MB_CUR_MAX); -- cgit v1.1