summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm>2000-03-07 00:02:34 (GMT)
committerericm <ericm>2000-03-07 00:02:34 (GMT)
commit3b521e25ec85d49456bf38f1cb07e915b814bff4 (patch)
tree413d94ffe75161c8bfdf0646595218e82b0953ec /tests
parent8d402e473c0ff897f3009480215da12c428bde42 (diff)
downloadtk-3b521e25ec85d49456bf38f1cb07e915b814bff4.zip
tk-3b521e25ec85d49456bf38f1cb07e915b814bff4.tar.gz
tk-3b521e25ec85d49456bf38f1cb07e915b814bff4.tar.bz2
Unset err at the end because some other tests use it.
Diffstat (limited to 'tests')
-rw-r--r--tests/choosedir.test16
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