From 00893e79fc62966067af1a106567db96bd170338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 3 Mar 2024 19:11:32 +0100 Subject: New upstream version 1.2 --- tests/test-wctype-h.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'tests/test-wctype-h.c') 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 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 -#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); -- cgit v1.2.3