[1/2] newlib: testsuite: twctype.c: U+0967 is a digit, not a letter
Commit Message
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(-)
@@ -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