1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-09-11 11:50:52 +03:00

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.
This commit is contained in:
Paul Eggert
2020-09-25 19:00:53 -07:00
parent 5f0a97fc50
commit 16cd53b1c0
3 changed files with 10 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
2020-09-25 Paul Eggert <eggert@cs.ucla.edu>
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

View File

@@ -5,6 +5,7 @@ tests/macros.h
Depends-on:
gettext-h
localcharset
wctype-h
configure.ac:

View File

@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wctype.h>
#if HAVE_DECL_ALARM
# include <unistd.h>
# include <signal.h>
@@ -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 (&regex, 0, sizeof regex);