summaryrefslogtreecommitdiffstats
path: root/tests/filebox.test
diff options
context:
space:
mode:
authorstanton <stanton>1998-06-25 17:21:01 (GMT)
committerstanton <stanton>1998-06-25 17:21:01 (GMT)
commitaf20cc748a3899e67870ed4478d7b8360c668cb8 (patch)
tree1829fa4225b5ea3a8f8578471ffe02463efaabcd /tests/filebox.test
parent1d739e308935b0ff87146ce4e6733a3b59626c2a (diff)
downloadtk-af20cc748a3899e67870ed4478d7b8360c668cb8.zip
tk-af20cc748a3899e67870ed4478d7b8360c668cb8.tar.gz
tk-af20cc748a3899e67870ed4478d7b8360c668cb8.tar.bz2
*** empty log message ***
Diffstat (limited to 'tests/filebox.test')
-rw-r--r--tests/filebox.test43
1 files changed, 41 insertions, 2 deletions
diff --git a/tests/filebox.test b/tests/filebox.test
index 83f320c..c687b0b 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -40,7 +40,11 @@ proc PressButton {btn} {
proc EnterFileByKey {parent fileName fileDir} {
global tk_strictMotif
- set w .__tk_filedialog
+ if {$parent == "."} {
+ set w .__tk_filedialog
+ } else {
+ set w $parent.__tk_filedialog
+ }
upvar #0 [winfo name $w] data
if {$tk_strictMotif} {
@@ -57,7 +61,11 @@ proc EnterFileByKey {parent fileName fileDir} {
proc SendButtonPress {parent btn type} {
global tk_strictMotif
- set w .__tk_filedialog
+ if {$parent == "."} {
+ set w .__tk_filedialog
+ } else {
+ set w $parent.__tk_filedialog
+ }
upvar #0 [winfo name $w] data
set button $data($btn\Btn)
@@ -205,6 +213,37 @@ foreach mode $modes {
-initialfile $fileName]
} $pathName
+ test filebox-2.5 "$command command" {
+ ToPressButton $parent ok
+ set choice [$command -title "Enter \"$fileName\" and press Ok" \
+ -parent $parent -initialdir /badpath \
+ -initialfile $fileName]
+ } $pathName
+
+ test filebox-2.6 "$command command" {
+ toplevel .t1; toplevel .t2
+ ToPressButton .t1 ok
+ set choice {}
+ lappend choice [$command \
+ -title "Enter \"$fileName\" and press Ok" \
+ -parent .t1 -initialdir $fileDir \
+ -initialfile $fileName]
+ ToPressButton .t2 ok
+ lappend choice [$command \
+ -title "Enter \"$fileName\" and press Ok" \
+ -parent .t2 -initialdir $fileDir \
+ -initialfile $fileName]
+ ToPressButton .t1 ok
+ lappend choice [$command \
+ -title "Enter \"$fileName\" and press Ok" \
+ -parent .t1 -initialdir $fileDir \
+ -initialfile $fileName]
+ destroy .t1
+ destroy .t2
+ set choice
+ } [list $pathName $pathName $pathName]
+
+
set filters(1) {}