Mercurial > gnulib
changeset 18369:996d4e2cd2dd
c-strcase-tests, wcwidth-tests: port to EBCDIC
* tests/test-c-strcasecmp.c: Include c-ctype.h.
(main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII.
* tests/test-wcwidth.c: Likewise.
author | Daniel Richard G <skunk@iSKUNK.ORG> |
---|---|
date | Wed, 17 Aug 2016 15:58:01 -0700 |
parents | 679194d50123 |
children | 5f84652c6d65 |
files | ChangeLog tests/test-c-strcasecmp.c tests/test-wcwidth.c |
diffstat | 3 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Aug 17 15:33:06 2016 -0700 +++ b/ChangeLog Wed Aug 17 15:58:01 2016 -0700 @@ -1,3 +1,10 @@ +2016-08-17 Daniel Richard G. <skunk@iSKUNK.ORG> + + c-strcase-tests, wcwidth-tests: port to EBCDIC + * tests/test-c-strcasecmp.c: Include c-ctype.h. + (main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII. + * tests/test-wcwidth.c: Likewise. + 2016-08-17 Paul Eggert <eggert@cs.ucla.edu> stdbool: don't require _Bool for C++
--- a/tests/test-c-strcasecmp.c Wed Aug 17 15:33:06 2016 -0700 +++ b/tests/test-c-strcasecmp.c Wed Aug 17 15:58:01 2016 -0700 @@ -19,6 +19,7 @@ #include <config.h> #include "c-strcase.h" +#include "c-ctype.h" #include <locale.h> #include <string.h> @@ -57,9 +58,11 @@ ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */ +#if C_CTYPE_ASCII /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0); ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0); +#endif return 0; }
--- a/tests/test-wcwidth.c Wed Aug 17 15:33:06 2016 -0700 +++ b/tests/test-wcwidth.c Wed Aug 17 15:58:01 2016 -0700 @@ -26,6 +26,7 @@ #include <locale.h> #include <string.h> +#include "c-ctype.h" #include "localcharset.h" #include "macros.h" @@ -34,9 +35,11 @@ { wchar_t wc; +#ifdef C_CTYPE_ASCII /* Test width of ASCII characters. */ for (wc = 0x20; wc < 0x7F; wc++) ASSERT (wcwidth (wc) == 1); +#endif /* Switch to an UTF-8 locale. */ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL