diff options
author | dgp@users.sourceforge.net <dgp> | 2003-11-18 01:47:51 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2003-11-18 01:47:51 (GMT) |
commit | 8d88fa6efd56981fb80dd67a6a5efaa1e1f28e07 (patch) | |
tree | 87283d3114d5077cccedd07ffb74ffd8ef04e703 /tests/constraints.tcl | |
parent | 7825d40b4a07d102469fac608830f72c13da085e (diff) | |
download | tk-8d88fa6efd56981fb80dd67a6a5efaa1e1f28e07.zip tk-8d88fa6efd56981fb80dd67a6a5efaa1e1f28e07.tar.gz tk-8d88fa6efd56981fb80dd67a6a5efaa1e1f28e07.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 {} { |