diff options
Diffstat (limited to 'tests/dialog.test')
-rw-r--r-- | tests/dialog.test | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/dialog.test b/tests/dialog.test index 53c10c0..538461b 100644 --- a/tests/dialog.test +++ b/tests/dialog.test @@ -2,23 +2,20 @@ # It is organized in the standard fashion for Tcl tests. package require tcltest 2.1 -namespace import -force tcltest::configure -namespace import -force tcltest::testsDirectory -configure -testdir [file join [pwd] [file dirname [info script]]] -configure -loadfile [file join [testsDirectory] constraints.tcl] +eval tcltest::configure $argv tcltest::loadTestedCommands -test dialog-1.1 {tk_dialog command} { +test dialog-1.1 {tk_dialog command} -body { list [catch {tk_dialog} msg] $msg -} {1 {wrong # args: should be "tk_dialog w title text bitmap default args"}} +} -match glob -result {1 {wrong # args: should be "tk_dialog w title text bitmap default *"}} test dialog-1.2 {tk_dialog command} { list [catch {tk_dialog foo foo foo foo foo} msg] $msg } {1 {bad window path name "foo"}} test dialog-1.3 {tk_dialog command} { - set res [list [catch {tk_dialog .d foo foo foo foo} msg] $msg] + set res [list [catch {tk_dialog .d foo foo fooBitmap foo} msg] $msg] destroy .d set res -} {1 {bitmap "foo" not defined}} +} {1 {bitmap "fooBitmap" not defined}} proc PressButton {btn} { if {![winfo ismapped $btn]} { @@ -57,5 +54,5 @@ test dialog-2.2 {tk_dialog operation} { set res } {-1} -tcltest::cleanupTests +cleanupTests return |