summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-04 09:37:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-04 09:37:15 (GMT)
commit35051648affc3b6e48d6abe8f629810f28a80112 (patch)
tree7623d6b900bdcaca10fbd58a346febd0a5c8ca80 /tests
parent58ce7d319f84db00c8863a8a27d366a34e60756c (diff)
downloadtcl-35051648affc3b6e48d6abe8f629810f28a80112.zip
tcl-35051648affc3b6e48d6abe8f629810f28a80112.tar.gz
tcl-35051648affc3b6e48d6abe8f629810f28a80112.tar.bz2
Test-case cleanup. Increase timeout a little bit in main.test, making Travis build errors because of this less likely.
Diffstat (limited to 'tests')
-rw-r--r--tests/encoding.test32
-rw-r--r--tests/main.test4
-rw-r--r--tests/safe.test4
-rw-r--r--tests/set-old.test2
-rw-r--r--tests/set.test2
-rw-r--r--tests/string.test4
-rw-r--r--tests/stringObj.test4
-rw-r--r--tests/subst.test12
-rw-r--r--tests/unknown.test2
-rw-r--r--tests/upvar.test2
-rw-r--r--tests/utf.test91
-rw-r--r--tests/util.test6
12 files changed, 87 insertions, 78 deletions
diff --git a/tests/encoding.test b/tests/encoding.test
index 67317c2..43c3c4c 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -1,12 +1,12 @@
# This file contains a collection of tests for tclEncoding.c
-# Sourcing this file into Tcl runs the tests and generates output for
-# errors. No output means no errors were found.
+# Sourcing this file into Tcl runs the tests and generates output for errors.
+# No output means no errors were found.
#
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# See the file "license.terms" for information on usage and redistribution of
+# this file, and for a DISCLAIMER OF ALL WARRANTIES.
package require tcltest 2
@@ -31,8 +31,8 @@ proc runtests {} {
# Some tests require the testencoding command
testConstraint testencoding [llength [info commands testencoding]]
testConstraint exec [llength [info commands exec]]
-testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}]
-
+testConstraint Uesc [expr {"\U0041" eq "A"}]
+
# TclInitEncodingSubsystem is tested by the rest of this file
# TclFinalizeEncodingSubsystem is not currently tested
@@ -66,7 +66,7 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} {testencoding} {
set path [encoding dirs]
encoding system shiftjis ;# incr ref count
encoding dirs [list [pwd]]
- set x [encoding convertto shiftjis \u4e4e] ;# old one found
+ set x [encoding convertto shiftjis \u4E4E] ;# old one found
encoding system iso8859-1
llength shiftjis
lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg
@@ -170,7 +170,7 @@ test encoding-8.1 {Tcl_ExternalToUtf} {
puts -nonewline $f "ab\x8c\xc1g"
close $f
set f [open [file join [temporaryDirectory] dummy] r]
- fconfigure $f -translation binary -encoding shiftjis
+ fconfigure $f -translation binary -encoding shiftjis
set x [read $f]
close $f
file delete [file join [temporaryDirectory] dummy]
@@ -222,7 +222,7 @@ test encoding-11.1 {LoadEncodingFile: unknown encoding} {testencoding} {
set path [encoding dirs]
encoding system iso8859-1
encoding dirs {}
- llength jis0208
+ llength jis0208 ;# Shimmer any cached Tcl_Encoding in shared literal
set x [list [catch {encoding convertto jis0208 \u4e4e} msg] $msg]
encoding dirs $path
encoding system $system
@@ -252,7 +252,7 @@ test encoding-11.6 {LoadEncodingFile: invalid file} {testencoding} {
makeDirectory tmp
makeDirectory [file join tmp encoding]
set f [open [file join tmp encoding splat.enc] w]
- fconfigure $f -translation binary
+ fconfigure $f -translation binary
puts $f "abcdefghijklmnop"
close $f
set x [list [catch {encoding convertto splat \u4e4e} msg] $msg]
@@ -273,11 +273,11 @@ test encoding-12.1 {LoadTableEncoding: normal encoding} {
append x [encoding convertfrom iso8859-3 \xD5]
} "\xd5?\u120"
test encoding-12.2 {LoadTableEncoding: single-byte encoding} {
- set x [encoding convertto iso8859-3 ab\u0120g]
+ set x [encoding convertto iso8859-3 ab\u0120g]
append x [encoding convertfrom iso8859-3 ab\xD5g]
} "ab\xd5gab\u120g"
test encoding-12.3 {LoadTableEncoding: multi-byte encoding} {
- set x [encoding convertto shiftjis ab\u4E4Eg]
+ set x [encoding convertto shiftjis ab\u4E4Eg]
append x [encoding convertfrom shiftjis ab\x8c\xc1g]
} "ab\x8c\xc1gab\u4e4eg"
test encoding-12.4 {LoadTableEncoding: double-byte encoding} {
@@ -289,7 +289,7 @@ test encoding-12.5 {LoadTableEncoding: symbol encoding} {
append x [encoding convertto symbol \u67]
append x [encoding convertfrom symbol \x67]
} "\x67\x67\u3b3"
-test encoding-12.6 {LoadTableEncoding: overflow in char value} fullutf {
+test encoding-12.6 {LoadTableEncoding: overflow in char value} Uesc {
encoding convertto iso8859-3 \U010000
} "?"
@@ -586,7 +586,7 @@ foreach from {cp932 shiftjis euc-jp iso2022-jp} {
puts -nonewline $out [read $f]
close $out
close $f
-
+
# then compare $to.chars <=> $from.to.tcltestout as binary.
set fa [open $to.chars]
fconfigure $fa -encoding binary
@@ -595,7 +595,7 @@ foreach from {cp932 shiftjis euc-jp iso2022-jp} {
set diff [channel-diff $fa $fb]
close $fa
close $fb
-
+
# Difference should be empty.
set diff
} {}
@@ -605,7 +605,7 @@ foreach from {cp932 shiftjis euc-jp iso2022-jp} {
testConstraint testgetdefenc [llength [info commands testgetdefenc]]
test encoding-26.0 {Tcl_GetDefaultEncodingDir} -constraints {
- testgetdefenc
+ testgetdefenc
} -setup {
set origDir [testgetdefenc]
testsetdefenc slappy
diff --git a/tests/main.test b/tests/main.test
index 302f95e..2ea3119 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -621,7 +621,7 @@ namespace eval ::tcl::test::main {
variable wait
chan event $f readable \
[list set [namespace which -variable wait] "child exit"]
- set id [after 2000 [list set [namespace which -variable wait] timeout]]
+ set id [after 5000 [list set [namespace which -variable wait] timeout]]
vwait [namespace which -variable wait]
after cancel $id
set wait
@@ -644,7 +644,7 @@ namespace eval ::tcl::test::main {
variable wait
chan event $f readable \
[list set [namespace which -variable wait] "child exit"]
- set id [after 2000 [list set [namespace which -variable wait] timeout]]
+ set id [after 5000 [list set [namespace which -variable wait] timeout]]
vwait [namespace which -variable wait]
after cancel $id
set wait
diff --git a/tests/safe.test b/tests/safe.test
index 965bc8b..801be8f 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -24,7 +24,7 @@ foreach i [interp slaves] {
set saveAutoPath $::auto_path
set ::auto_path [info library]
-# Force actual loading of the safe package
+# Force actual loading of the safe package
# because we use un exported (and thus un-autoindexed) APIs
# in this test result arguments:
catch {safe::interpConfigure}
@@ -75,7 +75,7 @@ test safe-2.3 {creating safe interpreters, should have no unexpected aliases} {
test safe-3.1 {calling safe::interpInit is safe} {
catch {safe::interpDelete a}
- interp create a -safe
+ interp create a -safe
safe::interpInit a
catch {interp eval a exec ls} msg
safe::interpDelete a
diff --git a/tests/set-old.test b/tests/set-old.test
index 09de97b..4638390 100644
--- a/tests/set-old.test
+++ b/tests/set-old.test
@@ -919,4 +919,4 @@ catch {unset aVaRnAmE}
# cleanup
::tcltest::cleanupTests
-return
+return
diff --git a/tests/set.test b/tests/set.test
index cad951b..763c2a4 100644
--- a/tests/set.test
+++ b/tests/set.test
@@ -533,4 +533,4 @@ catch {unset i}
catch {unset x}
catch {unset z}
::tcltest::cleanupTests
-return
+return
diff --git a/tests/string.test b/tests/string.test
index ccef0a7..b5efc8c 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -213,7 +213,7 @@ test string-4.14 {string first, negative start index} {
} 1
test string-4.15 {string first, ability to two-byte encoded utf-8 chars} {
# Test for a bug in Tcl 8.3 where test for all-single-byte-encoded
- # strings was incorrect, leading to an index returned by [string first]
+ # strings was incorrect, leading to an index returned by [string first]
# which pointed past the end of the string.
set uchar \u057e ;# character with two-byte encoding in utf-8
string first % %#$uchar$uchar#$uchar$uchar#% 3
@@ -433,7 +433,7 @@ test string-6.37 {string is double, false on int overflow} -setup {
} -result {1 priorValue}
# string-6.38 removed, underflow on input is no longer an error.
test string-6.39 {string is double, false} {
- # This test is non-portable because IRIX thinks
+ # This test is non-portable because IRIX thinks
# that .e1 is a valid double - this is really a bug
# on IRIX as .e1 should NOT be a valid double
#
diff --git a/tests/stringObj.test b/tests/stringObj.test
index b62b768..f81a067 100644
--- a/tests/stringObj.test
+++ b/tests/stringObj.test
@@ -410,10 +410,10 @@ test stringObj-13.3 {Tcl_GetCharLength with byte-size chars} testobj {
list [string length $a] [string length $a]
} {6 6}
test stringObj-13.4 {Tcl_GetCharLength with mixed width chars} testobj {
- string length "\u00ae"
+ string length "\u00ae"
} 1
test stringObj-13.5 {Tcl_GetCharLength with mixed width chars} testobj {
- # string length "○○"
+ # string length "○○"
# Use \uXXXX notation below instead of hardcoding the values, otherwise
# the test will fail in multibyte locales.
string length "\u00EF\u00BF\u00AE\u00EF\u00BF\u00AE"
diff --git a/tests/subst.test b/tests/subst.test
index a809f28..487dbd9 100644
--- a/tests/subst.test
+++ b/tests/subst.test
@@ -86,29 +86,29 @@ test subst-5.4 {command substitutions} {
} {1 {invalid command name "bogus_command"}}
test subst-5.5 {command substitutions} {
set a 0
- list [catch {subst {[set a 1}} msg] $a $msg
+ list [catch {subst {[set a 1}} msg] $a $msg
} {1 0 {missing close-bracket}}
test subst-5.6 {command substitutions} {
set a 0
- list [catch {subst {0[set a 1}} msg] $a $msg
+ list [catch {subst {0[set a 1}} msg] $a $msg
} {1 0 {missing close-bracket}}
test subst-5.7 {command substitutions} {
set a 0
- list [catch {subst {0[set a 1; set a 2}} msg] $a $msg
+ list [catch {subst {0[set a 1; set a 2}} msg] $a $msg
} {1 1 {missing close-bracket}}
# repeat the tests above simulating cmd line input
test subst-5.8 {command substitutions} {
set script {[subst {[set a 1}]}
- list [catch {exec [info nameofexecutable] << $script} msg] $msg
+ list [catch {exec [info nameofexecutable] << $script} msg] $msg
} {1 {missing close-bracket}}
test subst-5.9 {command substitutions} {
set script {[subst {0[set a 1}]}
- list [catch {exec [info nameofexecutable] << $script} msg] $msg
+ list [catch {exec [info nameofexecutable] << $script} msg] $msg
} {1 {missing close-bracket}}
test subst-5.10 {command substitutions} {
set script {[subst {0[set a 1; set a 2}]}
- list [catch {exec [info nameofexecutable] << $script} msg] $msg
+ list [catch {exec [info nameofexecutable] << $script} msg] $msg
} {1 {missing close-bracket}}
test subst-6.1 {clear the result after command substitution} {
diff --git a/tests/unknown.test b/tests/unknown.test
index 99b17b8..15984b5 100644
--- a/tests/unknown.test
+++ b/tests/unknown.test
@@ -60,4 +60,4 @@ test unknown-4.1 {errors in "unknown" procedure} {
catch {rename unknown {}}
catch {rename unknown.old unknown}
cleanupTests
-return
+return
diff --git a/tests/upvar.test b/tests/upvar.test
index cba2fb9..cd84c1e 100644
--- a/tests/upvar.test
+++ b/tests/upvar.test
@@ -431,7 +431,7 @@ test upvar-10.1 {CompileWord OBOE} -setup {
#
# Tests for 'namespace upvar'. As the implementation is essentially the same as
# for 'upvar', we only test that the variables are linked correctly. Ie, we
-# assume that the behaviour of variables once the link is established has
+# assume that the behaviour of variables once the link is established has
# already been tested above.
#
#
diff --git a/tests/utf.test b/tests/utf.test
index 7fc1de0..988bede 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -21,8 +21,8 @@ testConstraint tip389 [expr {[string length [format %c 0x10000]] == 2}]
testConstraint ucs4 [expr {[testConstraint fullutf]
&& [string length [format %c 0x10000]] == 1}]
-testConstraint Uesc [eq \U0041 A]
-testConstraint pre388 [eq \x741 A]
+testConstraint Uesc [expr {"\U0041" eq "A"}]
+testConstraint pre388 [expr {"\x741" eq "A"}]
testConstraint pairsTo4bytes [expr {[llength [info commands teststringbytes]]
&& [string length [teststringbytes \uD83D\uDCA9]] == 4}]
@@ -34,7 +34,7 @@ testConstraint teststringobj [llength [info commands teststringobj]]
testConstraint testutfnext [llength [info commands testutfnext]]
testConstraint testutfprev [llength [info commands testutfprev]]
-testConstraint tip413 [eq {} [string trim \x00]]
+testConstraint tip413 [expr {[string trim \x00] eq {}}]
catch {unset x}
@@ -484,7 +484,10 @@ test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} {
test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} {
testutfnext \xF4\x8F\xBF\xBF
} 4
-test utf-6.91 {Tcl_UtfNext, validity check [493dccc2de]} testutfnext {
+test utf-6.91.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} {
+ testutfnext \xF4\x90\x80\x80
+} 1
+test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} {
testutfnext \xF4\x90\x80\x80
} 1
test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext {
@@ -493,13 +496,13 @@ test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testu
test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs2} {
testutfnext \x80\x80\x80
} 1
-test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext fullutf} {
+test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext fullutf knownBug} {
testutfnext \x80\x80\x80
-} 1
+} 3
test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} testutfnext {
testutfnext \xA0\xA0\xA0\xA0
} 1
-test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} testutfnext {
+test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext ucs2} {
testutfnext \x80\x80\x80\x80
} 1
test utf-6.96 {Tcl_UtfNext, read limits} testutfnext {
@@ -595,16 +598,16 @@ test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} {
test utf-6.118 {Tcl_UtfNext, read limits} testutfnext {
testutfnext \xA0G 0
} 0
-test utf-6.119 {Tcl_UtfNext, read limits} testutfnext {
+test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext ucs2} {
testutfnext \xA0G 1
} 1
-test utf-6.120 {Tcl_UtfNext, read limits} testutfnext {
+test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext ucs2} {
testutfnext \xA0\xA0 1
} 1
-test utf-6.121 {Tcl_UtfNext, read limits} testutfnext {
+test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext ucs2} {
testutfnext \xA0\xA0G 2
} 1
-test utf-6.122 {Tcl_UtfNext, read limits} testutfnext {
+test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext ucs2} {
testutfnext \xA0\xA0\xA0 2
} 1
test utf-6.123 {Tcl_UtfNext, read limits} testutfnext {
@@ -950,13 +953,19 @@ test utf-7.49.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
test utf-7.49.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {
testutfprev A\xF4\x90\x80\x80
} 4
-test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev {
+test utf-7.49.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
+ testutfprev A\xF4\x90\x80\x80 4
+} 3
+test utf-7.49.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {
testutfprev A\xF4\x90\x80\x80 4
} 3
-test utf-7.49.3 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev {
+test utf-7.49.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
+ testutfprev A\xF4\x90\x80\x80 3
+} 2
+test utf-7.49.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {
testutfprev A\xF4\x90\x80\x80 3
} 2
-test utf-7.49.4 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev {
+test utf-7.49.6 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev {
testutfprev A\xF4\x90\x80\x80 2
} 1
@@ -965,37 +974,37 @@ test utf-8.1 {Tcl_UniCharAtIndex: index = 0} {
} a
test utf-8.2 {Tcl_UniCharAtIndex: index = 0} {
string index \u4E4E\u25A 0
-} "\u4E4E"
+} \u4E4E
test utf-8.3 {Tcl_UniCharAtIndex: index > 0} {
string index abcd 2
} c
test utf-8.4 {Tcl_UniCharAtIndex: index > 0} {
string index \u4E4E\u25A\xFF\u543 2
-} "\uFF"
+} \xFF
test utf-8.5.0 {Tcl_UniCharAtIndex: high surrogate} ucs2 {
string index \uD842 0
-} "\uD842"
+} \uD842
test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} ucs4 {
string index \uD842 0
-} "\uD842"
+} \uD842
test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} tip389 {
string index \uD842 0
-} "\uD842"
+} \uD842
test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} {
string index \uDC42 0
-} "\uDC42"
+} \uDC42
test utf-8.7.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index \uD83D\uDE00G 0
-} "\uD83D"
+} \uD83D
test utf-8.7.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
string index \uD83D\uDE00G 0
-} "\U1F600"
+} \U1F600
test utf-8.7.2 {Tcl_UniCharAtIndex: Emoji} tip389 {
string index \uD83D\uDE00G 0
-} "\U1F600"
+} \U1F600
test utf-8.8.0 {Tcl_UniCharAtIndex: Emoji} ucs2 {
string index \uD83D\uDE00G 1
-} "\uDE00"
+} \uDE00
test utf-8.8.1 {Tcl_UniCharAtIndex: Emoji} ucs4 {
string index \uD83D\uDE00G 1
} G
@@ -1013,13 +1022,13 @@ test utf-8.9.2 {Tcl_UniCharAtIndex: Emoji} tip389 {
} G
test utf-8.10.0 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs2} {
string index \U1F600G 0
-} "\uFFFD"
+} \uFFFD
test utf-8.10.1 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs4} {
string index \U1F600G 0
-} "\U1F600"
+} \U1F600
test utf-8.10.2 {Tcl_UniCharAtIndex: Emoji} {Uesc tip389} {
string index \U1F600G 0
-} "\U1F600"
+} \U1F600
test utf-8.11.0 {Tcl_UniCharAtIndex: Emoji} {Uesc ucs2} {
string index \U1F600G 1
} G
@@ -1044,22 +1053,22 @@ test utf-9.1 {Tcl_UtfAtIndex: index = 0} {
} abc
test utf-9.2 {Tcl_UtfAtIndex: index > 0} {
string range \u4E4E\u25A\xFF\u543klmnop 1 5
-} "\u25A\xFF\u543kl"
+} \u25A\xFF\u543kl
test utf-9.3.0 {Tcl_UtfAtIndex: index = 0, Emoji} ucs2 {
string range \uD83D\uDE00G 0 0
-} "\uD83D"
+} \uD83D
test utf-9.3.1 {Tcl_UtfAtIndex: index = 0, Emoji} ucs4 {
string range \uD83D\uDE00G 0 0
-} "\U1F600"
+} \U1F600
test utf-9.3.2 {Tcl_UtfAtIndex: index = 0, Emoji} tip389 {
string range \uD83D\uDE00G 0 0
-} "\U1F600"
+} \U1F600
test utf-9.4.0 {Tcl_UtfAtIndex: index > 0, Emoji} ucs2 {
string range \uD83D\uDE00G 1 1
-} "\uDE00"
+} \uDE00
test utf-9.4.1 {Tcl_UtfAtIndex: index > 0, Emoji} ucs4 {
string range \uD83D\uDE00G 1 1
-} "G"
+} G
test utf-9.4.2 {Tcl_UtfAtIndex: index > 0, Emoji} tip389 {
string range \uD83D\uDE00G 1 1
} {}
@@ -1074,19 +1083,19 @@ test utf-9.5.2 {Tcl_UtfAtIndex: index > 0, Emoji} tip389 {
} G
test utf-9.6.0 {Tcl_UtfAtIndex: index = 0, Emoji} {Uesc ucs2} {
string range \U1f600G 0 0
-} "\uFFFD"
+} \uFFFD
test utf-9.6.1 {Tcl_UtfAtIndex: index = 0, Emoji} {Uesc ucs4} {
string range \U1f600G 0 0
-} "\U1F600"
+} \U1F600
test utf-9.6.2 {Tcl_UtfAtIndex: index = 0, Emoji} {Uesc tip389} {
string range \U1f600G 0 0
-} "\U1F600"
+} \U1F600
test utf-9.7.0 {Tcl_UtfAtIndex: index > 0, Emoji} {Uesc ucs2} {
string range \U1f600G 1 1
} G
test utf-9.7.1 {Tcl_UtfAtIndex: index > 0, Emoji} {Uesc ucs4} {
string range \U1f600G 1 1
-} "G"
+} G
test utf-9.7.2 {Tcl_UtfAtIndex: index > 0, Emoji} {Uesc tip389} {
string range \U1f600G 1 1
} {}
@@ -1170,7 +1179,7 @@ bsCheck \uA 10
bsCheck \340 224
bsCheck \uA1 161
bsCheck \u4E21 20001
-bsCheck \741 225 pre388 ;# == \341
+bsCheck \741 225 pre388 ;# == \341
bsCheck \741 60 !pre388 ;# == \74 1
bsCheck \U 85
bsCheck \Uk 85
@@ -1332,7 +1341,7 @@ test utf-20.2 {[4c591fa487] TclUniCharNcmp/TclUtfNcmp} {
set two [format %c 0x10000]
set first [string compare $one $two]
string range $one 0 0
- string range $two 0 0
+ string range $two 0 0
set second [string compare $one $two]
expr {($first == $second) ? "agree" : "disagree"}
} agree
@@ -1454,9 +1463,9 @@ UniCharCaseCmpTest < a b
UniCharCaseCmpTest > b a
UniCharCaseCmpTest > B a
UniCharCaseCmpTest > aBcB abca
-UniCharCaseCmpTest < \uFFFF [format %c 0x10000] ucs4
+UniCharCaseCmpTest < \uFFFF [format %c 0x10000] ucs4
UniCharCaseCmpTest < \uFFFF \U10000 {Uesc ucs4}
-UniCharCaseCmpTest > [format %c 0x10000] \uFFFF ucs4
+UniCharCaseCmpTest > [format %c 0x10000] \uFFFF ucs4
UniCharCaseCmpTest > \U10000 \uFFFF {Uesc ucs4}
diff --git a/tests/util.test b/tests/util.test
index 85c06dd..3f7ffe2 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -203,7 +203,7 @@ test util-4.6 {Tcl_ConcatObj - utf-8 sequence with "whitespace" char} {
} \xe0
test util-4.7 {Tcl_ConcatObj - refCount safety} testconcatobj {
# Check for Bug #1447328 (actually, bugs in its original "fix"). One of the
- # symptoms was Bug #2055782.
+ # symptoms was Bug #2055782.
testconcatobj
} {}
@@ -604,7 +604,7 @@ test util-9.1.3 {TclGetIntForIndex} {
} k
test util-9.2.0 {TclGetIntForIndex} {
string index abcd end
-} d
+} d
test util-9.2.1 {TclGetIntForIndex} -body {
string index abcd { end}
} -returnCodes error -match glob -result *
@@ -4041,7 +4041,7 @@ test util-17.1 {bankers' rounding [Bug 3349507]} {ieeeFloatingPoint} {
}
set r
} [list {*}{
- 0x43fffffffffffffc 0xc3fffffffffffffc
+ 0x43fffffffffffffc 0xc3fffffffffffffc
0x43fffffffffffffc 0xc3fffffffffffffc
0x43fffffffffffffd 0xc3fffffffffffffd
0x43fffffffffffffe 0xc3fffffffffffffe