summaryrefslogtreecommitdiffstats
path: root/tests/winDialog.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-11 08:50:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-11 08:50:50 (GMT)
commit902f5496fc385aac6e791e1b6c296f1031e2d6d1 (patch)
tree29d114ae2fc044e81024582c935fa2195a0cb56d /tests/winDialog.test
parent9d7efecc861c41eb04d3a9da2dea7a513746113b (diff)
downloadtk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.zip
tk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.tar.gz
tk-902f5496fc385aac6e791e1b6c296f1031e2d6d1.tar.bz2
Fixed, but only tested yet on Windows 7. On other platforms, at least the 'user input problem' is gone, but the test might still fail.
Diffstat (limited to 'tests/winDialog.test')
-rw-r--r--tests/winDialog.test38
1 files changed, 28 insertions, 10 deletions
diff --git a/tests/winDialog.test b/tests/winDialog.test
index 77317b1..8aa9ac3 100644
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -236,21 +236,33 @@ test winDialog-5.7 {GetFileName: extension begins with .} -constraints {
# }
start {set x [tk_getSaveFile -defaultextension .foo -title Save]}
+ set msg {}
then {
- SetText 0x47C bar
- Click ok
+ if {[catch {SetText 0x47C bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
}
- string totitle $x
+ string totitle $x$msg
+} -cleanup {
+ unset msg
} -result [string totitle [file join [pwd] bar.foo]]
test winDialog-5.8 {GetFileName: extension doesn't begin with .} -constraints {
nt testwinevent
} -body {
start {set x [tk_getSaveFile -defaultextension foo -title Save]}
+ set msg {}
then {
- SetText 0x47C bar
- Click ok
+ if {[catch {SetText 0x47C bar} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
}
- string totitle $x
+ string totitle $x$msg
+} -cleanup {
+ unset msg
} -result [string totitle [file join [pwd] bar.foo]]
test winDialog-5.9 {GetFileName: file types} -constraints {
nt testwinevent
@@ -411,13 +423,19 @@ if {[info exists ::env(TEMP)]} {
test winDialog-5.23 {GetFileName: convert \ to /} -constraints {
nt testwinevent
} -body {
+ set msg {}
start {set x [tk_getSaveFile -title Back]}
then {
- SetText 0x47C [file nativename \
- [file join [file normalize $::env(TEMP)] "12x 457"]]
- Click ok
+ if {[catch {SetText 0x47C [file nativename \
+ [file join [file normalize $::env(TEMP)] "12x 457"]]} msg]} {
+ Click cancel
+ } else {
+ Click ok
+ }
}
- return $x
+ return $x$msg
+} -cleanup {
+ unset msg
} -result [file join [file normalize $::env(TEMP)] "12x 457"]
}
test winDialog-5.24 {GetFileName: file types: MakeFilter() succeeds} -constraints {