summaryrefslogtreecommitdiff
path: root/tests/test-c32isspace.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
commitcfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch)
tree8016486f8ee7157213f2d09ff2491bfa9c94638a /tests/test-c32isspace.c
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'tests/test-c32isspace.c')
-rw-r--r--tests/test-c32isspace.c88
1 files changed, 42 insertions, 46 deletions
diff --git a/tests/test-c32isspace.c b/tests/test-c32isspace.c
index 9409bb69..1b1a679d 100644
--- a/tests/test-c32isspace.c
+++ b/tests/test-c32isspace.c
@@ -1,5 +1,5 @@
/* Test of c32isspace() function.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -68,49 +68,45 @@ main (int argc, char *argv[])
- in the "POSIX" locale (which is usually the same as the "C" locale),
the white-space characters include only the ASCII <space>, <form-feed>,
<newline>, <carriage-return>, <tab>, <vertical-tab> characters. */
- {
- int c;
-
- for (c = 0; c < 0x100; c++)
- switch (c)
- {
- case '\f': case '\n': case '\r': case '\t': case '\v':
- case ' ': case '!': case '"': case '#': case '%':
- case '&': case '\'': case '(': case ')': case '*':
- case '+': case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>':
- case '?':
- case 'A': case 'B': case 'C': case 'D': case 'E':
- case 'F': case 'G': case 'H': case 'I': case 'J':
- case 'K': case 'L': case 'M': case 'N': case 'O':
- case 'P': case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X': case 'Y':
- case 'Z':
- case '[': case '\\': case ']': case '^': case '_':
- case 'a': case 'b': case 'c': case 'd': case 'e':
- case 'f': case 'g': case 'h': case 'i': case 'j':
- case 'k': case 'l': case 'm': case 'n': case 'o':
- case 'p': case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x': case 'y':
- case 'z': case '{': case '|': case '}': case '~':
- /* c is in the ISO C "basic character set" or one of the explicitly
- mentioned white-space characters. */
- buf[0] = (unsigned char) c;
- is = for_character (buf, 1);
- switch (c)
- {
- case ' ': case '\f': case '\n': case '\r': case '\t': case '\v':
- ASSERT (is != 0);
- break;
- default:
- ASSERT (is == 0);
- break;
- }
- break;
- }
- }
+ for (int c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\f': case '\n': case '\r': case '\t': case '\v':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set" or one of the explicitly
+ mentioned white-space characters. */
+ buf[0] = (unsigned char) c;
+ is = for_character (buf, 1);
+ switch (c)
+ {
+ case ' ': case '\f': case '\n': case '\r': case '\t': case '\v':
+ ASSERT (is != 0);
+ break;
+ default:
+ ASSERT (is == 0);
+ break;
+ }
+ break;
+ }
if (argc > 1)
switch (argv[1][0])
@@ -175,12 +171,12 @@ main (int argc, char *argv[])
/* U+00B7 MIDDLE DOT */
is = for_character ("\241\244", 2);
ASSERT (is == 0);
- #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+ #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+2002 EN SPACE */
is = for_character ("\201\066\243\070", 4);
ASSERT (is != 0);
#endif
- #if !(defined __FreeBSD__ || defined __DragonFly__)
+ #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__)
/* U+3000 IDEOGRAPHIC SPACE */
is = for_character ("\241\241", 2);
ASSERT (is != 0);