mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-10 04:43:00 +03:00
regex-tests: skip UTF-8 test on mingw
test-regex failed on mingw; and I traced it in gdb to an instance of init_dfa() setting dfa->is_utf8 to 0 in spite of setlocale() claiming success for "en_US.UTF-8". test-wcwidth already has precedent for skipping utf-8 tests where the system (or gnulib setlocale replacement, in this case) lies about utf-8 support. * modules/regex-tests (Depends-on): Add localcharset. * tests/test-regex.c (main): Use it to skip test on mingw. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2013-03-12 Eric Blake <eblake@redhat.com>
|
||||||
|
|
||||||
|
regex-tests: skip UTF-8 test on mingw
|
||||||
|
* modules/regex-tests (Depends-on): Add localcharset.
|
||||||
|
* tests/test-regex.c (main): Use it to skip test on mingw.
|
||||||
|
|
||||||
2013-03-11 Eric Blake <eblake@redhat.com>
|
2013-03-11 Eric Blake <eblake@redhat.com>
|
||||||
|
|
||||||
tests: make it easier to bypass alarm time in debugger
|
tests: make it easier to bypass alarm time in debugger
|
||||||
|
@@ -3,6 +3,7 @@ tests/test-regex.c
|
|||||||
tests/macros.h
|
tests/macros.h
|
||||||
|
|
||||||
Depends-on:
|
Depends-on:
|
||||||
|
localcharset
|
||||||
|
|
||||||
configure.ac:
|
configure.ac:
|
||||||
|
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "localcharset.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
@@ -65,6 +67,11 @@ main (void)
|
|||||||
result |= 1;
|
result |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check whether it's really a UTF-8 locale.
|
||||||
|
On mingw, the setlocale call succeeds but returns
|
||||||
|
"English_United States.1252", with locale_charset() returning
|
||||||
|
"CP1252". */
|
||||||
|
if (strcmp (locale_charset (), "UTF-8") == 0)
|
||||||
{
|
{
|
||||||
/* This test is from glibc bug 15078.
|
/* This test is from glibc bug 15078.
|
||||||
The test case is from Andreas Schwab in
|
The test case is from Andreas Schwab in
|
||||||
|
Reference in New Issue
Block a user