Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | * tests/trace.test (trace-34.5): [Bug 1047286], added a second test illustrating the role of "ns in callStack" in the ns's visibility during deletion traces. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
e045b8ee50f0f8fa0c3c7f580d8f53cc |
| User & Date: | msofer 2005-11-18 23:42:12.000 |
Context
|
2005-11-20
| ||
| 18:33 | Don't set tclStubsPtr to 0 when Tcl_PkgRequireEx() fails [Fix for #1091431 "Tcl_InitStubs failure cr... check-in: 281147cb60 user: jenglish tags: trunk | |
|
2005-11-18
| ||
| 23:42 | * tests/trace.test (trace-34.5): [Bug 1047286], added a second test illustrating the role of "ns i... check-in: e045b8ee50 user: msofer tags: trunk | |
| 19:40 | Bug 1359183 check-in: 55d1f5ce04 user: kennykb tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2005-11-18 Kevin B. Kenny <kennykb@acm.org> * doc/clock.n: Restored several missing lines near the %w format group so that %w and %W are documented with their actual behaviour. [Bug 1359183] 2005-11-18 Jeff Hobbs <jeffh@ActiveState.com> | > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | 2005-11-18 Miguel Sofer <msofer@users.sf.net> * tests/trace.test (trace-34.5): [Bug 1047286], added a second test illustrating the role of "ns in callStack" in the ns's visibility during deletion traces. 2005-11-18 Kevin B. Kenny <kennykb@acm.org> * doc/clock.n: Restored several missing lines near the %w format group so that %w and %W are documented with their actual behaviour. [Bug 1359183] 2005-11-18 Jeff Hobbs <jeffh@ActiveState.com> |
| ︙ | ︙ |
Changes to tests/trace.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Commands covered: trace # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Commands covered: trace
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: trace.test,v 1.47 2005/11/18 23:42:12 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
testConstraint testcmdtrace [llength [info commands testcmdtrace]]
|
| ︙ | ︙ | |||
2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 |
proc foo {} {set x {}}
proc bar args {trace remove execution foo enterstep soom}
trace add execution foo enterstep soom
trace add execution foo enterstep bar
foo
} {}
test trace-34.4 {Bug 1047286} {
variable x notrace
proc callback {old - -} {
variable x "$old exists: [namespace which -command $old]"
}
namespace eval ::foo {proc bar {} {}}
trace add command ::foo::bar delete [namespace code callback]
namespace delete ::foo
set x
} {::foo::bar exists: ::foo::bar}
test trace-35.1 {527164: Keep -errorinfo of traces} -setup {
unset -nocomplain x y
} -body {
trace add variable x write {error foo;#}
trace add variable y write {set x 2;#}
list [catch {set y 1} msg opts] $msg [dict get $opts -errorinfo]
| > > > > > > > > > > > > > | 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 |
proc foo {} {set x {}}
proc bar args {trace remove execution foo enterstep soom}
trace add execution foo enterstep soom
trace add execution foo enterstep bar
foo
} {}
# We test here for the half-documented and currently valid interplay between
# delete traces and namespace deletion.
test trace-34.4 {Bug 1047286} {
variable x notrace
proc callback {old - -} {
variable x "$old exists: [namespace which -command $old]"
}
namespace eval ::foo {proc bar {} {}}
trace add command ::foo::bar delete [namespace code callback]
namespace delete ::foo
set x
} {::foo::bar exists: ::foo::bar}
test trace-34.5 {Bug 1047286} {
variable x notrace
proc callback {old - -} {
variable x "$old exists: [namespace which -command $old]"
}
namespace eval ::foo {proc bar {} {}}
trace add command ::foo::bar delete [namespace code callback]
namespace eval ::foo namespace delete ::foo
set x
} {::foo::bar exists: }
test trace-35.1 {527164: Keep -errorinfo of traces} -setup {
unset -nocomplain x y
} -body {
trace add variable x write {error foo;#}
trace add variable y write {set x 2;#}
list [catch {set y 1} msg opts] $msg [dict get $opts -errorinfo]
|
| ︙ | ︙ |