]> Savannah Git Hosting - gnulib.git/commitdiff
c32ispunct: Rely on module iswpunct.
authorBruno Haible <bruno@clisp.org>
Wed, 30 Aug 2023 00:18:40 +0000 (02:18 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 30 Aug 2023 00:18:52 +0000 (02:18 +0200)
* modules/c32ispunct (Depends-on): Add iswpunct.
* tests/test-c32ispunct.c (main): Add a few more tests in the "C"
locale.

ChangeLog
modules/c32ispunct
tests/test-c32ispunct.c

index a21cdf3ccff7cdf326a58d5a9d1b2fb6ecea25e3..ae888b304a5884ccc43bcc56558854f7ee715b49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2023-08-29  Bruno Haible  <bruno@clisp.org>
 
+       c32ispunct: Rely on module iswpunct.
+       * modules/c32ispunct (Depends-on): Add iswpunct.
+       * tests/test-c32ispunct.c (main): Add a few more tests in the "C"
+       locale.
+
        iswpunct: Add tests.
        * tests/test-iswpunct.c: New file, based on tests/test-iswdigit.c and
        tests/test-c32ispunct.c.
index bb78c9ea6a4fafb99ccef1cca6ac44e106a68b26..ff9ee4082597ae6a1625b66e6059786b396ee38f 100644 (file)
@@ -16,6 +16,7 @@ Depends-on:
 uchar
 wchar
 wctype-h
+iswpunct
 localcharset    [test $REPLACE_MBSTATE_T = 1]
 streq           [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-punct
index 5167e89cf99a06f31aea7c22bc26c183bef64032..f0df92b9f1084f072c06d1b2999611d7f9b1c52c 100644 (file)
@@ -136,6 +136,15 @@ main (int argc, char *argv[])
       {
       case '0':
         /* C locale; tested above.  */
+        /* These characters are not in the ISO C "basic character set", but
+           are nevertheless usually expected to be punctuation or symbol
+           characters.  */
+        is = for_character ("$", 1);
+        ASSERT (is != 0);
+        is = for_character ("@", 1);
+        ASSERT (is != 0);
+        is = for_character ("`", 1);
+        ASSERT (is != 0);
         return 0;
 
       case '1':