diff options
author | dgp <dgp@users.sourceforge.net> | 2020-04-27 19:17:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-04-27 19:17:40 (GMT) |
commit | 215662c8ba97ab0ec4818e0b0bb0440be801219f (patch) | |
tree | d2473e41d100f170548b5076f8399cb8d8f581ed /tests/utf.test | |
parent | 165a986a41b58b0052245b73ee99a4772d0dbb17 (diff) | |
download | tcl-215662c8ba97ab0ec4818e0b0bb0440be801219f.zip tcl-215662c8ba97ab0ec4818e0b0bb0440be801219f.tar.gz tcl-215662c8ba97ab0ec4818e0b0bb0440be801219f.tar.bz2 |
Improve the reporting of a failing test. Start testing extended chars.
Diffstat (limited to 'tests/utf.test')
-rw-r--r-- | tests/utf.test | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/utf.test b/tests/utf.test index c701913..ea13d1d 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -1295,8 +1295,14 @@ proc UniCharCaseCmpTest {order one two {constraints {}}} { teststringobj set 2 $two teststringobj getunicode 1 teststringobj getunicode 2 - string compare -nocase [teststringobj get 1] [teststringobj get 2] - } -result [string map {< -1 = 0 > 1} $order] + set result [string compare -nocase [teststringobj get 1] [teststringobj get 2]] + if {$result eq [string map {< -1 = 0 > 1} $order]} { + set result ok + } else { + set result "'$one' should be $order '$two' (no case)" + } + set result + } -result ok incr count } variable count 1 @@ -1304,6 +1310,12 @@ UniCharCaseCmpTest < a b UniCharCaseCmpTest > b a UniCharCaseCmpTest > B a UniCharCaseCmpTest > aBcB abca +UniCharCaseCmpTest < \uFFFF [format %c 0x10000] fullutf +UniCharCaseCmpTest < \uFFFF \U10000 {Uesc fullutf} + + + + unset count rename UniCharCaseCmpTest {} |