Skip to content

Commit a5d35d1

Browse files
committed
winDialog.test: convert test winDialog-5.9 to a template, disabled with constraint knownBug
1 parent 8c2e49a commit a5d35d1

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

tests/winDialog.test

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,19 +384,24 @@ test winDialog-5.8 {GetFileName: extension doesn't begin with .} -constraints {
384384
unset msg
385385
} -result bar.foo
386386
test winDialog-5.9 {GetFileName: file types} -constraints {
387-
nt testwinevent
388-
} -body {
389-
# case FILE_TYPES:
390-
387+
nt testwinevent knownBug
388+
} -body {
389+
#
390+
# This test was used with MS Windows versions before Windows Vista.
391+
# Starting from that version, the test is not valid anymore because the
392+
# dialog's file types control has no control ID and we don't have a
393+
# mechanism to locate it.
394+
# The test remains at this place, with constraint knownBug, to serve as an
395+
# example/template in the event that the situation changes in the future
396+
# somehow.
397+
#
391398
testDialog launch {tk_getSaveFile -filetypes {{"foo files" .foo FOOF}} -title Foo}
392-
# XXX - currently disabled for vista style dialogs because the file
393-
# types control has no control ID and we don't have a mechanism to
394-
# locate it.
395399
testDialog onDisplay {
400+
set x [GetText 0x470]
396401
Click cancel
397402
}
398-
return 1
399-
} -result 1
403+
return $x
404+
} -result {foo files (*.foo)}
400405
test winDialog-5.10 {GetFileName: file types: MakeFilter() fails} -constraints {
401406
nt
402407
} -body {

0 commit comments

Comments
 (0)