summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdMZ.test51
-rw-r--r--tests/encoding.test40
-rw-r--r--tests/fileSystemEncoding.test3
-rw-r--r--tests/http.test4
-rw-r--r--tests/httpcookie.test122
-rw-r--r--tests/info.test132
-rw-r--r--tests/io.test2
-rw-r--r--tests/oo.test29
-rw-r--r--tests/opt.test2
-rw-r--r--tests/string.test150
-rw-r--r--tests/tcltests.tcl2
-rw-r--r--tests/utf.test180
12 files changed, 400 insertions, 317 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index a76e8df..43b3703 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -344,9 +344,13 @@ test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts}
test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} -body {
time {format 1}
} -match regexp -result {^\d+ microseconds per iteration}
-test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} {
- expr {[lindex [time {_nrt_sleep 0.01}] 0] < [lindex [time {_nrt_sleep 10.0}] 0]}
-} 1
+test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} -body {
+ set m1 [lindex [time {_nrt_sleep 0.01}] 0]
+ set m2 [lindex [time {_nrt_sleep 10.0}] 0]
+ list \
+ [expr {$m1 < $m2}] \
+ $m1 $m2; # interesting only in error case.
+} -match glob -result [list 1 *]
test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} {
list [catch {time {error foo}} msg] $msg $::errorInfo
} {1 foo {foo
@@ -397,11 +401,10 @@ test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} {
test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} {
regexp {^0 \ws/# 0 # 0 #/sec 0 net-ms$} [timerate {} 0 0]
} 1
-test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
- lassign [timerate {_nrt_sleep 0} 50] ovh
- set m1 [timerate -overhead $ovh {_nrt_sleep 0.01} 50]
- set m2 [timerate -overhead $ovh {_nrt_sleep 1.00} 50]
- list \
+test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} -body {
+ set m1 [timerate {_nrt_sleep 0.01} 50]
+ set m2 [timerate {_nrt_sleep 1.00} 50]
+ list [list \
[expr {[lindex $m1 0] < [lindex $m2 0]}] \
[expr {[lindex $m1 0] < 100}] \
[expr {[lindex $m2 0] > 100}] \
@@ -410,8 +413,9 @@ test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains
[expr {[lindex $m1 4] > 10000}] \
[expr {[lindex $m2 4] < 10000}] \
[expr {[lindex $m1 6] > 5 && [lindex $m1 6] < 100}] \
- [expr {[lindex $m2 6] > 5 && [lindex $m2 6] < 100}]
-} [lrepeat 9 1]
+ [expr {[lindex $m2 6] > 5 && [lindex $m2 6] < 100}] \
+ ] $m1 $m2; # interesting only in error case.
+} -match glob -result [list [lrepeat 9 1] *]
test cmdMZ-6.7 {Tcl_TimeRateObjCmd: errors generate right trace} {
list [catch {timerate {error foo} 1} msg] $msg $::errorInfo
} {1 foo {foo
@@ -424,35 +428,38 @@ test cmdMZ-6.7.1 {Tcl_TimeRateObjCmd: return from timerate} {
proc r1 {} {upvar x x; timerate {incr x; return "r1"; incr x} 1000 10}
list [r1] $x
} {r1 1}
-test cmdMZ-6.8 {Tcl_TimeRateObjCmd: allow (conditional) break from timerate} {
+test cmdMZ-6.8 {Tcl_TimeRateObjCmd: allow (conditional) break from timerate} -body {
set m1 [timerate {break}]
- list \
+ list [list \
[expr {[lindex $m1 0] < 1000}] \
[expr {[lindex $m1 2] == 1}] \
[expr {[lindex $m1 4] > 1000}] \
- [expr {[lindex $m1 6] < 10}]
-} {1 1 1 1}
-test cmdMZ-6.8.1 {Tcl_TimeRateObjCmd: allow (conditional) continue in timerate} {
+ [expr {[lindex $m1 6] < 10}] \
+ ] $m1; # interesting only in error case.
+} -match glob -result [list {1 1 1 1} *]
+test cmdMZ-6.8.1 {Tcl_TimeRateObjCmd: allow (conditional) continue in timerate} -body {
set m1 [timerate {continue; return -code error "unexpected"} 1000 10]
- list \
+ list [list \
[expr {[lindex $m1 0] < 1000}] \
[expr {[lindex $m1 2] == 10}] \
[expr {[lindex $m1 4] > 1000}] \
- [expr {[lindex $m1 6] < 100}]
-} {1 1 1 1}
+ [expr {[lindex $m1 6] < 100}] \
+ ] $m1; # interesting only in error case.
+} -match glob -result [list {1 1 1 1} *]
test cmdMZ-6.9 {Tcl_TimeRateObjCmd: max count of iterations} {
set m1 [timerate {} 1000 5]; # max-count wins
set m2 [timerate {_nrt_sleep 20} 1 5]; # max-time wins
list [lindex $m1 2] [lindex $m2 2]
} {5 1}
-test cmdMZ-6.10 {Tcl_TimeRateObjCmd: huge overhead cause 0us result} {
+test cmdMZ-6.10 {Tcl_TimeRateObjCmd: huge overhead cause 0us result} -body {
set m1 [timerate -overhead 1e6 {_nrt_sleep 10} 100 1]
- list \
+ list [list \
[expr {[lindex $m1 0] == 0.0}] \
[expr {[lindex $m1 2] == 1}] \
[expr {[lindex $m1 4] == 1000000}] \
- [expr {[lindex $m1 6] <= 0.001}]
-} {1 1 1 1}
+ [expr {[lindex $m1 6] <= 0.001}] \
+ ] $m1; # interesting only in error case.
+} -match glob -result [list {1 1 1 1} *]
test cmdMZ-6.11 {Tcl_TimeRateObjCmd: done/continue optimization rollback} {
set m1 {set m2 ok}
if 1 $m1
diff --git a/tests/encoding.test b/tests/encoding.test
index da34f03..a58303b 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -321,6 +321,46 @@ test encoding-15.3 {UtfToUtfProc null character input} teststringbytes {
binary scan [teststringbytes $y] H* z
set z
} c080
+test encoding-15.4 {UtfToUtfProc emoji character input} {
+ set x \xED\xA0\xBD\xED\xB8\x82
+ set y [encoding convertfrom utf-8 \xED\xA0\xBD\xED\xB8\x82]
+ list [string length $x] $y
+} "6 \U1F602"
+test encoding-15.5 {UtfToUtfProc emoji character input} {
+ set x \xF0\x9F\x98\x82
+ set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82]
+ list [string length $x] $y
+} "4 \U1F602"
+test encoding-15.6 {UtfToUtfProc emoji character output} {
+ set x \uDE02\uD83D\uDE02\uD83D
+ set y [encoding convertto utf-8 \uDE02\uD83D\uDE02\uD83D]
+ binary scan $y H* z
+ list [string length $y] $z
+} {10 edb882f09f9882eda0bd}
+test encoding-15.7 {UtfToUtfProc emoji character output} {
+ set x \uDE02\uD83D\uD83D
+ set y [encoding convertto utf-8 \uDE02\uD83D\uD83D]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {3 9 edb882eda0bdeda0bd}
+test encoding-15.8 {UtfToUtfProc emoji character output} {
+ set x \uDE02\uD83D\xE9
+ set y [encoding convertto utf-8 \uDE02\uD83D\xE9]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {3 8 edb882eda0bdc3a9}
+test encoding-15.9 {UtfToUtfProc emoji character output} {
+ set x \uDE02\uD83DX
+ set y [encoding convertto utf-8 \uDE02\uD83DX]
+ binary scan $y H* z
+ list [string length $x] [string length $y] $z
+} {3 7 edb882eda0bd58}
+test encoding-15.10 {UtfToUtfProc emoji character output} {
+ set x \U1F602
+ set y [encoding convertto utf-8 \U1F602]
+ binary scan $y H* z
+ list [string length $y] $z
+} {4 f09f9882}
test encoding-16.1 {Utf16ToUtfProc} -body {
set val [encoding convertfrom utf-16 NN]
diff --git a/tests/fileSystemEncoding.test b/tests/fileSystemEncoding.test
index fa67646..0f8a2a7 100644
--- a/tests/fileSystemEncoding.test
+++ b/tests/fileSystemEncoding.test
@@ -38,11 +38,12 @@ namespace eval ::tcl::test::fileSystemEncoding {
makeFile {} $utf8name
set globbed [lindex [glob -directory $dir *] 0]
encoding system utf-8
- lappend res [file exists $globbed]
+ set res [file exists $globbed]
encoding system iso8859-1
lappend res [file exists $globbed]
return $res
} -cleanup {
+ removeFile $utf8name
file delete -force $dir
encoding system $saved
} -result {0 1}
diff --git a/tests/http.test b/tests/http.test
index 2184449..8eac3c3 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -670,7 +670,7 @@ test http-7.4 {http::formatQuery} -setup {
http::config -urlencoding $enc
} -result {%3F}
-package require -exact tcl::idna 1.0
+package require tcl::idna 1.0
test http-idna-1.1 {IDNA package: basics} -returnCodes error -body {
::tcl::idna
@@ -680,7 +680,7 @@ test http-idna-1.2 {IDNA package: basics} -returnCodes error -body {
} -result {unknown or ambiguous subcommand "?": must be decode, encode, puny, or version}
test http-idna-1.3 {IDNA package: basics} -body {
::tcl::idna version
-} -result 1.0
+} -result 1.0.1
test http-idna-1.4 {IDNA package: basics} -returnCodes error -body {
::tcl::idna version what
} -result {wrong # args: should be "::tcl::idna version"}
diff --git a/tests/httpcookie.test b/tests/httpcookie.test
index a6b193f..b3c5412 100644
--- a/tests/httpcookie.test
+++ b/tests/httpcookie.test
@@ -25,48 +25,48 @@ testConstraint cookiejar [expr {[testConstraint sqlite3] && ![catch {
package require cookiejar
}]}]
-set COOKIEJAR_VERSION 0.1
-test http-cookiejar-1.1 "cookie storage: packaging" {notOSXtravis sqlite3 cookiejar} {
+set COOKIEJAR_VERSION 0.2.0
+test http-cookiejar-1.1 "cookie storage: packaging" {cookiejar} {
package require cookiejar
} $COOKIEJAR_VERSION
-test http-cookiejar-1.2 "cookie storage: packaging" {notOSXtravis sqlite3 cookiejar} {
+test http-cookiejar-1.2 "cookie storage: packaging" {cookiejar} {
package require cookiejar
package require cookiejar
} $COOKIEJAR_VERSION
test http-cookiejar-2.1 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -returnCodes error -body {
http::cookiejar
} -result {wrong # args: should be "http::cookiejar method ?arg ...?"}
test http-cookiejar-2.2 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -returnCodes error -body {
http::cookiejar ?
} -result {unknown method "?": must be configure, create, destroy or new}
test http-cookiejar-2.3 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -body {
http::cookiejar configure
} -result {-domainfile -domainlist -domainrefresh -loglevel -offline -purgeold -retain -vacuumtrigger}
test http-cookiejar-2.4 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -returnCodes error -body {
http::cookiejar configure a b c d e
} -result {wrong # args: should be "http::cookiejar configure ?optionName? ?optionValue?"}
test http-cookiejar-2.5 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -returnCodes error -body {
http::cookiejar configure a
} -result {bad option "a": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger}
test http-cookiejar-2.6 "cookie storage: basics" -constraints {
- notOSXtravis sqlite3 cookiejar
+ cookiejar
} -returnCodes error -body {
http::cookiejar configure -d
} -result {ambiguous option "-d": must be -domainfile, -domainlist, -domainrefresh, -loglevel, -offline, -purgeold, -retain, or -vacuumtrigger}
test http-cookiejar-2.7 "cookie storage: basics" -setup {
set old [http::cookiejar configure -loglevel]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
list [http::cookiejar configure -loglevel] \
[http::cookiejar configure -loglevel debug] \
[http::cookiejar configure -loglevel] \
@@ -77,7 +77,7 @@ test http-cookiejar-2.7 "cookie storage: basics" -setup {
} -result {info debug debug error error}
test http-cookiejar-2.8 "cookie storage: basics" -setup {
set old [http::cookiejar configure -loglevel]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
list [http::cookiejar configure -loglevel] \
[http::cookiejar configure -loglevel d] \
[http::cookiejar configure -loglevel i] \
@@ -88,38 +88,38 @@ test http-cookiejar-2.8 "cookie storage: basics" -setup {
} -result {info debug info warn error}
test http-cookiejar-2.9 "cookie storage: basics" -body {
http::cookiejar configure -off
-} -constraints {notOSXtravis sqlite3 cookiejar} -match glob -result *
+} -constraints {cookiejar} -match glob -result *
test http-cookiejar-2.10 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -offline]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -offline true
} -cleanup {
catch {http::cookiejar configure -offline $oldval}
} -result 1
test http-cookiejar-2.11 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -offline]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -offline nonbool
} -cleanup {
catch {http::cookiejar configure -offline $oldval}
} -returnCodes error -result {expected boolean value but got "nonbool"}
test http-cookiejar-2.12 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -purgeold]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -purge nonint
} -cleanup {
catch {http::cookiejar configure -purgeold $oldval}
} -returnCodes error -result {expected positive integer but got "nonint"}
test http-cookiejar-2.13 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -domainrefresh]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -domainref nonint
} -cleanup {
catch {http::cookiejar configure -domainrefresh $oldval}
} -returnCodes error -result {expected positive integer but got "nonint"}
test http-cookiejar-2.14 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -domainrefresh]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -domainref -42
} -cleanup {
catch {http::cookiejar configure -domainrefresh $oldval}
@@ -128,7 +128,7 @@ test http-cookiejar-2.15 "cookie storage: basics" -setup {
set oldval [http::cookiejar configure -domainrefresh]
set result unset
set tracer [http::cookiejar create tracer]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
oo::objdefine $tracer method PostponeRefresh {} {
set ::result set
next
@@ -140,28 +140,28 @@ test http-cookiejar-2.15 "cookie storage: basics" -setup {
catch {http::cookiejar configure -domainrefresh $oldval}
} -result set
-test http-cookiejar-3.1 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} {
+test http-cookiejar-3.1 "cookie storage: class" {cookiejar} {
info object isa object http::cookiejar
} 1
-test http-cookiejar-3.2 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} {
+test http-cookiejar-3.2 "cookie storage: class" {cookiejar} {
info object isa class http::cookiejar
} 1
-test http-cookiejar-3.3 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} {
+test http-cookiejar-3.3 "cookie storage: class" {cookiejar} {
lsort [info object methods http::cookiejar]
} {configure}
-test http-cookiejar-3.4 "cookie storage: class" {notOSXtravis sqlite3 cookiejar} {
+test http-cookiejar-3.4 "cookie storage: class" {cookiejar} {
lsort [info object methods http::cookiejar -all]
} {configure create destroy new}
test http-cookiejar-3.5 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
namespace eval :: {http::cookiejar create cookiejar}
} -cleanup {
catch {rename ::cookiejar ""}
} -result ::cookiejar
test http-cookiejar-3.6 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
list [http::cookiejar create ::cookiejar] [info commands ::cookiejar] \
[::cookiejar destroy] [info commands ::cookiejar]
} -cleanup {
@@ -169,7 +169,7 @@ test http-cookiejar-3.6 "cookie storage: class" -setup {
} -result {::cookiejar ::cookiejar {} {}}
test http-cookiejar-3.7 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar create ::cookiejar foo bar
} -returnCodes error -cleanup {
catch {rename ::cookiejar ""}
@@ -178,7 +178,7 @@ test http-cookiejar-3.8 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
set f [makeFile "" cookiejar]
file delete $f
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
list [file exists $f] [http::cookiejar create ::cookiejar $f] \
[file exists $f]
} -cleanup {
@@ -188,7 +188,7 @@ test http-cookiejar-3.8 "cookie storage: class" -setup {
test http-cookiejar-3.9 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
set f [makeFile "bogus content for a database" cookiejar]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar create ::cookiejar $f
} -returnCodes error -cleanup {
catch {rename ::cookiejar ""}
@@ -197,7 +197,7 @@ test http-cookiejar-3.9 "cookie storage: class" -setup {
test http-cookiejar-3.10 "cookie storage: class" -setup {
catch {rename ::cookiejar ""}
set dir [makeDirectory cookiejar]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar create ::cookiejar $dir
} -returnCodes error -cleanup {
catch {rename ::cookiejar ""}
@@ -206,49 +206,49 @@ test http-cookiejar-3.10 "cookie storage: class" -setup {
test http-cookiejar-4.1 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar
} -returnCodes error -cleanup {
::cookiejar destroy
} -result {wrong # args: should be "cookiejar method ?arg ...?"}
test http-cookiejar-4.2 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar ?
} -returnCodes error -cleanup {
::cookiejar destroy
} -result {unknown method "?": must be destroy, forceLoadDomainData, getCookies, lookup, policyAllow or storeCookie}
test http-cookiejar-4.3 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lsort [info object methods cookiejar -all]
} -cleanup {
::cookiejar destroy
} -result {destroy forceLoadDomainData getCookies lookup policyAllow storeCookie}
test http-cookiejar-4.4 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar getCookies
} -returnCodes error -cleanup {
::cookiejar destroy
} -result {wrong # args: should be "cookiejar getCookies proto host path"}
test http-cookiejar-4.5 "cookie storage" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar getCookies http www.example.com /
} -cleanup {
::cookiejar destroy
} -result {}
test http-cookiejar-4.6 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie
} -returnCodes error -cleanup {
::cookiejar destroy
} -result {wrong # args: should be "cookiejar storeCookie options"}
test http-cookiejar-4.7 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -264,7 +264,7 @@ test http-cookiejar-4.7 "cookie storage: instance" -setup {
test http-cookiejar-4.8 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
oo::objdefine ::cookiejar export Database
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -282,7 +282,7 @@ test http-cookiejar-4.8 "cookie storage: instance" -setup {
test http-cookiejar-4.9 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
oo::objdefine ::cookiejar export Database
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -299,7 +299,7 @@ test http-cookiejar-4.9 "cookie storage: instance" -setup {
} -result 0
test http-cookiejar-4.10 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie [dict replace {
key foo
value bar
@@ -315,7 +315,7 @@ test http-cookiejar-4.10 "cookie storage: instance" -setup {
test http-cookiejar-4.11 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
oo::objdefine ::cookiejar export Database
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie [dict replace {
key foo
value bar
@@ -333,7 +333,7 @@ test http-cookiejar-4.11 "cookie storage: instance" -setup {
test http-cookiejar-4.12 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
oo::objdefine ::cookiejar export Database
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie [dict replace {
key foo
value bar
@@ -351,7 +351,7 @@ test http-cookiejar-4.12 "cookie storage: instance" -setup {
test http-cookiejar-4.13 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lappend result [cookiejar getCookies http www.example.com /]
cookiejar storeCookie {
key foo
@@ -369,7 +369,7 @@ test http-cookiejar-4.13 "cookie storage: instance" -setup {
test http-cookiejar-4.14 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lappend result [cookiejar getCookies http www.example.com /]
cookiejar storeCookie [dict replace {
key foo
@@ -387,7 +387,7 @@ test http-cookiejar-4.14 "cookie storage: instance" -setup {
test http-cookiejar-4.15 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lappend result [cookiejar getCookies http www.example.com /]
cookiejar storeCookie {
key foo
@@ -414,7 +414,7 @@ test http-cookiejar-4.15 "cookie storage: instance" -setup {
test http-cookiejar-4.16 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lappend result [cookiejar getCookies http www.example.com /]
cookiejar storeCookie {
key foo1
@@ -440,7 +440,7 @@ test http-cookiejar-4.16 "cookie storage: instance" -setup {
} -result {{} {foo1 bar foo2 bar}}
test http-cookiejar-4.17 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar lookup a b c d
} -returnCodes error -cleanup {
::cookiejar destroy
@@ -448,7 +448,7 @@ test http-cookiejar-4.17 "cookie storage: instance" -setup {
test http-cookiejar-4.18 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
lappend result [cookiejar lookup]
lappend result [cookiejar lookup www.example.com]
lappend result [catch {cookiejar lookup www.example.com foo} value] $value
@@ -470,7 +470,7 @@ test http-cookiejar-4.18 "cookie storage: instance" -setup {
test http-cookiejar-4.19 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -500,7 +500,7 @@ test http-cookiejar-4.19 "cookie storage: instance" -setup {
test http-cookiejar-4.20 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo1
value bar1
@@ -529,7 +529,7 @@ test http-cookiejar-4.20 "cookie storage: instance" -setup {
test http-cookiejar-4.21 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo1
value bar1
@@ -558,7 +558,7 @@ test http-cookiejar-4.21 "cookie storage: instance" -setup {
test http-cookiejar-4.22 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar forceLoadDomainData x y z
} -returnCodes error -cleanup {
::cookiejar destroy
@@ -566,14 +566,14 @@ test http-cookiejar-4.22 "cookie storage: instance" -setup {
test http-cookiejar-4.23 "cookie storage: instance" -setup {
http::cookiejar create ::cookiejar
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar forceLoadDomainData
} -cleanup {
::cookiejar destroy
} -result {}
test http-cookiejar-4.23.a {cookie storage: instance} -setup {
set off [http::cookiejar configure -offline]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -offline 1
[http::cookiejar create ::cookiejar] destroy
} -cleanup {
@@ -582,7 +582,7 @@ test http-cookiejar-4.23.a {cookie storage: instance} -setup {
} -result {}
test http-cookiejar-4.23.b {cookie storage: instance} -setup {
set off [http::cookiejar configure -offline]
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar configure -offline 0
[http::cookiejar create ::cookiejar] destroy
} -cleanup {
@@ -593,7 +593,7 @@ test http-cookiejar-4.23.b {cookie storage: instance} -setup {
test http-cookiejar-5.1 "cookie storage: constraints" -setup {
http::cookiejar create ::cookiejar
cookiejar forceLoadDomainData
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -610,7 +610,7 @@ test http-cookiejar-5.1 "cookie storage: constraints" -setup {
test http-cookiejar-5.2 "cookie storage: constraints" -setup {
http::cookiejar create ::cookiejar
cookiejar forceLoadDomainData
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar
@@ -627,7 +627,7 @@ test http-cookiejar-5.2 "cookie storage: constraints" -setup {
test http-cookiejar-5.3 "cookie storage: constraints" -setup {
http::cookiejar create ::cookiejar
cookiejar forceLoadDomainData
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo1
value bar
@@ -653,7 +653,7 @@ test http-cookiejar-5.3 "cookie storage: constraints" -setup {
test http-cookiejar-5.4 "cookie storage: constraints" -setup {
http::cookiejar create ::cookiejar
cookiejar forceLoadDomainData
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo
value bar1
@@ -679,7 +679,7 @@ test http-cookiejar-5.4 "cookie storage: constraints" -setup {
test http-cookiejar-5.5 "cookie storage: constraints" -setup {
http::cookiejar create ::cookiejar
cookiejar forceLoadDomainData
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
cookiejar storeCookie {
key foo1
value 1
@@ -777,7 +777,7 @@ test http-cookiejar-6.1 "cookie storage: expiry and lookup" -setup {
global result
lappend result [lsort [lmap {k v} $cookies {set v}]]
}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
values [cookiejar getCookies http www.example.com /]
cookiejar storeCookie {
key foo
@@ -833,7 +833,7 @@ test http-cookiejar-7.1 "cookie storage: persistence of persistent cookies" -set
catch {rename ::cookiejar ""}
set f [makeFile "" cookiejar]
file delete $f
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar create ::cookiejar $f
::cookiejar destroy
http::cookiejar create ::cookiejar $f
@@ -846,7 +846,7 @@ test http-cookiejar-7.2 "cookie storage: persistence of persistent cookies" -set
set f [makeFile "" cookiejar]
file delete $f
set result {}
-} -constraints {notOSXtravis sqlite3 cookiejar} -body {
+} -constraints {cookiejar} -body {
http::cookiejar create ::cookiejar $f
cookiejar storeCookie [dict replace {
key foo
diff --git a/tests/info.test b/tests/info.test
index ce51523..1f3584c 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -735,28 +735,28 @@ proc etrace {} {
test info-22.0 {info frame, levels} {!singleTestInterp} {
info frame
-} 7
+} 9
test info-22.1 {info frame, bad level relative} {!singleTestInterp} {
# catch is another level!, i.e. we have 8, not 7
- catch {info frame -8} msg
+ catch {info frame -10} msg
set msg
-} {bad level "-8"}
+} {bad level "-10"}
test info-22.2 {info frame, bad level absolute} {!singleTestInterp} {
# catch is another level!, i.e. we have 8, not 7
- catch {info frame 9} msg
+ catch {info frame 11} msg
set msg
-} {bad level "9"}
+} {bad level "11"}
test info-22.3 {info frame, current, relative} -match glob -body {
info frame 0
-} -result {type source line 750 file */info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type source line 750 file */info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-22.4 {info frame, current, relative, nested} -match glob -body {
set res [info frame 0]
-} -result {type source line 753 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} -cleanup {unset res}
+} -result {type source line 753 file */info.test cmd {info frame 0} proc ::tcltest::EvalTest} -cleanup {unset res}
test info-22.5 {info frame, current, absolute} -constraints {!singleTestInterp} -match glob -body {
- reduce [info frame 7]
-} -result {type source line 756 file info.test cmd {info frame 7} proc ::tcltest::RunTest}
+ reduce [info frame 9]
+} -result {type source line 756 file info.test cmd {info frame 9} proc ::tcltest::EvalTest}
test info-22.6 {info frame, global, relative} {!singleTestInterp} {
- reduce [info frame -6]
+ reduce [info frame -8]
} {type source line 758 file info.test cmd test\ info-22.6\ \{info\ frame,\ global,\ relative\}\ \{!singleTestInter level 0}
test info-22.7 {info frame, global, absolute} {!singleTestInterp} {
reduce [info frame 1]
@@ -764,8 +764,8 @@ test info-22.7 {info frame, global, absolute} {!singleTestInterp} {
test info-22.8 {info frame, basic trace} -match glob -body {
join [lrange [etrace] 0 2] \n
} -result {* {type source line 730 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest}
-* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}}
+* {type source line 765 file info.test cmd etrace proc ::tcltest::EvalTest}
+* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::EvalTest}}
unset -nocomplain msg
@@ -792,20 +792,20 @@ test info-23.3 {eval'd info frame, literal} -match glob -body {
eval {
info frame 0
}
-} -result {type source line 793 file * cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type source line 793 file * cmd {info frame 0} proc ::tcltest::EvalTest}
test info-23.4 {eval'd info frame, semi-dynamic} {
eval info frame 0
-} {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest}
+} {type eval line 1 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-23.5 {eval'd info frame, dynamic} -cleanup {unset script} -body {
set script {info frame 0}
eval $script
-} -result {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 1 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-23.6 {eval'd info frame, trace} -match glob -cleanup {unset script} -body {
set script {etrace}
join [lrange [eval $script] 0 2] \n
} -result {* {type source line 730 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type eval line 1 cmd etrace proc ::tcltest::RunTest}
-* {type source line 805 file info.test cmd {eval $script} proc ::tcltest::RunTest}}
+* {type eval line 1 cmd etrace proc ::tcltest::EvalTest}
+* {type source line 805 file info.test cmd {eval $script} proc ::tcltest::EvalTest}}
# -------------------------------------------------------------------------
@@ -1024,7 +1024,7 @@ test info-30.0 {bs+nl in literal words} -cleanup {unset res} -body {
# offsets of all bs+nl sequences in literal words, then using the
# information in the bcc and other places to bump line numbers when
# parsing over the location. Also affected: testcases 22.8 and 23.6.
-} -result {type source line 1018 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type source line 1018 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
# -------------------------------------------------------------------------
# See 24.0 - 24.5 for similar situations, using literal scripts.
@@ -1042,36 +1042,36 @@ test info-31.0 {ns eval, script in variable} -body {namespace eval foo {variable
test info-31.1 {if, script in variable} -cleanup {unset res a flag} -body {
if 1 $body
return $res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-31.1a {if, script in variable} -cleanup {unset res a flag} -body {
if 1 then $body
return $res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-31.2 {while, script in variable} -cleanup {unset flag res a} -body {
set flag 1
while {$flag} $body
return $res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
# .3 - proc - scoping prevent return of result ...
test info-31.4 {foreach, script in variable} -cleanup {unset var res a flag} -body {
foreach var val $body
set res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-31.5 {for, script in variable} -cleanup {unset flag res a} -body {
set flag 1
for {} {$flag} {} $body
return $res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
test info-31.6 {eval, script in variable} -cleanup {unset res a flag} -body {
eval $body
return $res
-} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::EvalTest}
# -------------------------------------------------------------------------
@@ -1319,8 +1319,8 @@ test info-37.0 {eval pure list, single line} -match glob -body {
eval $cmd
return $res
} -result {* {type source line 730 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type eval line 2 cmd etrace proc ::tcltest::RunTest}
-* {type eval line 1 cmd foreac proc ::tcltest::RunTest}} -cleanup {unset foo cmd res b c}
+* {type eval line 2 cmd etrace proc ::tcltest::EvalTest}
+* {type eval line 1 cmd foreac proc ::tcltest::EvalTest}} -cleanup {unset foo cmd res b c}
# -------------------------------------------------------------------------
@@ -1360,8 +1360,8 @@ test info-38.1 {location information for uplevel, dv, direct-var} -match glob -b
}
join [lrange [uplevel \#0 $script] 0 2] \n
} -result {* {type source line 730 file info.test cmd {info frame $level} proc ::etrace level 0}
-* {type eval line 3 cmd etrace proc ::tcltest::RunTest}
-* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} -cleanup {unset script y}
+* {type eval line 3 cmd etrace proc ::tcltest::EvalTest}
+* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::EvalTest}} -cleanup {unset script y}
# 38.2 moved to bottom to not disturb other tests with the necessary changes to this one.
@@ -1381,7 +1381,7 @@ test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match g
} -result {* {type source line 730 file info.test cmd {info frame $level} proc ::etrace level 0}
* {type eval line 3 cmd etrace proc ::control}
* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
-* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::RunTest}} -cleanup {unset script y}
+* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::EvalTest}} -cleanup {unset script y}
# 38.4 moved to bottom to not disturb other tests with the necessary changes to this one.
@@ -1399,7 +1399,7 @@ test info-38.5 {location information for uplevel, ppv, proc-proc-var} -match glo
* {type eval line 3 cmd etrace proc ::control}
* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control}
* {type source line 1353 file info.test cmd {control y $script} proc ::datav level 1}
-* {type source line 1397 file info.test cmd datav proc ::tcltest::RunTest}}
+* {type source line 1397 file info.test cmd datav proc ::tcltest::EvalTest}}
# 38.6 moved to bottom to not disturb other tests with the necessary changes to this one.
@@ -1413,9 +1413,9 @@ testConstraint testevalex [llength [info commands testevalex]]
test info-38.7 {location information for arg substitution} -constraints testevalex -match glob -body {
join [lrange [testevalex {return -level 0 [etrace]}] 0 3] \n
} -result {* {type source line 730 file info.test cmd {info frame \$level} proc ::etrace level 0}
-* {type eval line 1 cmd etrace proc ::tcltest::RunTest}
-* {type source line 1414 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::RunTest}
-* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}}
+* {type eval line 1 cmd etrace proc ::tcltest::EvalTest}
+* {type source line 1414 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::EvalTest}
+* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::EvalTest}}
# -------------------------------------------------------------------------
# literal sharing
@@ -1463,7 +1463,7 @@ test info-30.3 {bs+nl in literal words, namespace multi-word script} {
namespace eval xxx variable res \
[list [reduce [info frame 0]]];# line 1464
return $xxx::res
-} {type source line 1464 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1464 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.4 {bs+nl in literal words, eval script} -cleanup {unset res} -body {
eval {
@@ -1471,7 +1471,7 @@ test info-30.4 {bs+nl in literal words, eval script} -cleanup {unset res} -body
[reduce [info frame 0]];# line 1471
}
return $res
-} -result {type source line 1471 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type source line 1471 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.5 {bs+nl in literal words, eval script, with nested words} -body {
eval {
@@ -1482,12 +1482,12 @@ test info-30.5 {bs+nl in literal words, eval script, with nested words} -body {
}
}
return $res
-} -cleanup {unset res} -result {type source line 1481 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res} -result {type source line 1481 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.6 {bs+nl in computed word} -cleanup {unset res} -body {
set res "\
[reduce [info frame 0]]";# line 1489
-} -result { type source line 1489 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result { type source line 1489 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.7 {bs+nl in computed word, in proc} -body {
proc abra {} {
@@ -1505,7 +1505,7 @@ test info-30.8 {bs+nl in computed word, nested eval} -body {
res "\
[reduce [info frame 0]]";# line 1506
}
-} -cleanup {unset res} -result { type source line 1506 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res} -result { type source line 1506 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.9 {bs+nl in computed word, nested eval} -body {
eval {
@@ -1514,7 +1514,7 @@ test info-30.9 {bs+nl in computed word, nested eval} -body {
[reduce \
[info frame 0]]";# line 1515
}
-} -cleanup {unset res} -result { type source line 1515 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res} -result { type source line 1515 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.10 {bs+nl in computed word, key to array} -body {
set tmp([set \
@@ -1523,14 +1523,14 @@ test info-30.10 {bs+nl in computed word, key to array} -body {
[info frame 0]]"]) x ; #1523
unset tmp
set res
-} -cleanup {unset res} -result { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res} -result { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.11 {bs+nl in subst arguments} -body {
subst {[set \
res "\
[reduce \
[info frame 0]]"]} ; #1532
-} -cleanup {unset res} -result { type source line 1532 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res} -result { type source line 1532 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.12 {bs+nl in computed word, nested eval} -body {
eval {
@@ -1540,7 +1540,7 @@ test info-30.12 {bs+nl in computed word, nested eval} -body {
[reduce \
[info frame 0]]";# line 1541
}
-} -cleanup {unset res x} -result { type source line 1541 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset res x} -result { type source line 1541 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.13 {bs+nl in literal words, uplevel script, with nested words} -body {
subinterp ; set res [interp eval sub { uplevel #0 {
@@ -1601,7 +1601,7 @@ test info-30.17 {bs+nl in multi-body switch, direct} {
^key { reduce [info frame 0] ;# 1601 } \
\t### { } \
{[0-9]*} { }
-} {type source line 1601 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1601 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.18 {bs+nl, literal word, uplevel through proc, appended, loss of primary tracking data} {
proc abra {script} {
@@ -1644,7 +1644,7 @@ test info-30.20 {bs+nl in single-body switch, direct} {
\t### { }
{[0-9]*} { }
}
-} {type source line 1643 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1643 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.21 {bs+nl in if, full compiled} {
proc a {value} {
@@ -1710,71 +1710,71 @@ type source line 1700 file info.test cmd {info frame 0} proc ::a level 0}
test info-30.25 {TIP 280 for compiled [subst]} {
subst {[reduce [info frame 0]]} ; # 1712
-} {type source line 1712 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1712 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.26 {TIP 280 for compiled [subst]} {
subst \
{[reduce [info frame 0]]} ; # 1716
-} {type source line 1716 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1716 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.27 {TIP 280 for compiled [subst]} {
subst {
[reduce [info frame 0]]} ; # 1720
} {
-type source line 1720 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1720 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.28 {TIP 280 for compiled [subst]} {
subst {\
[reduce [info frame 0]]} ; # 1725
-} { type source line 1725 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} { type source line 1725 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.29 {TIP 280 for compiled [subst]} {
subst {foo\
[reduce [info frame 0]]} ; # 1729
-} {foo type source line 1729 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {foo type source line 1729 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.30 {TIP 280 for compiled [subst]} {
subst {foo
[reduce [info frame 0]]} ; # 1733
} {foo
-type source line 1733 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1733 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.31 {TIP 280 for compiled [subst]} {
subst {[][reduce [info frame 0]]} ; # 1737
-} {type source line 1737 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1737 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.32 {TIP 280 for compiled [subst]} {
subst {[\
][reduce [info frame 0]]} ; # 1741
-} {type source line 1741 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1741 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.33 {TIP 280 for compiled [subst]} {
subst {[
][reduce [info frame 0]]} ; # 1745
-} {type source line 1745 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1745 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.34 {TIP 280 for compiled [subst]} {
subst {[format %s {}
][reduce [info frame 0]]} ; # 1749
-} {type source line 1749 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1749 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.35 {TIP 280 for compiled [subst]} {
subst {[format %s {}
]
[reduce [info frame 0]]} ; # 1754
} {
-type source line 1754 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1754 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.36 {TIP 280 for compiled [subst]} {
subst {
[format %s {}][reduce [info frame 0]]} ; # 1759
} {
-type source line 1759 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1759 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.37 {TIP 280 for compiled [subst]} {
subst {
[format %s {}]
[reduce [info frame 0]]} ; # 1765
} {
-type source line 1765 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1765 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.38 {TIP 280 for compiled [subst]} {
subst {\
[format %s {}][reduce [info frame 0]]} ; # 1771
-} { type source line 1771 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} { type source line 1771 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.39 {TIP 280 for compiled [subst]} {
subst {\
[format %s {}]\
[reduce [info frame 0]]} ; # 1776
-} { type source line 1776 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} { type source line 1776 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.40 {TIP 280 for compiled [subst]} -setup {
unset -nocomplain empty
} -body {
@@ -1782,7 +1782,7 @@ test info-30.40 {TIP 280 for compiled [subst]} -setup {
subst {$empty[reduce [info frame 0]]} ; # 1782
} -cleanup {
unset empty
-} -result {type source line 1782 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result {type source line 1782 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.41 {TIP 280 for compiled [subst]} -setup {
unset -nocomplain empty
} -body {
@@ -1792,7 +1792,7 @@ test info-30.41 {TIP 280 for compiled [subst]} -setup {
} -cleanup {
unset empty
} -result {
-type source line 1791 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+type source line 1791 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.42 {TIP 280 for compiled [subst]} -setup {
unset -nocomplain empty
} -body {
@@ -1800,25 +1800,25 @@ test info-30.42 {TIP 280 for compiled [subst]} -setup {
[reduce [info frame 0]]} ; # 1800
} -cleanup {
unset empty
-} -result { type source line 1800 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -result { type source line 1800 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.43 {TIP 280 for compiled [subst]} -body {
unset -nocomplain a\nb
set a\nb {}
subst {${a
b}[reduce [info frame 0]]} ; # 1808
-} -cleanup {unset a\nb} -result {type source line 1808 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} -cleanup {unset a\nb} -result {type source line 1808 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.44 {TIP 280 for compiled [subst]} {
unset -nocomplain a
set a(\n) {}
subst {$a(
)[reduce [info frame 0]]} ; # 1814
-} {type source line 1814 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1814 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.45 {TIP 280 for compiled [subst]} {
unset -nocomplain a
set a() {}
subst {$a([
return -level 0])[reduce [info frame 0]]} ; # 1820
-} {type source line 1820 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
+} {type source line 1820 file info.test cmd {info frame 0} proc ::tcltest::EvalTest}
test info-30.46 {TIP 280 for compiled [subst]} {
unset -nocomplain a
set a(1825) YES; set a(1824) 1824; set a(1826) 1826
@@ -1835,7 +1835,7 @@ unset -nocomplain a
test info-30.48 {Bug 2850901} testevalex {
testevalex {return -level 0 [format %s {}
][reduce [info frame 0]]} ; # line 2 of the eval
-} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest}
+} {type eval line 2 cmd {info frame 0} proc ::tcltest::EvalTest}
# -------------------------------------------------------------------------
diff --git a/tests/io.test b/tests/io.test
index 519191f..73481ca 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -7447,7 +7447,7 @@ test io-53.3 {CopyData: background read underflow} {stdio unix openpipe fcopy} {
close $f
set result
} "ready line1 line2 {done\n}"
-test io-53.4 {CopyData: background write overflow} {stdio unix openpipe fileevent fcopy} {
+test io-53.4 {CopyData: background write overflow} {stdio openpipe fileevent fcopy} {
set big bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n
variable x
for {set x 0} {$x < 12} {incr x} {
diff --git a/tests/oo.test b/tests/oo.test
index c8f4b21..235a90d 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -1422,6 +1422,35 @@ test oo-7.9 {OO: defining inheritance in namespaces} -setup {
return
}
} -result {}
+test oo-7.10 {OO: next after object deletion, bug [135804138e]} -setup {
+ set ::result ""
+ oo::class create c1 {
+ method m1 {} {
+ lappend ::result c1::m1
+ }
+ }
+ oo::class create c2 {
+ superclass c1
+ destructor {
+ lappend ::result c2::destructor
+ my m1
+ lappend ::result /c2::destructor
+ }
+ method m1 {} {
+ lappend ::result c2::m1
+ rename [self] {}
+ lappend ::result no-self
+ next
+ lappend ::result /c2::m1
+ }
+ }
+} -body {
+ c2 create o
+ lappend ::result [catch {o m1} msg] $msg
+} -cleanup {
+ c1 destroy
+ unset ::result
+} -result {c2::m1 c2::destructor c2::m1 no-self c1::m1 /c2::m1 /c2::destructor no-self 1 {no next method implementation}}
test oo-8.1 {OO: global must work in methods} {
oo::object create foo
diff --git a/tests/opt.test b/tests/opt.test
index 2732d40..14a6e04 100644
--- a/tests/opt.test
+++ b/tests/opt.test
@@ -17,7 +17,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
# the package we are going to test
-package require opt 0.4.6
+package require opt 0.4.7
# we are using implementation specifics to test the package
diff --git a/tests/string.test b/tests/string.test
index f077164..e15787a 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -121,10 +121,10 @@ test string-2.11.$noComp {string compare, unicode} {
run {string compare ab\u7266 ab\u7267}
} -1
test string-2.11.1.$noComp {string compare, unicode} {
- run {string compare \334 \u00dc}
+ run {string compare \334 \xDC}
} 0
test string-2.11.2.$noComp {string compare, unicode} {
- run {string compare \334 \u00fc}
+ run {string compare \334 \xFC}
} -1
test string-2.11.3.$noComp {string compare, unicode} {
run {string compare \334\334\334\374\374 \334\334\334\334\334}
@@ -151,10 +151,10 @@ test string-2.15.$noComp {string compare -nocase} {
run {string compare -nocase abcde abcde}
} 0
test string-2.15.1.$noComp {string compare -nocase} {
- run {string compare -nocase \334 \u00dc}
+ run {string compare -nocase \334 \xDC}
} 0
test string-2.15.2.$noComp {string compare -nocase} {
- run {string compare -nocase \334\334\334\374\u00fc \334\334\334\334\334}
+ run {string compare -nocase \334\334\334\374\xFC \334\334\334\334\334}
} 0
test string-2.16.$noComp {string compare -nocase with length} {
run {string compare -length 2 -nocase abcde Abxyz}
@@ -276,10 +276,10 @@ test string-3.16.$noComp {string equal, unicode} {
run {string equal ab\u7266 ab\u7267}
} 0
test string-3.17.$noComp {string equal, unicode} {
- run {string equal \334 \u00dc}
+ run {string equal \334 \xDC}
} 1
test string-3.18.$noComp {string equal, unicode} {
- run {string equal \334 \u00fc}
+ run {string equal \334 \xFC}
} 0
test string-3.19.$noComp {string equal, unicode} {
run {string equal \334\334\334\374\374 \334\334\334\334\334}
@@ -297,10 +297,10 @@ test string-3.21.$noComp {string equal -nocase} {
run {string equal -nocase abcde Abdef}
} 0
test string-3.22.$noComp {string equal, -nocase unicode} {
- run {string equal -nocase \334 \u00dc}
+ run {string equal -nocase \334 \xDC}
} 1
test string-3.23.$noComp {string equal, -nocase unicode} {
- run {string equal -nocase \334\334\334\374\u00fc \334\334\334\334\334}
+ run {string equal -nocase \334\334\334\374\xFC \334\334\334\334\334}
} 1
test string-3.24.$noComp {string equal -nocase with length} {
run {string equal -length 2 -nocase abcde Abxyz}
@@ -411,7 +411,7 @@ test string-4.15.$noComp {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]
# which pointed past the end of the string.
- set uchar \u057e ;# character with two-byte encoding in utf-8
+ set uchar \u057E ;# character with two-byte encoding in utf-8
run {string first % %#$uchar$uchar#$uchar$uchar#% 3}
} 8
test string-4.16.$noComp {string first, normal string vs pure unicode string} {
@@ -559,7 +559,7 @@ test string-6.12.$noComp {string is alnum, true} {
test string-6.13.$noComp {string is alnum, false} {
list [run {string is alnum -failindex var abc1.23}] $var
} {0 4}
-test string-6.14.$noComp {string is alnum, unicode} "run {string is alnum abc\xfc}" 1
+test string-6.14.$noComp {string is alnum, unicode} "run {string is alnum abc\xFC}" 1
test string-6.15.$noComp {string is alpha, true} {
run {string is alpha abc}
} 1
@@ -570,10 +570,10 @@ test string-6.17.$noComp {string is alpha, unicode} {
run {string is alpha abc\374}
} 1
test string-6.18.$noComp {string is ascii, true} {
- run {string is ascii abc\u007Fend\u0000}
+ run {string is ascii abc\x7Fend\x00}
} 1
test string-6.19.$noComp {string is ascii, false} {
- list [run {string is ascii -fail var abc\u0000def\u0080more}] $var
+ list [run {string is ascii -fail var abc\x00def\x80more}] $var
} {0 7}
test string-6.20.$noComp {string is boolean, true} {
run {string is boolean true}
@@ -591,7 +591,7 @@ test string-6.24.$noComp {string is digit, true} {
run {string is digit 0123456789}
} 1
test string-6.25.$noComp {string is digit, false} {
- list [run {string is digit -fail var 0123\u00dc567}] $var
+ list [run {string is digit -fail var 0123\xDC567}] $var
} {0 4}
test string-6.26.$noComp {string is digit, false} {
list [run {string is digit -fail var +123567}] $var
@@ -714,7 +714,7 @@ test string-6.60.$noComp {string is lower, true} {
run {string is lower abc}
} 1
test string-6.61.$noComp {string is lower, unicode true} {
- run {string is lower abc\u00fcue}
+ run {string is lower abc\xFCue}
} 1
test string-6.62.$noComp {string is lower, false} {
list [run {string is lower -fail var aBc}] $var
@@ -723,7 +723,7 @@ test string-6.63.$noComp {string is lower, false} {
list [run {string is lower -fail var abc1}] $var
} {0 3}
test string-6.64.$noComp {string is lower, unicode false} {
- list [run {string is lower -fail var ab\u00dcUE}] $var
+ list [run {string is lower -fail var ab\xDCUE}] $var
} {0 2}
test string-6.65.$noComp {string is space, true} {
run {string is space " \t\n\v\f"}
@@ -761,7 +761,7 @@ test string-6.75.$noComp {string is upper, true} {
run {string is upper ABC}
} 1
test string-6.76.$noComp {string is upper, unicode true} {
- run {string is upper ABC\u00dcUE}
+ run {string is upper ABC\xDCUE}
} 1
test string-6.77.$noComp {string is upper, false} {
list [run {string is upper -fail var AbC}] $var
@@ -770,19 +770,19 @@ test string-6.78.$noComp {string is upper, false} {
list [run {string is upper -fail var AB2C}] $var
} {0 2}
test string-6.79.$noComp {string is upper, unicode false} {
- list [run {string is upper -fail var ABC\u00fcue}] $var
+ list [run {string is upper -fail var ABC\xFCue}] $var
} {0 3}
test string-6.80.$noComp {string is wordchar, true} {
run {string is wordchar abc_123}
} 1
test string-6.81.$noComp {string is wordchar, unicode true} {
- run {string is wordchar abc\u00fcab\u00dcAB\u5001}
+ run {string is wordchar abc\xFCab\xDCAB\u5001}
} 1
test string-6.82.$noComp {string is wordchar, false} {
list [run {string is wordchar -fail var abcd.ef}] $var
} {0 4}
test string-6.83.$noComp {string is wordchar, unicode false} {
- list [run {string is wordchar -fail var abc\u0080def}] $var
+ list [run {string is wordchar -fail var abc\x80def}] $var
} {0 3}
test string-6.84.$noComp {string is control} {
## Control chars are in the ranges
@@ -798,14 +798,14 @@ test string-6.86.$noComp {string is graph} {
} {0 14}
test string-6.87.$noComp {string is print} {
## basically any printable char
- list [run {string is print -fail var "0123abc!@#\$\u0100 \UE0100\UE01EF\u0010"}] $var
+ list [run {string is print -fail var "0123abc!@#\$\u0100 \UE0100\UE01EF\x10"}] $var
} {0 15}
test string-6.88.$noComp {string is punct} {
## any graph char that isn't alnum
- list [run {string is punct -fail var "_!@#\u00beq0"}] $var
+ list [run {string is punct -fail var "_!@#\xBEq0"}] $var
} {0 4}
test string-6.89.$noComp {string is xdigit} {
- list [run {string is xdigit -fail var 0123456789\u0061bcdefABCDEFg}] $var
+ list [run {string is xdigit -fail var 0123456789\x61bcdefABCDEFg}] $var
} {0 22}
test string-6.90.$noComp {string is integer, bad integers} {
@@ -895,7 +895,7 @@ test string-6.108.$noComp {string is double, Bug 1382287} {
run {string is double $x}
} 0
test string-6.109.$noComp {string is double, Bug 1360532} {
- run {string is double 1\u00a0}
+ run {string is double 1\xA0}
} 0
test string-6.110.$noComp {string is entier, true} {
run {string is entier +1234567890}
@@ -1030,7 +1030,7 @@ test string-8.2.$noComp {string bytelength} {
list [catch {run {string bytelength a b}} msg] $msg
} {1 {wrong # args: should be "string bytelength string"}}
test string-8.3.$noComp {string bytelength} {
- run {string bytelength "\u00c7"}
+ run {string bytelength "\xC7"}
} 2
test string-8.4.$noComp {string bytelength} {
run {string b ""}
@@ -1378,7 +1378,7 @@ test string-11.51.$noComp {string match; *, -nocase and UTF-8} {
test string-11.52.$noComp {string match, null char in string} {
set out ""
set ptn "*abc*"
- foreach elem [list "\u0000@abc" "@abc" "\u0000@abc\u0000" "blahabcblah"] {
+ foreach elem [list "\x00@abc" "@abc" "\x00@abc\x00" "blahabcblah"] {
lappend out [run {string match $ptn $elem}]
}
set out
@@ -1386,11 +1386,11 @@ test string-11.52.$noComp {string match, null char in string} {
test string-11.53.$noComp {string match, null char in pattern} {
set out ""
foreach {ptn elem} [list \
- "*\u0000abc\u0000" "\u0000abc\u0000" \
- "*\u0000abc\u0000" "\u0000abc\u0000ef" \
- "*\u0000abc\u0000*" "\u0000abc\u0000ef" \
- "*\u0000abc\u0000" "@\u0000abc\u0000ef" \
- "*\u0000abc\u0000*" "@\u0000abc\u0000ef" \
+ "*\x00abc\x00" "\x00abc\x00" \
+ "*\x00abc\x00" "\x00abc\x00ef" \
+ "*\x00abc\x00*" "\x00abc\x00ef" \
+ "*\x00abc\x00" "@\x00abc\x00ef" \
+ "*\x00abc\x00*" "@\x00abc\x00ef" \
] {
lappend out [run {string match $ptn $elem}]
}
@@ -1399,14 +1399,14 @@ test string-11.53.$noComp {string match, null char in pattern} {
test string-11.54.$noComp {string match, failure} {
set longString ""
for {set i 0} {$i < 10} {incr i} {
- append longString "abcdefghijklmnopqrstuvwxy\u0000z01234567890123"
+ append longString "abcdefghijklmnopqrstuvwxy\x00z01234567890123"
}
run {string first $longString 123}
list [run {string match *cba* $longString}] \
- [run {string match *a*l*\u0000* $longString}] \
- [run {string match *a*l*\u0000*123 $longString}] \
- [run {string match *a*l*\u0000*123* $longString}] \
- [run {string match *a*l*\u0000*cba* $longString}] \
+ [run {string match *a*l*\x00* $longString}] \
+ [run {string match *a*l*\x00*123 $longString}] \
+ [run {string match *a*l*\x00*123* $longString}] \
+ [run {string match *a*l*\x00*cba* $longString}] \
[run {string match *===* $longString}]
} {0 1 1 1 0 0}
test string-11.55.$noComp {string match, invalid binary optimization} {
@@ -1479,8 +1479,8 @@ test string-12.19.$noComp {string range, bytearray object} {
run {string equal $r1 $r2}
} 1
test string-12.20.$noComp {string range, out of bounds indices} {
- run {string range \u00ff 0 1}
-} \u00ff
+ run {string range \xFF 0 1}
+} \xFF
# Bug 1410553
test string-12.21.$noComp {string range, regenerates correct reps, bug 1410553} {
set bytes "\x00 \x03 \x41"
@@ -1648,7 +1648,7 @@ test stringComp-14.24.$noComp {Bug 1af8de570511} {
}} 4 x
} 0x00
test stringComp-14.25.$noComp {} {
- string length [string replace [string repeat a\u00fe 2] 3 end {}]
+ string length [string replace [string repeat a\xFE 2] 3 end {}]
} 3
test string-15.1.$noComp {string tolower too few args} {
@@ -1679,8 +1679,8 @@ test string-15.9.$noComp {string tolower} {
run {string tolower ABC 0 end-1}
} abC
test string-15.10.$noComp {string tolower, unicode} {
- run {string tolower ABCabc\xc7\xe7}
-} "abcabc\xe7\xe7"
+ run {string tolower ABCabc\xC7\xE7}
+} "abcabc\xE7\xE7"
test string-15.11.$noComp {string tolower, compiled} {
lindex [run {string tolower [list A B [list C]]}] 1
} b
@@ -1713,8 +1713,8 @@ test string-16.9.$noComp {string toupper} {
run {string toupper abc 0 end-1}
} ABc
test string-16.10.$noComp {string toupper, unicode} {
- run {string toupper ABCabc\xc7\xe7}
-} "ABCABC\xc7\xc7"
+ run {string toupper ABCabc\xC7\xE7}
+} "ABCABC\xC7\xC7"
test string-16.11.$noComp {string toupper, compiled} {
lindex [run {string toupper [list a b [list c]]}] 1
} B
@@ -1735,11 +1735,11 @@ test string-17.5.$noComp {string totitle} {
run {string totitle {123#$&*()}}
} {123#$&*()}
test string-17.6.$noComp {string totitle, unicode} {
- run {string totitle ABCabc\xc7\xe7}
-} "Abcabc\xe7\xe7"
+ run {string totitle ABCabc\xC7\xE7}
+} "Abcabc\xE7\xE7"
test string-17.7.$noComp {string totitle, unicode} {
- run {string totitle \u01f3BCabc\xc7\xe7}
-} "\u01f2bcabc\xe7\xe7"
+ run {string totitle \u01F3BCabc\xC7\xE7}
+} "\u01F2bcabc\xE7\xE7"
test string-17.8.$noComp {string totitle, compiled} {
lindex [run {string totitle [list aa bb [list cc]]}] 0
} Aa
@@ -1779,10 +1779,10 @@ test string-18.10.$noComp {string trim} {
run {string trim ABC DEF}
} {ABC}
test string-18.11.$noComp {string trim, unicode} {
- run {string trim "\xe7\xe8 AB\xe7C \xe8\xe7" \xe7\xe8}
-} " AB\xe7C "
+ run {string trim "\xE7\xE8 AB\xE7C \xE8\xE7" \xE7\xE8}
+} " AB\xE7C "
test string-18.12.$noComp {string trim, unicode default} {
- run {string trim \ufeff\x00\u0085\u00a0\u1680\u180eABC\u1361\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000}
+ run {string trim \uFEFF\x00\x85\xA0\u1680\u180EABC\u1361\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000}
} ABC\u1361
test string-19.1.$noComp {string trimleft} {
@@ -1792,7 +1792,7 @@ test string-19.2.$noComp {string trimleft} {
run {string trimleft " XYZ "}
} {XYZ }
test string-19.3.$noComp {string trimleft, unicode default} {
- run {string trimleft \ufeff\u0085\u00a0\x00\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000\u1361ABC}
+ run {string trimleft \uFEFF\x85\xA0\x00\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000\u1361ABC}
} \u1361ABC
test string-20.1.$noComp {string trimright errors} {
@@ -1811,7 +1811,7 @@ test string-20.5.$noComp {string trimright} {
run {string trimright ""}
} {}
test string-20.6.$noComp {string trimright, unicode default} {
- run {string trimright ABC\u1361\u0085\x00\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000}
+ run {string trimright ABC\u1361\x85\x00\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000}
} ABC\u1361
test string-21.1.$noComp {string wordend} {
@@ -1842,19 +1842,19 @@ test string-21.9.$noComp {string wordend} {
run {string worde "x.y" end-1}
} 2
test string-21.10.$noComp {string wordend, unicode} {
- run {string wordend "xyz\u00c7de fg" 0}
+ run {string wordend "xyz\xC7de fg" 0}
} 6
test string-21.11.$noComp {string wordend, unicode} {
- run {string wordend "xyz\uc700de fg" 0}
+ run {string wordend "xyz\uC700de fg" 0}
} 6
test string-21.12.$noComp {string wordend, unicode} {
- run {string wordend "xyz\u203fde fg" 0}
+ run {string wordend "xyz\u203Fde fg" 0}
} 6
test string-21.13.$noComp {string wordend, unicode} {
run {string wordend "xyz\u2045de fg" 0}
} 3
test string-21.14.$noComp {string wordend, unicode} {
- run {string wordend "\uc700\uc700 abc" 8}
+ run {string wordend "\uC700\uC700 abc" 8}
} 6
test string-22.1.$noComp {string wordstart} {
@@ -1888,13 +1888,13 @@ test string-22.10.$noComp {string wordstart} {
run {string wordstart "one two three" end-5}
} 7
test string-22.11.$noComp {string wordstart, unicode} {
- run {string wordstart "one tw\u00c7o three" 7}
+ run {string wordstart "one tw\xC7o three" 7}
} 4
test string-22.12.$noComp {string wordstart, unicode} {
- run {string wordstart "ab\uc700\uc700 cdef ghi" 12}
+ run {string wordstart "ab\uC700\uC700 cdef ghi" 12}
} 10
test string-22.13.$noComp {string wordstart, unicode} {
- run {string wordstart "\uc700\uc700 abc" 8}
+ run {string wordstart "\uC700\uC700 abc" 8}
} 3
test string-23.0.$noComp {string is boolean, Bug 1187123} testindexobj {
@@ -1965,40 +1965,40 @@ test string-24.4.$noComp {string reverse command - unshared string} {
run {string reverse $x$y}
} edcba
test string-24.5.$noComp {string reverse command - shared unicode string} {
- set x abcde\ud0ad
+ set x abcde\uD0AD
run {string reverse $x}
-} \ud0adedcba
+} \uD0ADedcba
test string-24.6.$noComp {string reverse command - unshared string} {
set x abc
- set y de\ud0ad
+ set y de\uD0AD
run {string reverse $x$y}
-} \ud0adedcba
+} \uD0ADedcba
test string-24.7.$noComp {string reverse command - simple case} {
run {string reverse a}
} a
test string-24.8.$noComp {string reverse command - simple case} {
- run {string reverse \ud0ad}
-} \ud0ad
+ run {string reverse \uD0AD}
+} \uD0AD
test string-24.9.$noComp {string reverse command - simple case} {
run {string reverse {}}
} {}
test string-24.10.$noComp {string reverse command - corner case} {
- set x \ubeef\ud0ad
+ set x \uBEEF\uD0AD
run {string reverse $x}
-} \ud0ad\ubeef
+} \uD0AD\uBEEF
test string-24.11.$noComp {string reverse command - corner case} {
- set x \ubeef
- set y \ud0ad
+ set x \uBEEF
+ set y \uD0AD
run {string reverse $x$y}
-} \ud0ad\ubeef
+} \uD0AD\uBEEF
test string-24.12.$noComp {string reverse command - corner case} {
- set x \ubeef
- set y \ud0ad
+ set x \uBEEF
+ set y \uD0AD
run {string is ascii [run {string reverse $x$y}]}
} 0
test string-24.13.$noComp {string reverse command - pure Unicode string} {
- run {string reverse [run {string range \ubeef\ud0ad\ubeef\ud0ad\ubeef\ud0ad 1 5}]}
-} \ud0ad\ubeef\ud0ad\ubeef\ud0ad
+ run {string reverse [run {string range \uBEEF\uD0AD\uBEEF\uD0AD\uBEEF\uD0AD 1 5}]}
+} \uD0AD\uBEEF\uD0AD\uBEEF\uD0AD
test string-24.14.$noComp {string reverse command - pure bytearray} {
binary scan [run {string reverse [binary format H* 010203]}] H* x
set x
@@ -2054,7 +2054,7 @@ test string-25.13.$noComp {string is list} {
} {0 2}
test string-25.14.$noComp {string is list} {
set x {}
- list [run {string is list -failindex x "\uabcd {b c}d e"}] $x
+ list [run {string is list -failindex x "\uABCD {b c}d e"}] $x
} {0 2}
test string-26.1.$noComp {tcl::prefix, too few args} -body {
@@ -2475,7 +2475,7 @@ test string-32.13.$noComp {string is dict} {
} {0 2}
test string-32.14.$noComp {string is dict} {
set x {}
- list [string is dict -failindex x "\uabcd {b c}d e"] $x
+ list [string is dict -failindex x "\uABCD {b c}d e"] $x
} {0 2}
test string-32.15.$noComp {string is dict, valid dict} {
string is dict {a b c d e f}
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index c3c8650..b0aa054 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -24,7 +24,7 @@ namespace eval ::tcltests {
proc tempdir_alternate {} {
- file tempfile tempfile
+ close [file tempfile tempfile]
set tmpdir [file dirname $tempfile]
set execname [info nameofexecutable]
regsub -all {[^[:alpha:][:digit:]]} $execname _ execname
diff --git a/tests/utf.test b/tests/utf.test
index f75d19e..f830110 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -27,34 +27,40 @@ test utf-1.1 {Tcl_UniCharToUtf: 1 byte sequences} testbytestring {
expr {"\x01" eq [testbytestring "\x01"]}
} 1
test utf-1.2 {Tcl_UniCharToUtf: 2 byte sequences} testbytestring {
- expr {"\x00" eq [testbytestring "\xc0\x80"]}
+ expr {"\x00" eq [testbytestring "\xC0\x80"]}
} 1
test utf-1.3 {Tcl_UniCharToUtf: 2 byte sequences} testbytestring {
- expr {"\xe0" eq [testbytestring "\xc3\xa0"]}
+ expr {"\xE0" eq [testbytestring "\xC3\xA0"]}
} 1
test utf-1.4 {Tcl_UniCharToUtf: 3 byte sequences} testbytestring {
- expr {"\u4e4e" eq [testbytestring "\xe4\xb9\x8e"]}
+ expr {"\u4E4E" eq [testbytestring "\xE4\xB9\x8E"]}
} 1
test utf-1.5 {Tcl_UniCharToUtf: overflowed Tcl_UniChar} testbytestring {
- expr {[format %c 0x110000] eq [testbytestring "\xef\xbf\xbd"]}
+ expr {[format %c 0x110000] eq [testbytestring "\xEF\xBF\xBD"]}
} 1
test utf-1.6 {Tcl_UniCharToUtf: negative Tcl_UniChar} testbytestring {
- expr {[format %c -1] eq [testbytestring "\xef\xbf\xbd"]}
+ expr {[format %c -1] eq [testbytestring "\xEF\xBF\xBD"]}
} 1
test utf-1.7 {Tcl_UniCharToUtf: 4 byte sequences} -constraints testbytestring -body {
- expr {"\U014e4e" eq [testbytestring "\xf0\x94\xb9\x8e"]}
+ expr {"\U014E4E" eq [testbytestring "\xF0\x94\xB9\x8E"]}
} -result 1
test utf-1.8 {Tcl_UniCharToUtf: 3 byte sequence, high surrogate} testbytestring {
- expr {"\ud842" eq [testbytestring "\xed\xa1\x82"]}
+ expr {"\uD842" eq [testbytestring "\xED\xA1\x82"]}
} 1
test utf-1.9 {Tcl_UniCharToUtf: 3 byte sequence, low surrogate} testbytestring {
- expr {"\udc42" eq [testbytestring "\xed\xb1\x82"]}
+ expr {"\uDC42" eq [testbytestring "\xED\xB1\x82"]}
} 1
test utf-1.10 {Tcl_UniCharToUtf: 3 byte sequence, high surrogate} testbytestring {
- expr {[format %c 0xd842] eq [testbytestring "\xed\xa1\x82"]}
+ expr {[format %c 0xD842] eq [testbytestring "\xED\xA1\x82"]}
} 1
test utf-1.11 {Tcl_UniCharToUtf: 3 byte sequence, low surrogate} testbytestring {
- expr {[format %c 0xdc42] eq [testbytestring "\xed\xb1\x82"]}
+ expr {[format %c 0xDC42] eq [testbytestring "\xED\xB1\x82"]}
+} 1
+test utf-1.12 {Tcl_UniCharToUtf: 4 byte sequence, high/low surrogate} testbytestring {
+ expr {"\uD842\uDC42" eq [testbytestring "\xF0\xA0\xA1\x82"]}
+} 1
+test utf-1.13 {Tcl_UniCharToUtf: Invalid surrogate} testbytestring {
+ expr {"\UD842" eq [testbytestring "\xEF\xBF\xBD"]}
} 1
test utf-2.1 {Tcl_UtfToUniChar: low ascii} {
@@ -67,7 +73,7 @@ test utf-2.3 {Tcl_UtfToUniChar: lead (2-byte) followed by non-trail} testbytestr
string length [testbytestring "\xC2"]
} {1}
test utf-2.4 {Tcl_UtfToUniChar: lead (2-byte) followed by trail} testbytestring {
- string length [testbytestring "\xC2\xa2"]
+ string length [testbytestring "\xC2\xA2"]
} {1}
test utf-2.5 {Tcl_UtfToUniChar: lead (3-byte) followed by non-trail} testbytestring {
string length [testbytestring "\xE2"]
@@ -76,7 +82,7 @@ test utf-2.6 {Tcl_UtfToUniChar: lead (3-byte) followed by 1 trail} testbytestrin
string length [testbytestring "\xE2\xA2"]
} {2}
test utf-2.7 {Tcl_UtfToUniChar: lead (3-byte) followed by 2 trail} testbytestring {
- string length [testbytestring "\xE4\xb9\x8e"]
+ string length [testbytestring "\xE4\xB9\x8E"]
} {1}
test utf-2.8 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {tip389 testbytestring} -body {
string length [testbytestring "\xF0\x90\x80\x80"]
@@ -150,27 +156,27 @@ test utf-8.1 {Tcl_UniCharAtIndex: index = 0} {
string index abcd 0
} {a}
test utf-8.2 {Tcl_UniCharAtIndex: index = 0} {
- string index \u4e4e\u25a 0
-} "\u4e4e"
+ string index \u4E4E\u25A 0
+} "\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"
+ string index \u4E4E\u25A\xFF\u543 2
+} "\uFF"
test utf-8.5 {Tcl_UniCharAtIndex: high surrogate} {
- string index \ud842 0
-} "\ud842"
+ string index \uD842 0
+} "\uD842"
test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} {
- string index \udc42 0
-} "\udc42"
+ string index \uDC42 0
+} "\uDC42"
test utf-9.1 {Tcl_UtfAtIndex: index = 0} {
string range abcd 0 2
} {abc}
test utf-9.2 {Tcl_UtfAtIndex: index > 0} {
- string range \u4e4e\u25a\xff\u543klmnop 1 5
-} "\u25a\xff\u543kl"
+ string range \u4E4E\u25A\xFF\u543klmnop 1 5
+} "\u25A\xFF\u543kl"
test utf-10.1 {Tcl_UtfBackslash: dst == NULL} {
@@ -178,22 +184,22 @@ test utf-10.1 {Tcl_UtfBackslash: dst == NULL} {
} {
}
test utf-10.2 {Tcl_UtfBackslash: \u subst} testbytestring {
- expr {"\ua2" eq [testbytestring "\xc2\xa2"]}
+ expr {"\uA2" eq [testbytestring "\xC2\xA2"]}
} 1
test utf-10.3 {Tcl_UtfBackslash: longer \u subst} testbytestring {
- expr {"\u4e21" eq [testbytestring "\xe4\xb8\xa1"]}
+ expr {"\u4E21" eq [testbytestring "\xE4\xB8\xA1"]}
} 1
test utf-10.4 {Tcl_UtfBackslash: stops at first non-hex} testbytestring {
- expr {"\u4e2k" eq "[testbytestring \xd3\xa2]k"}
+ expr {"\u4E2k" eq "[testbytestring \xD3\xA2]k"}
} 1
test utf-10.5 {Tcl_UtfBackslash: stops after 4 hex chars} testbytestring {
- expr {"\u4e216" eq "[testbytestring \xe4\xb8\xa1]6"}
+ expr {"\u4E216" eq "[testbytestring \xE4\xB8\xA1]6"}
} 1
test utf-10.6 {Tcl_UtfBackslash: stops after 5 hex chars} testbytestring {
- expr {"\U1e2165" eq "[testbytestring \xf0\x9e\x88\x96]5"}
+ expr {"\U1E2165" eq "[testbytestring \xF0\x9E\x88\x96]5"}
} 1
test utf-10.7 {Tcl_UtfBackslash: stops after 6 hex chars} testbytestring {
- expr {"\U10e2165" eq "[testbytestring \xf4\x8e\x88\x96]5"}
+ expr {"\U10E2165" eq "[testbytestring \xF4\x8E\x88\x96]5"}
} 1
proc bsCheck {char num} {
global errNum
@@ -239,8 +245,8 @@ bsCheck \u41 65
bsCheck \ua 10
bsCheck \uA 10
bsCheck \340 224
-bsCheck \ua1 161
-bsCheck \u4e21 20001
+bsCheck \uA1 161
+bsCheck \u4E21 20001
bsCheck \741 60
bsCheck \U 85
bsCheck \Uk 85
@@ -248,10 +254,10 @@ bsCheck \U41 65
bsCheck \Ua 10
bsCheck \UA 10
bsCheck \Ua1 161
-bsCheck \U4e21 20001
-bsCheck \U004e21 20001
-bsCheck \U00004e21 20001
-bsCheck \U0000004e21 78
+bsCheck \U4E21 20001
+bsCheck \U004E21 20001
+bsCheck \U00004E21 20001
+bsCheck \U0000004E21 78
bsCheck \U00110000 69632
bsCheck \U01100000 69632
bsCheck \U11000000 69632
@@ -267,17 +273,17 @@ test utf-11.2 {Tcl_UtfToUpper} {
string toupper abc
} ABC
test utf-11.3 {Tcl_UtfToUpper} {
- string toupper \u00e3ab
-} \u00c3AB
+ string toupper \xE3AB
+} \xC3AB
test utf-11.4 {Tcl_UtfToUpper} {
- string toupper \u01e3ab
-} \u01e2AB
+ string toupper \u01E3AB
+} \u01E2AB
test utf-11.5 {Tcl_UtfToUpper Georgian (new in Unicode 11)} {
- string toupper \u10d0\u1c90
-} \u1c90\u1c90
+ string toupper \u10D0\u1C90
+} \u1C90\u1C90
test utf-11.6 {Tcl_UtfToUpper low/high surrogate)} {
- string toupper \udc24\ud824
-} \udc24\ud824
+ string toupper \uDC24\uD824
+} \uDC24\uD824
test utf-12.1 {Tcl_UtfToLower} {
string tolower {}
@@ -286,17 +292,17 @@ test utf-12.2 {Tcl_UtfToLower} {
string tolower ABC
} abc
test utf-12.3 {Tcl_UtfToLower} {
- string tolower \u00c3AB
-} \u00e3ab
+ string tolower \xC3AB
+} \xE3ab
test utf-12.4 {Tcl_UtfToLower} {
- string tolower \u01e2AB
-} \u01e3ab
+ string tolower \u01E2AB
+} \u01E3ab
test utf-12.5 {Tcl_UtfToLower Georgian (new in Unicode 11)} {
- string tolower \u10d0\u1c90
-} \u10d0\u10d0
+ string tolower \u10D0\u1C90
+} \u10D0\u10D0
test utf-12.6 {Tcl_UtfToUpper low/high surrogate)} {
- string tolower \udc24\ud824
-} \udc24\ud824
+ string tolower \uDC24\uD824
+} \uDC24\uD824
test utf-13.1 {Tcl_UtfToTitle} {
string totitle {}
@@ -305,20 +311,20 @@ test utf-13.2 {Tcl_UtfToTitle} {
string totitle abc
} Abc
test utf-13.3 {Tcl_UtfToTitle} {
- string totitle \u00e3ab
-} \u00c3ab
+ string totitle \xE3AB
+} \xC3ab
test utf-13.4 {Tcl_UtfToTitle} {
- string totitle \u01f3ab
-} \u01f2ab
+ string totitle \u01F3AB
+} \u01F2ab
test utf-13.5 {Tcl_UtfToTitle Georgian (new in Unicode 11)} {
- string totitle \u10d0\u1c90
-} \u10d0\u1c90
+ string totitle \u10D0\u1C90
+} \u10D0\u1C90
test utf-13.6 {Tcl_UtfToTitle Georgian (new in Unicode 11)} {
- string totitle \u1c90\u10d0
-} \u1c90\u10d0
+ string totitle \u1C90\u10D0
+} \u1C90\u10D0
test utf-13.7 {Tcl_UtfToTitle low/high surrogate)} {
- string totitle \udc24\ud824
-} \udc24\ud824
+ string totitle \uDC24\uD824
+} \uDC24\uD824
test utf-14.1 {Tcl_UtfNcasecmp} {
string compare -nocase a b
@@ -337,7 +343,7 @@ test utf-15.1 {Tcl_UniCharToUpper, negative delta} {
string toupper aA
} AA
test utf-15.2 {Tcl_UniCharToUpper, positive delta} {
- string toupper \u0178\u00ff
+ string toupper \u0178\xFF
} \u0178\u0178
test utf-15.3 {Tcl_UniCharToUpper, no delta} {
string toupper !
@@ -347,24 +353,24 @@ test utf-16.1 {Tcl_UniCharToLower, negative delta} {
string tolower aA
} aa
test utf-16.2 {Tcl_UniCharToLower, positive delta} {
- string tolower \u0178\u00ff\uA78D\u01c5\U10400
-} \u00ff\u00ff\u0265\u01c6\U10428
+ string tolower \u0178\xFF\uA78D\u01C5\U10400
+} \xFF\xFF\u0265\u01C6\U10428
test utf-17.1 {Tcl_UniCharToLower, no delta} {
string tolower !
} !
test utf-18.1 {Tcl_UniCharToTitle, add one for title} {
- string totitle \u01c4
-} \u01c5
+ string totitle \u01C4
+} \u01C5
test utf-18.2 {Tcl_UniCharToTitle, subtract one for title} {
- string totitle \u01c6
-} \u01c5
+ string totitle \u01C6
+} \u01C5
test utf-18.3 {Tcl_UniCharToTitle, subtract delta for title (positive)} {
- string totitle \u017f
-} \u0053
+ string totitle \u017F
+} \x53
test utf-18.4 {Tcl_UniCharToTitle, subtract delta for title (negative)} {
- string totitle \u00ff
+ string totitle \xFF
} \u0178
test utf-18.5 {Tcl_UniCharToTitle, no delta} {
string totitle !
@@ -381,15 +387,15 @@ test utf-20.1 {TclUniCharNcmp} {
test utf-21.1 {TclUniCharIsAlnum} {
# this returns 1 with Unicode 7 compliance
- string is alnum \u1040\u021f\u0220
+ string is alnum \u1040\u021F\u0220
} {1}
test utf-21.2 {unicode alnum char in regc_locale.c} {
# this returns 1 with Unicode 7 compliance
- list [regexp {^[[:alnum:]]+$} \u1040\u021f\u0220] [regexp {^\w+$} \u1040\u021f\u0220_\u203f\u2040\u2054\ufe33\ufe34\ufe4d\ufe4e\ufe4f\uff3f]
+ list [regexp {^[[:alnum:]]+$} \u1040\u021F\u0220] [regexp {^\w+$} \u1040\u021F\u0220_\u203F\u2040\u2054\uFE33\uFE34\uFE4D\uFE4E\uFE4F\uFF3F]
} {1 1}
test utf-21.3 {unicode print char in regc_locale.c} {
# this returns 1 with Unicode 7 compliance
- regexp {^[[:print:]]+$} \ufbc1
+ regexp {^[[:print:]]+$} \uFBC1
} 1
test utf-21.4 {TclUniCharIsGraph} {
# [Bug 3464428]
@@ -401,65 +407,65 @@ test utf-21.5 {unicode graph char in regc_locale.c} {
} {1}
test utf-21.6 {TclUniCharIsGraph} {
# [Bug 3464428]
- string is graph \u00a0
+ string is graph \xA0
} {0}
test utf-21.7 {unicode graph char in regc_locale.c} {
# [Bug 3464428]
- regexp {[[:graph:]]} \u0020\u00a0\u2028\u2029
+ regexp {[[:graph:]]} \x20\xA0\u2028\u2029
} {0}
test utf-21.8 {TclUniCharIsPrint} {
# [Bug 3464428]
- string is print \u0009
+ string is print \x09
} {0}
test utf-21.9 {unicode print char in regc_locale.c} {
# [Bug 3464428]
- regexp {[[:print:]]} \u0009
+ regexp {[[:print:]]} \x09
} {0}
test utf-21.10 {unicode print char in regc_locale.c} {
# [Bug 3464428]
- regexp {[[:print:]]} \u0009
+ regexp {[[:print:]]} \x09
} {0}
test utf-21.11 {TclUniCharIsControl} {
# [Bug 3464428]
- string is control \u0000\u001f\u00ad\u0605\u061c\u180e\u2066\ufeff
+ string is control \x00\x1F\xAD\u0605\u061C\u180E\u2066\uFEFF
} {1}
test utf-21.12 {unicode control char in regc_locale.c} {
# [Bug 3464428], [Bug a876646efe]
- regexp {^[[:cntrl:]]*$} \u0000\u001f\u00ad\u0605\u061c\u180e\u2066\ufeff
+ regexp {^[[:cntrl:]]*$} \x00\x1F\xAD\u0605\u061C\u180E\u2066\uFEFF
} {1}
test utf-22.1 {TclUniCharIsWordChar} {
string wordend "xyz123_bar fg" 0
} 10
test utf-22.2 {TclUniCharIsWordChar} {
- string wordend "x\u5080z123_bar\u203c fg" 0
+ string wordend "x\u5080z123_bar\u203C fg" 0
} 10
test utf-23.1 {TclUniCharIsAlpha} {
# this returns 1 with Unicode 7 compliance
- string is alpha \u021f\u0220\u037f\u052f
+ string is alpha \u021F\u0220\u037F\u052F
} {1}
test utf-23.2 {unicode alpha char in regc_locale.c} {
# this returns 1 with Unicode 7 compliance
- regexp {^[[:alpha:]]+$} \u021f\u0220\u037f\u052f
+ regexp {^[[:alpha:]]+$} \u021F\u0220\u037F\u052F
} {1}
test utf-24.1 {TclUniCharIsDigit} {
# this returns 1 with Unicode 7 compliance
- string is digit \u1040\uabf0
+ string is digit \u1040\uABF0
} {1}
test utf-24.2 {unicode digit char in regc_locale.c} {
# this returns 1 with Unicode 7 compliance
- list [regexp {^[[:digit:]]+$} \u1040\uabf0] [regexp {^\d+$} \u1040\uabf0]
+ list [regexp {^[[:digit:]]+$} \u1040\uABF0] [regexp {^\d+$} \u1040\uABF0]
} {1 1}
test utf-24.3 {TclUniCharIsSpace} {
# this returns 1 with Unicode 7/TIP 413 compliance
- string is space \u0085\u1680\u180e\u200b\u202f\u2060
+ string is space \x85\u1680\u180E\u200B\u202F\u2060
} {1}
test utf-24.4 {unicode space char in regc_locale.c} {
# this returns 1 with Unicode 7/TIP 413 compliance
- list [regexp {^[[:space:]]+$} \u0085\u1680\u180e\u200b\u202f\u2060] [regexp {^\s+$} \u0085\u1680\u180e\u200b\u202f\u2060]
+ list [regexp {^[[:space:]]+$} \x85\u1680\u180E\u200B\u202F\u2060] [regexp {^\s+$} \x85\u1680\u180E\u200B\u202F\u2060]
} {1 1}
testConstraint teststringobj [llength [info commands teststringobj]]