diff options
Diffstat (limited to 'tests/choosedir.test')
-rw-r--r-- | tests/choosedir.test | 15 |
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 |