]> Savannah Git Hosting - gnulib.git/commitdiff
c-strcase-tests: port to EBCDIC
authorDaniel Richard G <skunk@iSKUNK.ORG>
Fri, 19 Aug 2016 19:24:03 +0000 (12:24 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Aug 2016 19:24:42 +0000 (12:24 -0700)
* 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
tests/test-c-strncasecmp.c

index 1cc82664051ee08b378fb804a93f926f9f24cbd6..ac8187d48823445177939470e27b73398bb2e56f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-08-19  Daniel Richard G.  <skunk@iSKUNK.ORG>
 
+       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.
 
index 1ca42d89d00b6102d89c9d72cdc74ca39e0ab3a7..349f6b3098544a0fc73c202e9f657dc7a75193b6 100644 (file)
@@ -19,6 +19,7 @@
 #include <config.h>
 
 #include "c-strcase.h"
+#include "c-ctype.h"
 
 #include <locale.h>
 #include <string.h>
@@ -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;
 }