From 3b521e25ec85d49456bf38f1cb07e915b814bff4 Mon Sep 17 00:00:00 2001 From: ericm Date: Tue, 7 Mar 2000 00:02:34 +0000 Subject: Unset err at the end because some other tests use it. --- tests/choosedir.test | 16 ++++++++-------- 1 file 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 -- cgit v0.12