summaryrefslogtreecommitdiff
path: root/tests/test-c32isupper.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-c32isupper.c
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'tests/test-c32isupper.c')
-rw-r--r--tests/test-c32isupper.c98
1 files changed, 47 insertions, 51 deletions
diff --git a/tests/test-c32isupper.c b/tests/test-c32isupper.c
index 4856f3eb..3c70a0d8 100644
--- a/tests/test-c32isupper.c
+++ b/tests/test-c32isupper.c
@@ -1,5 +1,5 @@
/* Test of c32isupper() 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
@@ -67,53 +67,49 @@ main (int argc, char *argv[])
- in the "POSIX" locale (which is usually the same as the "C" locale),
the uppercase characters include only the ASCII A ... Z characters.
*/
- {
- int c;
-
- for (c = 0; c < 0x100; c++)
- switch (c)
- {
- case '\t': case '\v': case '\f':
- 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". */
- buf[0] = (unsigned char) c;
- is = for_character (buf, 1);
- switch (c)
- {
- 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':
- ASSERT (is != 0);
- break;
- default:
- ASSERT (is == 0);
- break;
- }
- break;
- }
- }
+ for (int c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ 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". */
+ buf[0] = (unsigned char) c;
+ is = for_character (buf, 1);
+ switch (c)
+ {
+ 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':
+ ASSERT (is != 0);
+ break;
+ default:
+ ASSERT (is == 0);
+ break;
+ }
+ break;
+ }
if (argc > 1)
switch (argv[1][0])
@@ -272,7 +268,7 @@ main (int argc, char *argv[])
/* U+00B5 MICRO SIGN */
is = for_character ("\201\060\205\070", 4);
ASSERT (is == 0);
- #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+ #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
is = for_character ("\201\060\207\067", 4);
ASSERT (is != 0);
@@ -286,7 +282,7 @@ main (int argc, char *argv[])
/* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
is = for_character ("\201\060\213\067", 4);
ASSERT (is == 0);
- #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+ #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
is = for_character ("\201\060\221\071", 4);
ASSERT (is != 0);
@@ -294,7 +290,7 @@ main (int argc, char *argv[])
/* U+0142 LATIN SMALL LETTER L WITH STROKE */
is = for_character ("\201\060\222\060", 4);
ASSERT (is == 0);
- #if !(defined __FreeBSD__ || defined __DragonFly__)
+ #if !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__)
/* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
is = for_character ("\247\273", 2);
ASSERT (is != 0);