diff options
author | dgp <dgp@users.sourceforge.net> | 2003-11-18 01:47:51 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-11-18 01:47:51 (GMT) |
commit | 7af2e46f13299ff7016bcb17e5bf20725aa25935 (patch) | |
tree | 87283d3114d5077cccedd07ffb74ffd8ef04e703 /tests/constraints.tcl | |
parent | bb19ed403185f85f0d9993e40d4ea892890e5cf6 (diff) | |
download | tk-7af2e46f13299ff7016bcb17e5bf20725aa25935.zip tk-7af2e46f13299ff7016bcb17e5bf20725aa25935.tar.gz tk-7af2e46f13299ff7016bcb17e5bf20725aa25935.tar.bz2 |
* tests/constraints.tcl:When running the test suite in a process
* tests/image.test: where Tk has been [load]ed, there's no
* tests/select.test: guarantee that child processes created by
* tests/unixWm.test: [exec [interpreter]] will have Tk in them.
* tests/window.test: Made modifications to force a [load] of Tk
in those situations.
Diffstat (limited to 'tests/constraints.tcl')
-rw-r--r-- | tests/constraints.tcl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/constraints.tcl b/tests/constraints.tcl index f8c7a59..2da8938 100644 --- a/tests/constraints.tcl +++ b/tests/constraints.tcl @@ -23,10 +23,25 @@ package require tcltest 2.1 namespace eval tk { namespace eval test { + + namespace export loadTkCommand + proc loadTkCommand {} { + set tklib {} + foreach pair [info loaded {}] { + foreach {lib pfx} $pair break + if {$pfx eq "Tk"} { + set tklib $lib + break + } + } + return [list load $tklib Tk] + } + namespace eval bg { # Manage a background process. # Replace with slave interp or thread? namespace import ::tcltest::interpreter + namespace import ::tk::test::loadTkCommand namespace export setup cleanup do proc cleanup {} { @@ -52,6 +67,8 @@ namespace eval tk { error "unexpected output from\ background process: \"$data\"" } + puts $fd [loadTkCommand] + flush $fd fileevent $fd readable [namespace code Ready] } proc Ready {} { |