[2/2] newlib: testsuite: UTF-8.exp: code points above U+10FFFF are invalid

Message ID 20261015133359.3000765-3-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
  The UTF-8 decoder rejects sequences decoding to more than U+10FFFF, as
RFC 3629 requires, since a67f77af1 (2009).  That covers the 5- and 6-byte
sequences and the largest 4-byte ones, which the test from 2002 still
expects to decode.

Assisted-by: Claude:claude-opus-5-5 claude-code
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
---
 newlib/testsuite/newlib.locale/UTF-8.exp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/newlib/testsuite/newlib.locale/UTF-8.exp b/newlib/testsuite/newlib.locale/UTF-8.exp
index 94fcb5f53..4db8eb6f9 100644
--- a/newlib/testsuite/newlib.locale/UTF-8.exp
+++ b/newlib/testsuite/newlib.locale/UTF-8.exp
@@ -24,19 +24,19 @@  set expected_output {
 "* U-00000080"
 "* U-00000800"
 "* U-00010000"
-"* U-00200000"
-"* U-04000000"
+"* Invalid"
+"* Invalid"
 "* U-0000007f"
 "* U-000007ff"
 "* U-0000ffff"
-"* U-001fffff"
-"* U-03ffffff"
-"* U-7fffffff"
+"* Invalid"
+"* Invalid"
+"* Invalid"
 "* U-0000d7ff"
 "* U-0000e000"
 "* U-0000fffd"
 "* U-0010ffff"
-"* U-00110000"
+"* Invalid"
 "* 1 Invalid"
 "* 1 Invalid"
 "* 2 Invalid"