summaryrefslogtreecommitdiffstats
path: root/tests/filebox.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-05-13 17:41:24 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-05-13 17:41:24 (GMT)
commit5087fdaa7d95cbb0604ea7df6a84b2f8cce91640 (patch)
treee5b3b7b3153ea0e7ab71b472157b65e4f90be402 /tests/filebox.test
parentbe77eeb2e9ca398484104e26a98f826d9fc7c41d (diff)
parent271cd56eb5cb8de37e5ee3664310cdd00312e803 (diff)
downloadtk-5087fdaa7d95cbb0604ea7df6a84b2f8cce91640.zip
tk-5087fdaa7d95cbb0604ea7df6a84b2f8cce91640.tar.gz
tk-5087fdaa7d95cbb0604ea7df6a84b2f8cce91640.tar.bz2
Fix [66db98f30d]: choosedir, filebox, msgbox tests fails on macOS + undocumented options -message and -command
Diffstat (limited to 'tests/filebox.test')
-rw-r--r--tests/filebox.test34
1 files changed, 24 insertions, 10 deletions
diff --git a/tests/filebox.test b/tests/filebox.test
index 85cb8a5..e373d73 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -110,8 +110,10 @@ if {$tcl_platform(platform) == "unix"} {
set modes 1
}
-set unknownOptionsMsg(tk_getOpenFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}
-set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -confirmoverwrite, -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable}
+set unknownOptionsMsg(tk_getOpenFile,notAqua) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}
+set unknownOptionsMsg(tk_getOpenFile,aqua) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -message, -multiple, -parent, -title, -typevariable, or -command}
+set unknownOptionsMsg(tk_getSaveFile,notAqua) {bad option "-foo": must be -confirmoverwrite, -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable}
+set unknownOptionsMsg(tk_getSaveFile,aqua) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -message, -parent, -title, -typevariable, -command, or -confirmoverwrite}
set tmpFile "filebox.tmp"
makeFile {
@@ -155,9 +157,12 @@ foreach mode $modes {
}
}
- test filebox-1.1-$mode "tk_getOpenFile command" -body {
+ test filebox-1.1.1-$mode "tk_getOpenFile command" -constraints notAqua -body {
tk_getOpenFile -foo
- } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile)
+ } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,notAqua)
+ test filebox-1.1.2-$mode "tk_getOpenFile command" -constraints aqua -body {
+ tk_getOpenFile -foo
+ } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,aqua)
catch {tk_getOpenFile -foo 1} msg
regsub -all , $msg "" options
@@ -171,9 +176,12 @@ foreach mode $modes {
}
}
- test filebox-1.3-$mode "tk_getOpenFile command" -body {
+ test filebox-1.3.1-$mode "tk_getOpenFile command" -constraints notAqua -body {
+ tk_getOpenFile -foo bar
+ } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,notAqua)
+ test filebox-1.3.2-$mode "tk_getOpenFile command" -constraints aqua -body {
tk_getOpenFile -foo bar
- } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile)
+ } -returnCodes error -result $unknownOptionsMsg(tk_getOpenFile,aqua)
test filebox-1.4-$mode "tk_getOpenFile command" -body {
tk_getOpenFile -initialdir
} -returnCodes error -result {value for "-initialdir" missing}
@@ -289,9 +297,12 @@ foreach mode $modes {
} $res
}
- test filebox-4.1-$mode "tk_getSaveFile command" -body {
+ test filebox-4.1.1-$mode "tk_getSaveFile command" -constraints notAqua -body {
tk_getSaveFile -foo
- } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile)
+ } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile,notAqua)
+ test filebox-4.1.2-$mode "tk_getSaveFile command" -constraints aqua -body {
+ tk_getSaveFile -foo
+ } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile,aqua)
catch {tk_getSaveFile -foo 1} msg
regsub -all , $msg "" options
@@ -305,9 +316,12 @@ foreach mode $modes {
}
}
- test filebox-4.3-$mode "tk_getSaveFile command" -body {
+ test filebox-4.3.1-$mode "tk_getSaveFile command" -constraints notAqua -body {
+ tk_getSaveFile -foo bar
+ } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile,notAqua)
+ test filebox-4.3.2-$mode "tk_getSaveFile command" -constraints aqua -body {
tk_getSaveFile -foo bar
- } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile)
+ } -returnCodes error -result $unknownOptionsMsg(tk_getSaveFile,aqua)
test filebox-4.4-$mode "tk_getSaveFile command" -body {
tk_getSaveFile -initialdir
} -returnCodes error -result {value for "-initialdir" missing}