summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashok <ashok>2015-10-09 04:44:27 (GMT)
committerashok <ashok>2015-10-09 04:44:27 (GMT)
commitf5d4ffd4633b850b12389d71358c75289cc61b2c (patch)
tree18ec3c88bafdeedd02845320e0c0ffb49014b9ef
parenta330258fc1d11057954a3f1c9ca93f06c10784cd (diff)
downloadtk-f5d4ffd4633b850b12389d71358c75289cc61b2c.zip
tk-f5d4ffd4633b850b12389d71358c75289cc61b2c.tar.gz
tk-f5d4ffd4633b850b12389d71358c75289cc61b2c.tar.bz2
Added missing tests for tk_getOpenFile -defaultextension
-rw-r--r--tests/winDialog.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/winDialog.test b/tests/winDialog.test
index 80a025c..49d9c17 100644
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -391,6 +391,35 @@ test winDialog-5.7.6 {GetFileName: All/extension } -constraints {
unset msg
} -result bar.ext
+test winDialog-5.7.7 {tk_getOpenFile: -defaultextension} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ tcltest::makeFile "" "5 7 7.ext" [initialdir]
+ start {set x [tk_getOpenFile \
+ -defaultextension ext \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 7 7" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 7 7.ext"]
+
+test winDialog-5.7.8 {tk_getOpenFile: -defaultextension} -constraints {
+ nt testwinevent
+} -body {
+ unset -nocomplain x
+ tcltest::makeFile "" "5 7 8.ext" [initialdir]
+ start {set x [tk_getOpenFile \
+ -defaultextension ext \
+ -initialdir [file nativename [initialdir]] \
+ -initialfile "5 7 8.ext" -title Foo]}
+ then {
+ Click ok
+ }
+ return $x
+} -result [file join [initialdir] "5 7 8.ext"]
test winDialog-5.8 {GetFileName: extension doesn't begin with .} -constraints {
nt testwinevent