diff options
author | ericm <ericm@noemail.net> | 2000-03-07 00:02:34 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-03-07 00:02:34 (GMT) |
commit | 3659111c8fbdf0f156a32d938df2ba7284945dde (patch) | |
tree | 413d94ffe75161c8bfdf0646595218e82b0953ec /tests/choosedir.test | |
parent | 494c3496a3945c057a4009c0e2ea2296ac9ae5eb (diff) | |
download | tk-3659111c8fbdf0f156a32d938df2ba7284945dde.zip tk-3659111c8fbdf0f156a32d938df2ba7284945dde.tar.gz tk-3659111c8fbdf0f156a32d938df2ba7284945dde.tar.bz2 |
Unset err at the end because some other tests use it.
FossilOrigin-Name: 63f27e98cf2cf7574f67a1459864abf4eabd928f
Diffstat (limited to 'tests/choosedir.test')
-rw-r--r-- | tests/choosedir.test | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/choosedir.test b/tests/choosedir.test index f6987f8..d527eb5 100644 --- a/tests/choosedir.test +++ b/tests/choosedir.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: choosedir.test,v 1.4 2000/03/03 00:14:33 ericm Exp $ +# RCS: @(#) $Id: choosedir.test,v 1.5 2000/03/07 00:02:34 ericm Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -86,21 +86,21 @@ set err(unknownOpt) "unknown option \"%s\": should be \"$err(usage)\"" # Make a dir for us to rely on for tests makeDirectory choosedirTest -set dir $::tcltest::temporaryDirectory +set dir [pwd] set fake [file join $dir non-existant] set real [file join $dir choosedirTest] set parent . foreach opt {-initialdir -mustexist -parent -title} { - test filebox-1.1 "tk_chooseDirectory command" { + test choosedir-1.1 "tk_chooseDirectory command" { list [catch {tk_chooseDirectory $opt} msg] $msg } [list 1 [format $err(valueMissing) $opt]] } -test filebox-1.2 "tk_chooseDirectory command" { +test choosedir-1.2 "tk_chooseDirectory command" { list [catch {tk_chooseDirectory -foo bar} msg] $msg } [list 1 [format $err(unknownOpt) "-foo"]] -test filebox-1.3 "tk_chooseDirectory command" { +test choosedir-1.3 "tk_chooseDirectory command" { list [catch {tk_chooseDirectory -parent foo.bar} msg] $msg } {1 {bad window path name "foo.bar"}} @@ -112,7 +112,7 @@ test choosedir-2.1 "tk_chooseDirectory command, cancel gives null" {unixOnly} { test choosedir-3.1 "tk_chooseDirectory -mustexist 1" {unixOnly} { ToEnterDirByKey $parent $fake - after 25 + after 10 ToEnterDirByKey $parent $real tk_chooseDirectory \ -title "Enter \"$fake\", press OK, enter \"$real\", press OK" \ @@ -120,8 +120,7 @@ test choosedir-3.1 "tk_chooseDirectory -mustexist 1" {unixOnly} { } $real test choosedir-3.2 "tk_chooseDirectory -mustexist 0" {unixOnly} { ToEnterDirByKey $parent $fake - tk_chooseDirectory \ - -title "Enter \"$fake\", press OK" \ + tk_chooseDirectory -title "Enter \"$fake\", press OK" \ -parent $parent -mustexist 0 } $fake @@ -143,6 +142,7 @@ test choosedir-4.3 "tk_chooseDirectory, -initialdir {}" {unixOnly} { } [pwd] +unset err # cleanup ::tcltest::cleanupTests |