From: Paul Eggert Date: Sat, 26 Sep 2020 02:00:53 +0000 (-0700) Subject: regex-tests: fix possible Turkish false-alarm X-Git-Tag: v1.0~3603 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=16cd53b1c01cc6af9056735f83dcdd1e68491e0f;p=gnulib.git regex-tests: fix possible Turkish false-alarm * modules/regex-tests (Depends-on): Add wctype-h. * tests/test-regex.c: Include wctype.h. (main): Check that ‘i’ uppercases to ‘İ’ in Turkish, as the Turkish regex test assumes this. --- diff --git a/ChangeLog b/ChangeLog index 3ef9570e10..259f788f36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2020-09-25 Paul Eggert + regex-tests: fix possible Turkish false-alarm + * modules/regex-tests (Depends-on): Add wctype-h. + * tests/test-regex.c: Include wctype.h. + (main): Check that ‘i’ uppercases to ‘İ’ in Turkish, + as the Turkish regex test assumes this. + regex-tests: fix test and add debug output Perhaps this will fix the recent grep test failure reported at: https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/199 diff --git a/modules/regex-tests b/modules/regex-tests index 711632aa06..4b14f4724c 100644 --- a/modules/regex-tests +++ b/modules/regex-tests @@ -5,6 +5,7 @@ tests/macros.h Depends-on: gettext-h localcharset +wctype-h configure.ac: diff --git a/tests/test-regex.c b/tests/test-regex.c index 96def52f59..a54f643d83 100644 --- a/tests/test-regex.c +++ b/tests/test-regex.c @@ -24,6 +24,7 @@ #include #include #include +#include #if HAVE_DECL_ALARM # include # include @@ -141,7 +142,8 @@ main (void) return 1; } - if (setlocale (LC_ALL, "tr_TR.UTF-8") && really_utf8 ()) + if (setlocale (LC_ALL, "tr_TR.UTF-8") && really_utf8 () + && towupper (L'i') == 0x0130 /* U+0130; see below. */) { re_set_syntax (RE_SYNTAX_GREP | RE_ICASE); memset (®ex, 0, sizeof regex);