summaryrefslogtreecommitdiffstats
path: root/tests/visual_bb.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2002-07-12 13:40:58 (GMT)
committerdgp <dgp@noemail.net>2002-07-12 13:40:58 (GMT)
commit114b021c2e7e9fc5ae4b3899a1e473eb0d1be015 (patch)
treed8e183b36df3072890d7f699cb3530b8aa5e7777 /tests/visual_bb.test
parent8464e0f7636a70c65aa412812f1f7d70df195cb9 (diff)
downloadtk-114b021c2e7e9fc5ae4b3899a1e473eb0d1be015.zip
tk-114b021c2e7e9fc5ae4b3899a1e473eb0d1be015.tar.gz
tk-114b021c2e7e9fc5ae4b3899a1e473eb0d1be015.tar.bz2
* Converted several files in the Tk test suite for testing by
tcltest 2.1. FossilOrigin-Name: 3892bfbf58651928daf7fae82d0d6453eb050f88
Diffstat (limited to 'tests/visual_bb.test')
-rw-r--r--tests/visual_bb.test27
1 files changed, 17 insertions, 10 deletions
diff --git a/tests/visual_bb.test b/tests/visual_bb.test
index a113e3e..480026c 100644
--- a/tests/visual_bb.test
+++ b/tests/visual_bb.test
@@ -6,11 +6,18 @@
# at the window to make sure it appears as expected. Individual tests
# are kept in separate ".tcl" files in this directory.
#
-# RCS: @(#) $Id: visual_bb.test,v 1.4 2002/07/11 13:01:31 dkf Exp $
-
-if {[lsearch [namespace children] ::tcltest] == -1} {
- source [file join [pwd] [file dirname [info script]] defs.tcl]
-}
+# RCS: @(#) $Id: visual_bb.test,v 1.5 2002/07/12 13:41:01 dgp Exp $
+
+package require tcltest 2.1
+namespace import -force tcltest::test
+namespace import -force tcltest::testConstraint
+namespace import -force tcltest::testsDirectory
+namespace import -force tcltest::cleanupTests
+namespace import -force tcltest::configure
+configure -testdir [file join [pwd] [file dirname [info script]]]
+configure -loadfile [file join [testsDirectory] constraints.tcl]
+tcltest::loadTestedCommands
+eval configure $argv
set auto_path ". $auto_path"
wm title . "Visual Tests for Tk"
@@ -23,7 +30,7 @@ proc runTest {file} {
global testNum
test "2.$testNum" "testing $file" {userInteraction} {
- uplevel \#0 source [file join $::tcltest::testsDir $file]
+ uplevel \#0 source [file join [testsDirectory] $file]
concat ""
} {}
incr testNum
@@ -56,7 +63,7 @@ test 1.1 "running visual tests" {userInteraction} {
menubutton .menu.file -text "File" -menu .menu.file.m
menu .menu.file.m
- .menu.file.m add command -label "Quit" -command ::tcltest::cleanupTests
+ .menu.file.m add command -label "Quit" -command cleanupTests
menubutton .menu.group1 -text "Group 1" -menu .menu.group1.m
menu .menu.group1.m
@@ -79,7 +86,7 @@ test 1.1 "running visual tests" {userInteraction} {
.menu.ps.m add command -label "Bitmaps" \
-command {runTest canvPsBmap.tcl}
.menu.ps.m add command -label "Images" \
- -command {source canvPsImg.tcl}
+ -command {runTest canvPsImg.tcl}
.menu.ps.m add command -label "Arcs" \
-command {runTest canvPsArc.tcl}
@@ -102,6 +109,6 @@ test 1.1 "running visual tests" {userInteraction} {
concat ""
} {}
-if {!$::tcltest::testConfig(userInteraction)} {
- ::tcltest::cleanupTests
+if {![testConstraint userInteraction]} {
+ cleanupTests
}