From: Daniel Richard G Date: Fri, 19 Aug 2016 19:24:03 +0000 (-0700) Subject: c-strcase-tests: port to EBCDIC X-Git-Tag: v1.0~6677 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6e2966216e4e0605508c5f5abd27c8dc44ff6b73;p=gnulib.git c-strcase-tests: port to EBCDIC * tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls which assume ASCII encoding semantics to run only in ASCII mode, as they fail in EBCDIC. --- diff --git a/ChangeLog b/ChangeLog index 1cc8266405..ac8187d488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2016-08-19 Daniel Richard G. + c-strcase-tests: port to EBCDIC + * tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls + which assume ASCII encoding semantics to run only in ASCII + mode, as they fail in EBCDIC. + sigpipe-tests: fix typo * tests/test-sigpipe.sh: C, not B. diff --git a/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c index 1ca42d89d0..349f6b3098 100644 --- a/tests/test-c-strncasecmp.c +++ b/tests/test-c-strncasecmp.c @@ -19,6 +19,7 @@ #include #include "c-strcase.h" +#include "c-ctype.h" #include #include @@ -71,9 +72,11 @@ main (int argc, char *argv[]) ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */ +#if C_CTYPE_ASCII /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0); ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0); +#endif return 0; }