summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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