Skip to content

Commit 27b17c0

Browse files
committed
testutils.tcl: remove auto_ns_vars feature that isn't valid anymore for Tcl9
1 parent 7570fda commit 27b17c0

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

tests/testutils.tcl

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@
2929
namespace eval tk {
3030
namespace eval test {
3131

32-
# auto_ns_vars --
33-
#
34-
# Each new namespace automatically holds several variables upvar'ed
35-
# from the global namespace. Notably:
36-
#
37-
# argc argv argv0 auto_index auto_path env tcl_interactive tcl_library \
38-
# tcl_patchLevel tcl_pkgPath tcl_platform tcl_rcFileName tcl_version
39-
#
40-
# proc testutils (see below) needs to know about them to keep track of
41-
# newly created variables.
42-
#
43-
variable auto_ns_vars [namespace eval tmp {info vars}]
44-
namespace delete tmp
45-
4632
proc assert {expr} {
4733
if {! [uplevel 1 [list expr $expr]]} {
4834
return -code error "assertion failed: \"[uplevel 1 [list subst -nocommands $expr]]\""
@@ -255,15 +241,12 @@ namespace eval tk {
255241
set importedVars($domain) [list]
256242
}
257243
if {$option ne "-novars"} {
258-
variable auto_ns_vars
259244
if {[namespace inscope ::tk::test::$domain {info procs init}] eq "init"} {
260245
::tk::test::${domain}::init
261246
}
262247
foreach varName [namespace inscope ::tk::test::$domain {info vars}] {
263-
if {$varName ni $auto_ns_vars} {
264-
uplevel 1 [list upvar #0 ::tk::test::${domain}::$varName $varName]
265-
lappend importedVars($domain) $varName
266-
}
248+
uplevel 1 [list upvar #0 ::tk::test::${domain}::$varName $varName]
249+
lappend importedVars($domain) $varName
267250
}
268251
}
269252
} else {
@@ -906,6 +889,7 @@ namespace eval ::tk::test::select {
906889
}
907890

908891
namespace eval ::tk::test::text {
892+
909893
proc init {} {
910894
variable fixedFont {Courier -12}
911895
variable fixedWidth [font measure $fixedFont m]

0 commit comments

Comments
 (0)