On Cygwin 3.5.3, I see these test failures: FAIL: test-c32isalpha.sh FAIL: test-c32iscntrl.sh FAIL: test-c32isgraph.sh FAIL: test-c32islower.sh FAIL: test-c32isprint.sh FAIL: test-c32ispunct.sh FAIL: test-c32toupper.sh
Thanks to CONTINUE_AFTER_ASSERT, it's easy to find all the ASSERTs that fail. This patch fixes the failures: 2024-05-23 Bruno Haible <br...@clisp.org> c32is*, c32toupper tests: Avoid test failures on Cygwin. * tests/test-c32isalpha.c (main): Disable tests that fail on Cygwin 3.5.3. * tests/test-c32iscntrl.c (main): Likewise. * tests/test-c32isgraph.c (main): Likewise. * tests/test-c32islower.c (main): Likewise. * tests/test-c32isprint.c (main): Likewise. * tests/test-c32ispunct.c (main): Likewise. * tests/test-c32toupper.c (main): Likewise. diff --git a/tests/test-c32isalpha.c b/tests/test-c32isalpha.c index ef20460f5c..3e177d8c8d 100644 --- a/tests/test-c32isalpha.c +++ b/tests/test-c32isalpha.c @@ -229,7 +229,7 @@ main (int argc, char *argv[]) /* U+3001 IDEOGRAPHIC COMMA */ is = for_character ("\241\242", 2); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+FF11 FULLWIDTH DIGIT ONE */ is = for_character ("\243\261", 2); ASSERT (is == 0); diff --git a/tests/test-c32iscntrl.c b/tests/test-c32iscntrl.c index 11dd956ddd..a00209a5ac 100644 --- a/tests/test-c32iscntrl.c +++ b/tests/test-c32iscntrl.c @@ -182,7 +182,7 @@ main (int argc, char *argv[]) /* U+00A0 NO-BREAK SPACE */ is = for_character ("\201\060\204\062", 4); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun || defined __CYGWIN__) /* U+202E RIGHT-TO-LEFT OVERRIDE */ is = for_character ("\201\066\247\061", 4); ASSERT (is != 0); @@ -190,7 +190,7 @@ main (int argc, char *argv[]) /* U+3000 IDEOGRAPHIC SPACE */ is = for_character ("\241\241", 2); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun || defined __CYGWIN__) /* U+FEFF ZERO WIDTH NO-BREAK SPACE */ is = for_character ("\204\061\225\063", 4); ASSERT (is != 0); @@ -198,7 +198,7 @@ main (int argc, char *argv[]) /* U+20000 <CJK Ideograph> */ is = for_character ("\225\062\202\066", 4); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sun) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sun || defined __CYGWIN__) /* U+E0001 LANGUAGE TAG */ is = for_character ("\323\066\225\071", 4); ASSERT (is != 0); diff --git a/tests/test-c32isgraph.c b/tests/test-c32isgraph.c index 110397fe9f..1ea9f782b5 100644 --- a/tests/test-c32isgraph.c +++ b/tests/test-c32isgraph.c @@ -215,7 +215,7 @@ main (int argc, char *argv[]) /* U+2002 EN SPACE */ is = for_character ("\201\066\243\070", 4); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+202E RIGHT-TO-LEFT OVERRIDE */ is = for_character ("\201\066\247\061", 4); ASSERT (is == 0); @@ -223,7 +223,7 @@ main (int argc, char *argv[]) /* U+3000 IDEOGRAPHIC SPACE */ is = for_character ("\241\241", 2); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+FEFF ZERO WIDTH NO-BREAK SPACE */ is = for_character ("\204\061\225\063", 4); ASSERT (is == 0); @@ -233,7 +233,7 @@ main (int argc, char *argv[]) is = for_character ("\225\062\202\066", 4); ASSERT (is != 0); #endif - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+E0001 LANGUAGE TAG */ is = for_character ("\323\066\225\071", 4); ASSERT (is == 0); diff --git a/tests/test-c32islower.c b/tests/test-c32islower.c index 36c6102050..2fae4006e6 100644 --- a/tests/test-c32islower.c +++ b/tests/test-c32islower.c @@ -275,7 +275,7 @@ main (int argc, char *argv[]) /* U+00B2 SUPERSCRIPT TWO */ is = for_character ("\201\060\205\065", 4); ASSERT (is == 0); - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __CYGWIN__) /* U+00B5 MICRO SIGN */ is = for_character ("\201\060\205\070", 4); ASSERT (is == 0); diff --git a/tests/test-c32isprint.c b/tests/test-c32isprint.c index dfc9e59cd4..cab10ddbe9 100644 --- a/tests/test-c32isprint.c +++ b/tests/test-c32isprint.c @@ -216,7 +216,7 @@ main (int argc, char *argv[]) is = for_character ("\201\066\243\070", 4); ASSERT (is != 0); #endif - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+202E RIGHT-TO-LEFT OVERRIDE */ is = for_character ("\201\066\247\061", 4); ASSERT (is == 0); @@ -226,7 +226,7 @@ main (int argc, char *argv[]) is = for_character ("\241\241", 2); ASSERT (is != 0); #endif - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+FEFF ZERO WIDTH NO-BREAK SPACE */ is = for_character ("\204\061\225\063", 4); ASSERT (is == 0); @@ -236,7 +236,7 @@ main (int argc, char *argv[]) is = for_character ("\225\062\202\066", 4); ASSERT (is != 0); #endif - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+E0001 LANGUAGE TAG */ is = for_character ("\323\066\225\071", 4); ASSERT (is == 0); diff --git a/tests/test-c32ispunct.c b/tests/test-c32ispunct.c index 87360aa463..8d96f03b9c 100644 --- a/tests/test-c32ispunct.c +++ b/tests/test-c32ispunct.c @@ -316,7 +316,7 @@ main (int argc, char *argv[]) is = for_character ("\224\062\273\064", 4); ASSERT (is != 0); #endif - #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) + #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __CYGWIN__) /* U+E003A TAG COLON */ is = for_character ("\323\066\233\066", 4); ASSERT (is == 0); diff --git a/tests/test-c32toupper.c b/tests/test-c32toupper.c index 062b916c4f..740ccdca18 100644 --- a/tests/test-c32toupper.c +++ b/tests/test-c32toupper.c @@ -357,7 +357,7 @@ main (int argc, char *argv[]) mb = for_character ("\201\060\205\065", 4); ASSERT (mb.nbytes == 4); ASSERT (memcmp (mb.buf, "\201\060\205\065", 4) == 0); - #if !(defined __GLIBC__ || defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) || defined __NetBSD__) + #if !(defined __GLIBC__ || defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) || defined __NetBSD__ || defined __CYGWIN__) /* U+00B5 MICRO SIGN */ mb = for_character ("\201\060\205\070", 4); ASSERT (mb.nbytes == 4);