[1/2] newlib: testsuite: twctype.c: U+0967 is a digit, not a letter

Message ID 20261015133359.3000765-2-bernie@codewiz.org
State New
Headers
Series newlib: testsuite: two stale multibyte expectations |

Commit Message

Bernie Innocenti Oct. 15, 2026, 1:33 p.m. UTC
  Since newlib generates its character classes from Unicode data,
iswalpha() is true only for letter categories.  U+0967 (DEVANAGARI DIGIT
ONE) is a decimal digit, so it is alphanumeric but not alphabetic, and the
test has failed on every target that runs the multibyte branch.  Check a
Devanagari letter instead, and what U+0967 is classified as.

Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
---
 newlib/testsuite/newlib.wctype/twctype.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/newlib/testsuite/newlib.wctype/twctype.c b/newlib/testsuite/newlib.wctype/twctype.c
index d45128e50..8ad4ae635 100644
--- a/newlib/testsuite/newlib.wctype/twctype.c
+++ b/newlib/testsuite/newlib.wctype/twctype.c
@@ -37,7 +37,9 @@  int main()
   else
     {
       setlocale (LC_CTYPE, "C-UTF-8");
-      CHECK (iswalpha(0x0967));
+      CHECK (iswalpha(0x0905));
+      CHECK (!iswalpha(0x0967));
+      CHECK (iswalnum(0x0967));
       CHECK (!iswalpha(0x128e));
 #if __SIZEOF_WINT_T__ > 2
       /* These two lines may cause compilation warnings on targets