diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-24 08:54:48 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-24 08:54:48 +0100 |
commit | 163a663518f33bab48b28431972e580b366b4d49 (patch) | |
tree | f518ffabaca4a0b93f0103d617e803792d3b0b43 /tests/test-wctype-h.c | |
parent | 1b3a8d5ad2ea2f099d514d9dd51ebf926a628076 (diff) | |
parent | dd0000f7e25abe6c28d4329d324fd7fcab54094f (diff) |
Merge branch 'release/debian/1.2-1'HEADdebian/1.2-1master
Diffstat (limited to 'tests/test-wctype-h.c')
-rw-r--r-- | tests/test-wctype-h.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/tests/test-wctype-h.c b/tests/test-wctype-h.c index 08da56b5..016fd8fc 100644 --- a/tests/test-wctype-h.c +++ b/tests/test-wctype-h.c @@ -1,5 +1,5 @@ /* Test of <wctype.h> substitute. - Copyright (C) 2007-2022 Free Software Foundation, Inc. + Copyright (C) 2007-2024 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 @@ -20,8 +20,6 @@ #include <wctype.h> -#include "macros.h" - /* Check that the type wint_t is defined. */ wint_t a = 'x'; /* Check that WEOF is defined. */ @@ -33,6 +31,8 @@ wctype_t p; /* Check that the type wctrans_t is defined. */ wctrans_t q; +#include "macros.h" + int main (void) { @@ -62,6 +62,43 @@ main (void) ASSERT (!iswupper (e)); ASSERT (!iswxdigit (e)); + /* Sanity check for the iswprint function. */ + ASSERT (iswprint (L' ')); + ASSERT (!iswprint (L'\t')); + ASSERT (!iswprint (L'\n')); + + /* Sanity check for the iswpunct function. + These characters are usually expected to be punctuation or symbol + characters. */ + ASSERT (iswpunct (L'!')); + ASSERT (iswpunct (L'"')); + ASSERT (iswpunct (L'#')); + ASSERT (iswpunct (L'%')); + ASSERT (iswpunct (L'&')); + ASSERT (iswpunct (L'\'')); + ASSERT (iswpunct (L'(')); + ASSERT (iswpunct (L')')); + ASSERT (iswpunct (L'*')); + ASSERT (iswpunct (L',')); + ASSERT (iswpunct (L'-')); + ASSERT (iswpunct (L'.')); + ASSERT (iswpunct (L'/')); + ASSERT (iswpunct (L':')); + ASSERT (iswpunct (L';')); + ASSERT (iswpunct (L'?')); + ASSERT (iswpunct (L'@')); + ASSERT (iswpunct (L'[')); + ASSERT (iswpunct (L'\\')); + ASSERT (iswpunct (L']')); + ASSERT (iswpunct (L'_')); + ASSERT (iswpunct (L'{')); + ASSERT (iswpunct (L'}')); + ASSERT (!iswpunct (L'5')); + ASSERT (!iswpunct (L'F')); + ASSERT (!iswpunct (L' ')); + ASSERT (!iswpunct (L'\t')); + ASSERT (!iswpunct (L'\n')); + /* Check that the tow* functions exist as functions or as macros. */ (void) towlower (0); (void) towupper (0); |