diff options
author | dgp <dgp@users.sourceforge.net> | 2020-04-28 20:19:55 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-04-28 20:19:55 (GMT) |
commit | a2dbb46cfdf3a2689f034adc076a27ed76a717bb (patch) | |
tree | 2db46629123b2b6a74ba9d4b1704254e62e3054d /tests | |
parent | 03577f4fd61ecf06dfcc553e6a05de926615c826 (diff) | |
download | tcl-a2dbb46cfdf3a2689f034adc076a27ed76a717bb.zip tcl-a2dbb46cfdf3a2689f034adc076a27ed76a717bb.tar.gz tcl-a2dbb46cfdf3a2689f034adc076a27ed76a717bb.tar.bz2 |
Expand coverage of indexing across all variants.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utf.test | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/tests/utf.test b/tests/utf.test index df953a2..31f1731 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -976,17 +976,32 @@ test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} { string index \uDC42 0 } "\uDC42" test utf-8.7.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { - string index \uD83D\uDE00 0 + string index \uD83D\uDE00G 0 } "\uD83D" test utf-8.7.1 {Tcl_UniCharAtIndex: Emoji} ucs4 { - string index \uD83D\uDE00 0 + string index \uD83D\uDE00G 0 +} "\U1F600" +test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} tip389 { + string index \uD83D\uDE00G 0 } "\U1F600" test utf-8.8.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { - string index \uD83D\uDE00 1 + string index \uD83D\uDE00G 1 } "\uDE00" test utf-8.8.1 {Tcl_UniCharAtIndex: Emoji} ucs4 { - string index \uD83D\uDE00 1 + string index \uD83D\uDE00G 1 +} G +test utf-8.8.2 {Tcl_UniCharAtIndex: Emoji} tip389 { + string index \uD83D\uDE00G 1 +} {} +test utf-8.9.0 {Tcl_UniCharAtIndex: Emoji} ucs2 { + string index \uD83D\uDE00G 2 +} G +test utf-8.9.1 {Tcl_UniCharAtIndex: Emoji} ucs4 { + string index \uD83D\uDE00G 2 } {} +test utf-8.9.2 {Tcl_UniCharAtIndex: Emoji} tip389 { + string index \uD83D\uDE00G 2 +} G test utf-9.1 {Tcl_UtfAtIndex: index = 0} { string range abcd 0 2 @@ -1000,13 +1015,27 @@ test utf-9.3.0 {Tcl_UtfAtIndex: index = 0, Emoji} ucs2 { test utf-9.3.1 {Tcl_UtfAtIndex: index = 0, Emoji} ucs4 { string range \uD83D\uDE00G 0 0 } "\U1F600" +test utf-9.3.2 {Tcl_UtfAtIndex: index = 0, Emoji} tip389 { + string range \uD83D\uDE00G 0 0 +} "\U1F600" test utf-9.4.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 { string range \uD83D\uDE00G 1 1 } "\uDE00" test utf-9.4.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 { string range \uD83D\uDE00G 1 1 } "G" - +test utf-9.4.2 {Tcl_UtfAtIndex: index > 0, Emoji} tip389 { + string range \uD83D\uDE00G 1 1 +} {} +test utf-9.5.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 { + string range \uD83D\uDE00G 2 2 +} G +test utf-9.5.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 { + string range \uD83D\uDE00G 2 2 +} {} +test utf-9.5.2 {Tcl_UtfAtIndex: index > 0, Emoji} tip389 { + string range \uD83D\uDE00G 2 2 +} G test utf-10.1 {Tcl_UtfBackslash: dst == NULL} { set x \n |