summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-06-20 07:44:32 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-06-20 07:44:32 (GMT)
commite83954d81f5ad30df0736d1cb12f5240bb8e896c (patch)
treebcc7064efa50ae367f8843e46d36b864e91b24af /tests
parent2de684d18bf96b3de8c6e42f5aafbdb832096475 (diff)
parent58e07be6174a8195b83da655731626e99b605c86 (diff)
downloadtcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.zip
tcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.tar.gz
tcl-e83954d81f5ad30df0736d1cb12f5240bb8e896c.tar.bz2
Merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/chan.test30
-rw-r--r--tests/chanio.test4
-rw-r--r--tests/coroutine.test27
-rw-r--r--tests/expr.test2
-rw-r--r--tests/format.test46
-rw-r--r--tests/io.test4
-rw-r--r--tests/ioCmd.test46
-rw-r--r--tests/namespace.test16
-rw-r--r--tests/obj.test11
-rw-r--r--tests/pid.test2
-rw-r--r--tests/scan.test3
-rw-r--r--tests/trace.test2
12 files changed, 85 insertions, 108 deletions
diff --git a/tests/chan.test b/tests/chan.test
index 87d642c..04fd17e 100644
--- a/tests/chan.test
+++ b/tests/chan.test
@@ -29,10 +29,10 @@ test chan-1.2 {chan command general syntax} -body {
test chan-2.1 {chan command: blocked subcommand} -body {
chan blocked foo bar
-} -returnCodes error -result "wrong # args: should be \"chan blocked channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan blocked channel\""
test chan-3.1 {chan command: close subcommand} -body {
chan close foo bar zet
-} -returnCodes error -result "wrong # args: should be \"chan close channelId ?direction?\""
+} -returnCodes error -result "wrong # args: should be \"chan close channel ?direction?\""
test chan-3.2 {chan command: close subcommand} -setup {
set chan [open [info script] r]
} -body {
@@ -49,7 +49,7 @@ test chan-3.3 {chan command: close subcommand} -setup {
} -returnCodes error -result "Half-close of write-side not possible, side not opened or already closed"
test chan-4.1 {chan command: configure subcommand} -body {
chan configure
-} -returnCodes error -result "wrong # args: should be \"chan configure channelId ?-option value ...?\""
+} -returnCodes error -result "wrong # args: should be \"chan configure channel ?-option value ...?\""
test chan-4.2 {chan command: [Bug 800753]} -body {
chan configure stdout -eofchar Ā
} -returnCodes error -result {bad value for -eofchar: must be non-NUL ASCII character}
@@ -72,19 +72,19 @@ test chan-5.1 {chan command: copy subcommand} -body {
test chan-6.1 {chan command: eof subcommand} -body {
chan eof foo bar
-} -returnCodes error -result "wrong # args: should be \"chan eof channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan eof channel\""
test chan-7.1 {chan command: event subcommand} -body {
chan event foo
-} -returnCodes error -result "wrong # args: should be \"chan event channelId event ?script?\""
+} -returnCodes error -result "wrong # args: should be \"chan event channel event ?script?\""
test chan-8.1 {chan command: flush subcommand} -body {
chan flush foo bar
-} -returnCodes error -result "wrong # args: should be \"chan flush channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan flush channel\""
test chan-9.1 {chan command: gets subcommand} -body {
chan gets
-} -returnCodes error -result "wrong # args: should be \"chan gets channelId ?varName?\""
+} -returnCodes error -result "wrong # args: should be \"chan gets channel ?varName?\""
test chan-10.1 {chan command: names subcommand} -body {
chan names foo bar
@@ -92,23 +92,23 @@ test chan-10.1 {chan command: names subcommand} -body {
test chan-11.1 {chan command: puts subcommand} -body {
chan puts foo bar foo bar
-} -returnCodes error -result "wrong # args: should be \"chan puts ?-nonewline? ?channelId? string\""
+} -returnCodes error -result "wrong # args: should be \"chan puts ?-nonewline? ?channel? string\""
test chan-12.1 {chan command: read subcommand} -body {
chan read
-} -returnCodes error -result "wrong # args: should be \"chan read channelId ?numChars?\" or \"chan read ?-nonewline? channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan read channel ?numChars?\" or \"chan read ?-nonewline? channel\""
test chan-13.1 {chan command: seek subcommand} -body {
chan seek foo bar foo bar
-} -returnCodes error -result "wrong # args: should be \"chan seek channelId offset ?origin?\""
+} -returnCodes error -result "wrong # args: should be \"chan seek channel offset ?origin?\""
test chan-14.1 {chan command: tell subcommand} -body {
chan tell foo bar
-} -returnCodes error -result "wrong # args: should be \"chan tell channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan tell channel\""
test chan-15.1 {chan command: truncate subcommand} -body {
chan truncate foo bar foo bar
-} -returnCodes error -result "wrong \# args: should be \"chan truncate channelId ?length?\""
+} -returnCodes error -result "wrong \# args: should be \"chan truncate channel ?length?\""
test chan-15.2 {chan command: truncate subcommand} -setup {
set file [makeFile {} testTruncate]
set f [open $file w+]
@@ -127,13 +127,13 @@ test chan-15.2 {chan command: truncate subcommand} -setup {
# TIP 287: chan pending
test chan-16.1 {chan command: pending subcommand} -body {
chan pending
-} -returnCodes error -result "wrong # args: should be \"chan pending mode channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan pending mode channel\""
test chan-16.2 {chan command: pending subcommand} -body {
chan pending stdin
-} -returnCodes error -result "wrong # args: should be \"chan pending mode channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan pending mode channel\""
test chan-16.3 {chan command: pending subcommand} -body {
chan pending stdin stdout stderr
-} -returnCodes error -result "wrong # args: should be \"chan pending mode channelId\""
+} -returnCodes error -result "wrong # args: should be \"chan pending mode channel\""
test chan-16.4 {chan command: pending subcommand} -body {
chan pending {input output} stdout
} -returnCodes error -result "bad mode \"input output\": must be input or output"
diff --git a/tests/chanio.test b/tests/chanio.test
index 6173d0d..e95a0ca 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -5505,10 +5505,10 @@ test chan-io-40.16 {verify no tilde substitution in open} -setup {
test chan-io-41.1 {Tcl_FileeventCmd: errors} -constraints fileevent -body {
chan event foo
-} -returnCodes error -result {wrong # args: should be "chan event channelId event ?script?"}
+} -returnCodes error -result {wrong # args: should be "chan event channel event ?script?"}
test chan-io-41.2 {Tcl_FileeventCmd: errors} -constraints fileevent -body {
chan event foo bar baz q
-} -returnCodes error -result {wrong # args: should be "chan event channelId event ?script?"}
+} -returnCodes error -result {wrong # args: should be "chan event channel event ?script?"}
test chan-io-41.3 {Tcl_FileeventCmd: errors} -constraints fileevent -body {
chan event gorp readable
} -returnCodes error -result {can not find channel named "gorp"}
diff --git a/tests/coroutine.test b/tests/coroutine.test
index c3023f7..845a4df 100644
--- a/tests/coroutine.test
+++ b/tests/coroutine.test
@@ -825,28 +825,12 @@ test coroutine-7.14 {
return [list $done0 $done1]
} -result {failure failure}
-
-test coroutine-8.0.0 {coro inject executed} -body {
- coroutine demo apply {{} { foreach i {1 2} yield }}
- demo
- set ::result none
- tcl::unsupported::inject demo set ::result inject-executed
- demo
- set ::result
-} -result {inject-executed}
-test coroutine-8.0.1 {coro inject after error} -body {
- coroutine demo apply {{} { foreach i {1 2} yield; error test }}
- demo
- set ::result none
- tcl::unsupported::inject demo set ::result inject-executed
- lappend ::result [catch {demo} err] $err
-} -result {inject-executed 1 test}
test coroutine-8.1.1 {coro inject, ticket 42202ba1e5ff566e} -body {
interp create child
child eval {
coroutine demo apply {{} { while {1} yield }}
demo
- tcl::unsupported::inject demo set ::result inject-executed
+ coroinject demo set ::result inject-executed
}
interp delete child
} -result {}
@@ -855,14 +839,15 @@ test coroutine-8.1.2 {coro inject with result, ticket 42202ba1e5ff566e} -body {
child eval {
coroutine demo apply {{} { while {1} yield }}
demo
- tcl::unsupported::inject demo set ::result inject-executed
+ coroinject demo lappend ::result inject-executed
}
child eval demo
set result [child eval {set ::result}]
interp delete child
set result
-} -result {inject-executed}
+} -result {inject-executed yield {}}
+
test coroutine-9.1 {coroprobe with yield} -body {
coroutine demo apply {{} { foreach i {1 2} yield }}
@@ -1037,7 +1022,7 @@ test coroutine-12.1 {coroutine general introspection} -setup {
$i eval {
# Make the introspection code
namespace path tcl::unsupported
- proc probe {type var} {
+ proc probe {var type args} {
upvar 1 $var v
set f [info frame]
incr f -1
@@ -1049,7 +1034,7 @@ test coroutine-12.1 {coroutine general introspection} -setup {
}
}
proc pokecoro {c var} {
- inject $c probe [corotype $c] $var
+ coroinject $c probe $var
$c
}
diff --git a/tests/expr.test b/tests/expr.test
index f2c7ae6..bfefde3 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -5842,7 +5842,7 @@ test expr-33.1 {parse largest long value} {
[expr {int(2147483647 + 1) > 0}] \
} {2147483647 2147483647 2147483647 2147483647 1 1}
-test expr-33.2 {parse smallest long value} longIs32bit {
+test expr-33.2 {parse smallest long value} {
set min_long_str -2147483648
set min_long_hex "-0x80000000 "
diff --git a/tests/format.test b/tests/format.test
index 5af6c19..39de907 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -15,10 +15,7 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
-# %u output depends on word length, so this test is not portable.
-testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
-testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}]
-testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
+# %z/%t/%p output depends on pointerSize, so some tests are not portable.
testConstraint pointerIs64bit [expr {$tcl_platform(pointerSize) >= 8}]
# MSVC uses a broken libc that gets sprintf("%g") wrong. This is a pain
# particularly in Continuous Integration, and there isn't anything much we can
@@ -31,12 +28,9 @@ test format-1.1 {integer formatting} {
test format-1.2 {integer formatting} {
format "%4d %4d %4d %4d %d %#x %#X" 6 34 16923 -12 -1 14 12
} { 6 34 16923 -12 -1 0xe 0xC}
-test format-1.3 {integer formatting} longIs32bit {
+test format-1.3 {integer formatting} {
format "%4u %4u %4u %4u %d %#o" 6 34 16923 -12 -1 0
} { 6 34 16923 4294967284 -1 0}
-test format-1.3.1 {integer formatting} longIs64bit {
- format "%4u %4u %4u %4u %d %#o" 6 34 16923 -12 -1 0
-} { 6 34 16923 18446744073709551604 -1 0}
test format-1.4 {integer formatting} {
format "%-4d %-4i %-4d %-4ld" 6 34 16923 -12 -1
} {6 34 16923 -12 }
@@ -48,36 +42,21 @@ test format-1.6 {integer formatting} {
} {000034}
# Printing negative numbers in hex or octal format depends on word
# length, so these tests are not portable.
-test format-1.7 {integer formatting} longIs32bit {
+test format-1.7 {integer formatting} {
format "%4x %4x %4x %4x" 6 34 16923 -12 -1
} { 6 22 421b fffffff4}
-test format-1.7.1 {integer formatting} longIs64bit {
- format "%4x %4x %4x %4x" 6 34 16923 -12 -1
-} { 6 22 421b fffffffffffffff4}
-test format-1.8 {integer formatting} longIs32bit {
+test format-1.8 {integer formatting} {
format "%#x %#x %#X %#X %#x" 0 6 34 16923 -12 -1
} {0 0x6 0x22 0x421B 0xfffffff4}
-test format-1.8.1 {integer formatting} longIs64bit {
- format "%#x %#x %#X %#X %#x" 0 6 34 16923 -12 -1
-} {0 0x6 0x22 0x421B 0xfffffffffffffff4}
-test format-1.9 {integer formatting} longIs32bit {
+test format-1.9 {integer formatting} {
format "%#5x %#20x %#20x %#20x %#20x" 0 6 34 16923 -12 -1
} { 0 0x6 0x22 0x421b 0xfffffff4}
-test format-1.9.1 {integer formatting} longIs64bit {
- format "%#5x %#20x %#20x %#20x %#20x" 0 6 34 16923 -12 -1
-} { 0 0x6 0x22 0x421b 0xfffffffffffffff4}
-test format-1.10 {integer formatting} longIs32bit {
+test format-1.10 {integer formatting} {
format "%-#5x %-#20x %-#20x %-#20x %-#20x" 0 6 34 16923 -12 -1
} {0 0x6 0x22 0x421b 0xfffffff4 }
-test format-1.10.1 {integer formatting} longIs64bit {
- format "%-#5x %-#20x %-#20x %-#20x %-#20x" 0 6 34 16923 -12 -1
-} {0 0x6 0x22 0x421b 0xfffffffffffffff4 }
-test format-1.11 {integer formatting} longIs32bit {
+test format-1.11 {integer formatting} {
format "%-#5o %-#20o %#-20o %#-20o %#-20o" 0 6 34 16923 -12 -1
} {0 0o6 0o42 0o41033 0o37777777764 }
-test format-1.11.1 {integer formatting} longIs64bit {
- format "%-#5o %-#20o %#-20o %#-20o %#-20o" 0 6 34 16923 -12 -1
-} {0 0o6 0o42 0o41033 0o1777777777777777777764}
test format-1.12 {integer formatting} {
format "%b %#b %#b %llb" 5 0 5 [expr {2**100}]
} {101 0 0b101 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
@@ -556,13 +535,13 @@ for {set i 290} {$i < 400} {incr i} {
append b "x"
}
-test format-17.1 {testing %d with wide} {longIs32bit wideIs64bit} {
+test format-17.1 {testing %d with wide} {
format %d 7810179016327718216
} 1819043144
-test format-17.2 {testing %ld with wide} {wideIs64bit} {
+test format-17.2 {testing %ld with wide} {
format %ld 7810179016327718216
} 7810179016327718216
-test format-17.3 {testing %ld with non-wide} {wideIs64bit} {
+test format-17.3 {testing %ld with non-wide} {
format %ld 42
} 42
test format-17.4 {testing %l with non-integer} {
@@ -589,7 +568,7 @@ test format-18.1 {do not demote existing numeric values} {
format %08x $b
lappend result [expr {$a == $b}]
} {1 1 1 1}
-test format-18.2 {do not demote existing numeric values} {longIs32bit wideIs64bit} {
+test format-18.2 {do not demote existing numeric values} {
set a [expr {0xaaaaaaaaaa + 1}]
set b 0xaaaaaaaaab
list [format %08x $a] [expr {$a == $b}]
@@ -606,8 +585,7 @@ test format-19.3 {Bug 2830354} {
string length [format %340f 0]
} 340
-test format-19.4.1 {Bug d498578df4: width overflow should cause limit exceeded} \
--constraints {longIs32bit} -body {
+test format-19.4.1 {Bug d498578df4: width overflow should cause limit exceeded} -body {
# in case of overflow into negative, it produces width -2 (and limit exceeded),
# in case of width will be unsigned, it will be outside limit (2GB for 32bit)...
# and it don't throw an error in case the bug is not fixed (and probably no segfault).
diff --git a/tests/io.test b/tests/io.test
index ad8d6b7..d550352 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -6074,10 +6074,10 @@ test io-40.17 {tilde substitution in open} {
test io-41.1 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent foo} msg] $msg
-} {1 {wrong # args: should be "fileevent channelId event ?script?"}}
+} {1 {wrong # args: should be "fileevent channel event ?script?"}}
test io-41.2 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent foo bar baz q} msg] $msg
-} {1 {wrong # args: should be "fileevent channelId event ?script?"}}
+} {1 {wrong # args: should be "fileevent channel event ?script?"}}
test io-41.3 {Tcl_FileeventCmd: errors} {fileevent} {
list [catch {fileevent gorp readable} msg] $msg
} {1 {can not find channel named "gorp"}}
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index e8a9c57..07cf3cd 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -30,13 +30,13 @@ testConstraint testchannel [llength [info commands testchannel]]
test iocmd-1.1 {puts command} {
list [catch {puts} msg] $msg
-} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
+} {1 {wrong # args: should be "puts ?-nonewline? ?channel? string"}}
test iocmd-1.2 {puts command} {
list [catch {puts a b c d e f g} msg] $msg
-} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
+} {1 {wrong # args: should be "puts ?-nonewline? ?channel? string"}}
test iocmd-1.3 {puts command} {
list [catch {puts froboz -nonewline kablooie} msg] $msg
-} {1 {wrong # args: should be "puts ?-nonewline? ?channelId? string"}}
+} {1 {wrong # args: should be "puts ?-nonewline? ?channel? string"}}
test iocmd-1.4 {puts command} {
list [catch {puts froboz hello} msg] $msg
} {1 {can not find channel named "froboz"}}
@@ -70,10 +70,10 @@ test iocmd-1.8 {puts command} {
test iocmd-2.1 {flush command} {
list [catch {flush} msg] $msg
-} {1 {wrong # args: should be "flush channelId"}}
+} {1 {wrong # args: should be "flush channel"}}
test iocmd-2.2 {flush command} {
list [catch {flush a b c d e} msg] $msg
-} {1 {wrong # args: should be "flush channelId"}}
+} {1 {wrong # args: should be "flush channel"}}
test iocmd-2.3 {flush command} {
list [catch {flush foo} msg] $msg
} {1 {can not find channel named "foo"}}
@@ -83,10 +83,10 @@ test iocmd-2.4 {flush command} {
test iocmd-3.1 {gets command} {
list [catch {gets} msg] $msg
-} {1 {wrong # args: should be "gets channelId ?varName?"}}
+} {1 {wrong # args: should be "gets channel ?varName?"}}
test iocmd-3.2 {gets command} {
list [catch {gets a b c d e f g} msg] $msg
-} {1 {wrong # args: should be "gets channelId ?varName?"}}
+} {1 {wrong # args: should be "gets channel ?varName?"}}
test iocmd-3.3 {gets command} {
list [catch {gets aaa} msg] $msg
} {1 {can not find channel named "aaa"}}
@@ -107,16 +107,16 @@ test iocmd-3.5 {gets command} {
test iocmd-4.1 {read command} {
list [catch {read} msg] $msg
-} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
+} {1 {wrong # args: should be "read channel ?numChars?" or "read ?-nonewline? channel"}}
test iocmd-4.2 {read command} {
list [catch {read a b c d e f g h} msg] $msg
-} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
+} {1 {wrong # args: should be "read channel ?numChars?" or "read ?-nonewline? channel"}}
test iocmd-4.3 {read command} {
list [catch {read aaa} msg] $msg
} {1 {can not find channel named "aaa"}}
test iocmd-4.4 {read command} {
list [catch {read -nonewline} msg] $msg
-} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"}}
+} {1 {wrong # args: should be "read channel ?numChars?" or "read ?-nonewline? channel"}}
test iocmd-4.5 {read command} {
list [catch {read -nonew file4} msg] $msg $::errorCode
} {1 {can not find channel named "-nonew"} {TCL LOOKUP CHANNEL -nonew}}
@@ -136,7 +136,7 @@ test iocmd-4.8 {read command with incorrect combination of arguments} {
set x [list [catch {read -nonewline $f 20 z} msg] $msg $::errorCode]
close $f
set x
-} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} {TCL WRONGARGS}}
+} {1 {wrong # args: should be "read channel ?numChars?" or "read ?-nonewline? channel"} {TCL WRONGARGS}}
test iocmd-4.9 {read command} {
list [catch {read stdin foo} msg] $msg $::errorCode
} {1 {expected non-negative integer but got "foo"} {TCL VALUE NUMBER}}
@@ -161,10 +161,10 @@ test iocmd-4.12 {read command} -setup {
test iocmd-5.1 {seek command} -returnCodes error -body {
seek
-} -result {wrong # args: should be "seek channelId offset ?origin?"}
+} -result {wrong # args: should be "seek channel offset ?origin?"}
test iocmd-5.2 {seek command} -returnCodes error -body {
seek a b c d e f g
-} -result {wrong # args: should be "seek channelId offset ?origin?"}
+} -result {wrong # args: should be "seek channel offset ?origin?"}
test iocmd-5.3 {seek command} -returnCodes error -body {
seek stdin gugu
} -result {expected integer but got "gugu"}
@@ -174,20 +174,20 @@ test iocmd-5.4 {seek command} -returnCodes error -body {
test iocmd-6.1 {tell command} {
list [catch {tell} msg] $msg
-} {1 {wrong # args: should be "tell channelId"}}
+} {1 {wrong # args: should be "tell channel"}}
test iocmd-6.2 {tell command} {
list [catch {tell a b c d e} msg] $msg
-} {1 {wrong # args: should be "tell channelId"}}
+} {1 {wrong # args: should be "tell channel"}}
test iocmd-6.3 {tell command} {
list [catch {tell aaa} msg] $msg
} {1 {can not find channel named "aaa"}}
test iocmd-7.1 {close command} {
list [catch {close} msg] $msg
-} {1 {wrong # args: should be "close channelId ?direction?"}}
+} {1 {wrong # args: should be "close channel ?direction?"}}
test iocmd-7.2 {close command} {
list [catch {close a b c d e} msg] $msg
-} {1 {wrong # args: should be "close channelId ?direction?"}}
+} {1 {wrong # args: should be "close channel ?direction?"}}
test iocmd-7.3 {close command} {
list [catch {close aaa} msg] $msg
} {1 {can not find channel named "aaa"}}
@@ -216,10 +216,10 @@ proc expectedOpts {got extra} {
}
test iocmd-8.1 {fconfigure command} -returnCodes error -body {
fconfigure
-} -result {wrong # args: should be "fconfigure channelId ?-option value ...?"}
+} -result {wrong # args: should be "fconfigure channel ?-option value ...?"}
test iocmd-8.2 {fconfigure command} -returnCodes error -body {
fconfigure a b c d e f
-} -result {wrong # args: should be "fconfigure channelId ?-option value ...?"}
+} -result {wrong # args: should be "fconfigure channel ?-option value ...?"}
test iocmd-8.3 {fconfigure command} -returnCodes error -body {
fconfigure a b
} -result {can not find channel named "a"}
@@ -376,10 +376,10 @@ test iocmd-8.23 {fconfigure -profile badprofile} -body {
test iocmd-9.1 {eof command} {
list [catch {eof} msg] $msg $::errorCode
-} {1 {wrong # args: should be "eof channelId"} {TCL WRONGARGS}}
+} {1 {wrong # args: should be "eof channel"} {TCL WRONGARGS}}
test iocmd-9.2 {eof command} {
list [catch {eof a b} msg] $msg $::errorCode
-} {1 {wrong # args: should be "eof channelId"} {TCL WRONGARGS}}
+} {1 {wrong # args: should be "eof channel"} {TCL WRONGARGS}}
test iocmd-9.3 {eof command} {
catch {close file100}
list [catch {eof file100} msg] $msg $::errorCode
@@ -389,10 +389,10 @@ test iocmd-9.3 {eof command} {
test iocmd-10.1 {fblocked command} {
list [catch {fblocked} msg] $msg
-} {1 {wrong # args: should be "fblocked channelId"}}
+} {1 {wrong # args: should be "fblocked channel"}}
test iocmd-10.2 {fblocked command} {
list [catch {fblocked a b c d e f g} msg] $msg
-} {1 {wrong # args: should be "fblocked channelId"}}
+} {1 {wrong # args: should be "fblocked channel"}}
test iocmd-10.3 {fblocked command} {
list [catch {fblocked file1000} msg] $msg
} {1 {can not find channel named "file1000"}}
diff --git a/tests/namespace.test b/tests/namespace.test
index ae233cb..3af5030 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -3371,6 +3371,22 @@ test namespace-55.1 {compiled ensembles inside compiled ensembles: Bug 6d2f249a0
info class [format %s constructor] oo::object
} ""
+test namespace-55.2 {compiled ensembles inside safe interpreters (for safe sub-commands), bug [1095bf7f756f9aed]} -setup {
+ interp create -safe si
+ set code {
+ proc test_comp_dict d { dict for {k v} $d {expr $v} }
+ regexp -inline {Command 1:(?:[^\n]*\n){1,5}} [::tcl::unsupported::disassemble proc test_comp_dict]
+ }
+} -body {
+ set a [ eval $code]
+ set b [si eval $code]
+ list [expr {$a eq $b}] [regexp { dictFirst } $a] [regexp { dictFirst } $b] $a $b
+} -cleanup {
+ rename test_comp_dict {}
+ unset -nocomplain code a b
+ interp delete si
+} -match glob -result {1 1 1 *}
+
test namespace-56.1 {bug f97d4ee020: mutually-entangled deletion} {
namespace eval ::testing {
proc abc {} {}
diff --git a/tests/obj.test b/tests/obj.test
index eb85c84..fcd8d89 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -20,7 +20,6 @@ if {"::tcltest" ni [namespace children]} {
catch [list package require -exact tcl::test [info patchlevel]]
testConstraint testobj [llength [info commands testobj]]
-testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
test obj-1.1 {Tcl_AppendAllObjTypes, and InitTypeTable, Tcl_RegisterObjType} testobj {
@@ -547,11 +546,11 @@ test obj-32.1 {freeing very large object trees} {
unset x
} {}
-test obj-33.1 {integer overflow on input} {longIs32bit wideIs64bit} {
+test obj-33.1 {integer overflow on input} {wideIs64bit} {
set x 0x8000; append x 0000
list [string is integer $x] [expr { wide($x) }]
} {1 2147483648}
-test obj-33.2 {integer overflow on input} {longIs32bit wideIs64bit} {
+test obj-33.2 {integer overflow on input} {wideIs64bit} {
set x 0xffff; append x ffff
list [string is integer $x] [expr { wide($x) }]
} {1 4294967295}
@@ -559,15 +558,15 @@ test obj-33.3 {integer overflow on input} {
set x 0x10000; append x 0000
list [string is integer $x] [expr { wide($x) }]
} {1 4294967296}
-test obj-33.4 {integer overflow on input} {longIs32bit wideIs64bit} {
+test obj-33.4 {integer overflow on input} {wideIs64bit} {
set x -0x8000; append x 0000
list [string is integer $x] [expr { wide($x) }]
} {1 -2147483648}
-test obj-33.5 {integer overflow on input} {longIs32bit wideIs64bit} {
+test obj-33.5 {integer overflow on input} {wideIs64bit} {
set x -0x8000; append x 0001
list [string is integer $x] [expr { wide($x) }]
} {1 -2147483649}
-test obj-33.6 {integer overflow on input} {longIs32bit wideIs64bit} {
+test obj-33.6 {integer overflow on input} {wideIs64bit} {
set x -0xffff; append x ffff
list [string is integer $x] [expr { wide($x) }]
} {1 -4294967295}
diff --git a/tests/pid.test b/tests/pid.test
index 3f62457..5abbe1f 100644
--- a/tests/pid.test
+++ b/tests/pid.test
@@ -47,7 +47,7 @@ test pid-1.3 {pid command} -constraints pidDefined -setup {
} -result {}
test pid-1.4 {pid command} pidDefined {
list [catch {pid a b} msg] $msg
-} {1 {wrong # args: should be "pid ?channelId?"}}
+} {1 {wrong # args: should be "pid ?channel?"}}
test pid-1.5 {pid command} pidDefined {
list [catch {pid gorp} msg] $msg
} {1 {can not find channel named "gorp"}}
diff --git a/tests/scan.test b/tests/scan.test
index 6d7a9fb..6d91c8d 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -82,7 +82,6 @@ proc testIEEE {} {
}
testConstraint ieeeFloatingPoint [testIEEE]
-testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
test scan-1.1 {BuildCharSet, CharInSet} {
list [scan foo {%[^o]} x] $x
@@ -517,7 +516,7 @@ test scan-5.11 {integer scanning} -constraints {nonPortable} -setup {
list [scan "4294967280 4294967280" "%u %d" a b] $a \
[expr {$b == -16 || $b == 0x7fffffff}]
} -result {2 4294967280 1}
-test scan-5.12 {integer scanning} -constraints {wideIs64bit} -setup {
+test scan-5.12 {integer scanning} -setup {
set a {}; set b {}; set c {}
} -body {
list [scan "7810179016327718216,6c63546f6c6c6548,661432506755433062510" \
diff --git a/tests/trace.test b/tests/trace.test
index 64c9111..16c858c 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -1695,7 +1695,7 @@ test trace-21.12 {bug 2438181} -setup {
trace add execution set2 leave {puts one two three #;}
} -body {
set2 a hello
-} -returnCodes 1 -result {wrong # args: should be "puts ?-nonewline? ?channelId? string"}
+} -returnCodes 1 -result {wrong # args: should be "puts ?-nonewline? ?channel? string"}
proc factorial {n} {
if {$n != 1} { return [expr {$n * [factorial [expr {$n -1 }]]}] }