diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/chanio.test | 1 | ||||
-rw-r--r-- | tests/io.test | 1 | ||||
-rw-r--r-- | tests/namespace.test | 43 |
3 files changed, 45 insertions, 0 deletions
diff --git a/tests/chanio.test b/tests/chanio.test index a0169f1..46a0c06 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -5733,6 +5733,7 @@ test chan-io-46.1 {Tcl event loop vs multiple interpreters} {testfevent fileeven set timer [after 10 lappend x timeout] testfevent cmd $script vwait x + after cancel $timer testfevent cmd {chan close $f} list [testfevent cmd {set x}] [testfevent cmd {info commands after}] } {{f triggered: foo bar} after} diff --git a/tests/io.test b/tests/io.test index 7a83994..c78492b 100644 --- a/tests/io.test +++ b/tests/io.test @@ -6100,6 +6100,7 @@ test io-46.1 {Tcl event loop vs multiple interpreters} {testfevent fileevent} { set timer [after 10 lappend x timeout] testfevent cmd $script vwait x + after cancel $timer testfevent cmd {close $f} list [testfevent cmd {set x}] [testfevent cmd {info commands after}] } {{f triggered: foo bar} after} diff --git a/tests/namespace.test b/tests/namespace.test index 0d93092..ad24fce 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -3337,6 +3337,49 @@ test namespace-56.5 {Bug 8b9854c3d8} -setup { namespace delete namespace-56.5 } -result 1 + + +test namespace-57.0 { + an imported alias should be usable in the deletion trace for the alias + + see 29e8848eb976 +} -body { + variable res {} + namespace eval ns2 { + namespace export * + proc p1 {oldname newname op} { + return success + } + + interp alias {} [namespace current]::p2 {} [namespace which p1] + } + + + namespace eval ns3 { + namespace import ::ns2::p2 + } + + + set ondelete [list apply [list {oldname newname op} { + variable res + catch { + ns3::p2 $oldname $newname $op + } cres + lappend res $cres + } [namespace current]]] + + + trace add command ::ns2::p2 delete $ondelete + rename ns2::p2 {} + return $res +} -cleanup { + unset res + namespace delete ns2 + namespace delete ns3 +} -result success + + + # cleanup catch {rename cmd1 {}} |