summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/string.test18
1 files changed, 18 insertions, 0 deletions
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}