From 13b1a0635f7e5f4c9fce04fe3474d16418d57522 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 15 Feb 2021 12:35:33 +0000 Subject: More testcases from Christian Werner, regarding "string reverse" with Emoji. Those testcases fail in all Tcl 8.6.x releases. --- tests/string.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/string.test b/tests/string.test index c7cf8d5..3f0a04b 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1828,6 +1828,24 @@ test string-24.15 {string reverse command - pure bytearray} { binary scan [tcl::string::reverse [binary format H* 010203]] H* x set x } 030201 +test string-24.16 {string reverse command - surrogates} knownBug { + string reverse \u0444bulb\uD83D\uDE02 +} \uD83D\uDE02blub\u0444 +test string-24.17 {string reverse command - surrogates} knownBug { + string reverse \uD83D\uDE02hello\uD83D\uDE02 +} \uD83D\uDE02olleh\uD83D\uDE02 +test string-24.18 {string reverse command - surrogates} knownBug { + set s \u0444bulb\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + string reverse $s +} \uD83D\uDE02blub\u0444 +test string-24.19 {string reverse command - surrogates} knownBug { + set s \uD83D\uDE02hello\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + string reverse $s +} \uD83D\uDE02olleh\uD83D\uDE02 test string-25.1 {string is list} { string is list {a b c} -- cgit v0.12