diff --git a/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c index f7f6b43..47feac8 100644 --- a/tests/test-c-strcasecmp.c +++ b/tests/test-c-strcasecmp.c @@ -19,6 +19,7 @@ #include #include "c-strcase.h" +#include "c-ctype.h" #include #include @@ -57,9 +58,11 @@ main (int argc, char *argv[]) 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; } diff --git a/tests/test-wcwidth.c b/tests/test-wcwidth.c index 9fad785..fdbecc3 100644 --- a/tests/test-wcwidth.c +++ b/tests/test-wcwidth.c @@ -26,6 +26,7 @@ SIGNATURE_CHECK (wcwidth, int, (wchar_t)); #include #include +#include "c-ctype.h" #include "localcharset.h" #include "macros.h" @@ -34,9 +35,11 @@ main () { 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