/* Test whether a basic towlower_l invocation works. */ #include #include #include "../basic.h" int main(void) { locale_t locale = duplocale(LC_GLOBAL_LOCALE); if ( locale == (locale_t) 0 ) errx(1, "duplocale"); wchar_t wc1 = L'X'; wchar_t wc2 = L'x'; wchar_t wc3 = towlower_l(wc1, locale); if ( wc3 != wc2 ) errx(1, "towlower_l('%lc') was not '%lc'", wc1, wc2); return 0; }