From 6e2966216e4e0605508c5f5abd27c8dc44ff6b73 Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Fri, 19 Aug 2016 12:24:03 -0700 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ tests/test-c-strncasecmp.c | 3 +++ 2 files changed, 8 insertions(+) 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; } -- 2.39.5