summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorericm <ericm>2000-03-08 20:12:38 (GMT)
committerericm <ericm>2000-03-08 20:12:38 (GMT)
commit7877ebe805f8eb5114cc3780cee591569b79d2d7 (patch)
treeef4a07713b3b8793a522653ec2ee8f9a413c2d1e /tests
parent0abc21f01163916effa8f0d1fd17fd424f5fcc8f (diff)
downloadtk-7877ebe805f8eb5114cc3780cee591569b79d2d7.zip
tk-7877ebe805f8eb5114cc3780cee591569b79d2d7.tar.gz
tk-7877ebe805f8eb5114cc3780cee591569b79d2d7.tar.bz2
* tests/choosedir.test: Modified test 3.1 (-mustexist works) to be
more careful about cleaning up its potentially troublesome after events.
Diffstat (limited to 'tests')
-rw-r--r--tests/choosedir.test15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/choosedir.test b/tests/choosedir.test
index d527eb5..0ccf04c 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.5 2000/03/07 00:02:34 ericm Exp $
+# RCS: @(#) $Id: choosedir.test,v 1.6 2000/03/08 20:12:38 ericm Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -111,12 +111,15 @@ test choosedir-2.1 "tk_chooseDirectory command, cancel gives null" {unixOnly} {
} ""
test choosedir-3.1 "tk_chooseDirectory -mustexist 1" {unixOnly} {
- ToEnterDirByKey $parent $fake
- after 10
- ToEnterDirByKey $parent $real
- tk_chooseDirectory \
+ # first enter a bogus dirname, then enter a real one.
+ set afterId1 [after 100 EnterDirByKey $parent [list $fake]]
+ set afterId2 [after 200 EnterDirByKey $parent [list $real]]
+ set result [tk_chooseDirectory \
-title "Enter \"$fake\", press OK, enter \"$real\", press OK" \
- -parent $parent -mustexist 1
+ -parent $parent -mustexist 1]
+ after cancel $afterId1
+ after cancel $afterId2
+ set result
} $real
test choosedir-3.2 "tk_chooseDirectory -mustexist 0" {unixOnly} {
ToEnterDirByKey $parent $fake