diff options
Diffstat (limited to 'tests/msgbox.test')
-rw-r--r-- | tests/msgbox.test | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/tests/msgbox.test b/tests/msgbox.test index 643ae2c..1b84463 100644 --- a/tests/msgbox.test +++ b/tests/msgbox.test @@ -11,12 +11,18 @@ tcltest::loadTestedCommands namespace import -force tcltest::test -test msgbox-1.1 {tk_messageBox command} -body { +test msgbox-1.1.1 {tk_messageBox command} -constraints notAqua -body { tk_messageBox -foo } -returnCodes error -result {bad option "-foo": must be -default, -detail, -icon, -message, -parent, -title, or -type} -test msgbox-1.2 {tk_messageBox command} -body { +test msgbox-1.1.2 {tk_messageBox command} -constraints aqua -body { + tk_messageBox -foo +} -returnCodes error -result {bad option "-foo": must be -default, -detail, -icon, -message, -parent, -title, -type, or -command} +test msgbox-1.2.1 {tk_messageBox command} -constraints notAqua -body { tk_messageBox -foo bar } -returnCodes error -result {bad option "-foo": must be -default, -detail, -icon, -message, -parent, -title, or -type} +test msgbox-1.2.2 {tk_messageBox command} -constraints aqua -body { + tk_messageBox -foo bar +} -returnCodes error -result {bad option "-foo": must be -default, -detail, -icon, -message, -parent, -title, -type, or -command} test msgbox-1.3 {tk_messageBox command} -body { tk_messageBox -default @@ -48,30 +54,22 @@ test msgbox-1.11 {tk_messageBox command} -body { tk_messageBox -type foo } -returnCodes error -result {bad -type value "foo": must be abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel} -test msgbox-1.12 {tk_messageBox command} -constraints unix -body { - tk_messageBox -default 1.1 -} -returnCodes error -result {invalid default button "1.1"} -test msgbox-1.13 {tk_messageBox command} -constraints macOrWin -body { +test msgbox-1.13 {tk_messageBox command} -body { tk_messageBox -default 1.1 } -returnCodes error -result {bad -default value "1.1": must be abort, retry, ignore, ok, cancel, no, or yes} -test msgbox-1.14 {tk_messageBox command} -constraints unix -body { - tk_messageBox -default foo -} -returnCodes error -result {invalid default button "foo"} -test msgbox-1.15 {tk_messageBox command} -constraints macOrWin -body { +test msgbox-1.14 {tk_messageBox command} -body { tk_messageBox -default foo } -returnCodes error -result {bad -default value "foo": must be abort, retry, ignore, ok, cancel, no, or yes} -test msgbox-1.16 {tk_messageBox command} -constraints unix -body { - tk_messageBox -type yesno -default 3 -} -returnCodes error -result {invalid default button "3"} -test msgbox-1.17 {tk_messageBox command} -constraints macOrWin -body { +test msgbox-1.16 {tk_messageBox command} -body { tk_messageBox -type yesno -default 3 } -returnCodes error -result {bad -default value "3": must be abort, retry, ignore, ok, cancel, no, or yes} test msgbox-1.18 {tk_messageBox command} -body { tk_messageBox -icon foo } -returnCodes error -result {bad -icon value "foo": must be error, info, question, or warning} + test msgbox-1.19 {tk_messageBox command} -body { tk_messageBox -parent foo.bar } -returnCodes error -result {bad window path name "foo.bar"} |