/* Test whether a basic tolower_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"); char c1 = 'X'; char c2 = 'x'; char c3 = tolower_l(c1, locale); if ( c3 != c2 ) errx(1, "tolower_l('%c') was not '%c'", c1, c2); return 0; }