diff options
author | fvogel <fvogelnew1@free.fr> | 2017-12-19 21:55:22 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-12-19 21:55:22 (GMT) |
commit | 2c313f95514106dcb03e7c44ba33677f68c1f2e4 (patch) | |
tree | 536ab8bf4ba71a4a13c4a86dfb2a4ed3cc3a1908 /tests/busy.test | |
parent | d2b827c75b62eceb222727ff1f22f0c04bf95e1a (diff) | |
download | tk-2c313f95514106dcb03e7c44ba33677f68c1f2e4.zip tk-2c313f95514106dcb03e7c44ba33677f68c1f2e4.tar.gz tk-2c313f95514106dcb03e7c44ba33677f68c1f2e4.tar.bz2 |
Implement TIP #492: Introspection for 'tk busy', with test cases and man page.
Diffstat (limited to 'tests/busy.test')
-rw-r--r-- | tests/busy.test | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/tests/busy.test b/tests/busy.test index 304c2eb..6f22b85 100644 --- a/tests/busy.test +++ b/tests/busy.test @@ -23,53 +23,59 @@ test busy-2.1 {tk busy hold} -returnCodes error -body { tk busy hold } -result {wrong # args: should be "tk busy hold window ?option value ...?"} test busy-2.2 {tk busy hold root window} -body { - tk busy hold . + set res [tk busy hold .] update + set res } -cleanup { tk busy forget . -} -result {} +} -result {._Busy} test busy-2.3 {tk busy hold root window with shortcut} -body { - tk busy . + set res [tk busy .] update + set res } -cleanup { tk busy forget . -} -result {} +} -result {._Busy} test busy-2.4 {tk busy hold nested window} -setup { pack [frame .f] } -body { - tk busy hold .f + set res [tk busy hold .f] update + set res } -cleanup { tk busy forget .f destroy .f -} -result {} +} -result {.f_Busy} test busy-2.5 {tk busy hold nested window with shortcut} -setup { pack [frame .f] } -body { - tk busy .f + set res [tk busy .f] update + set res } -cleanup { tk busy forget .f destroy .f -} -result {} +} -result {.f_Busy} test busy-2.6 {tk busy hold toplevel window} -setup { toplevel .f } -body { - tk busy hold .f + set res [tk busy hold .f] update + set res } -cleanup { tk busy forget .f destroy .f -} -result {} +} -result {.f._Busy} test busy-2.7 {tk busy hold toplevel window with shortcut} -setup { toplevel .f } -body { - tk busy .f + set res [tk busy .f] update + set res } -cleanup { tk busy forget .f destroy .f -} -result {} +} -result {.f._Busy} test busy-2.8 {tk busy hold non existing window} -body { tk busy hold .f update @@ -79,17 +85,19 @@ test busy-2.9 {tk busy hold (shortcut) non existing window} -body { update } -returnCodes {error} -result {bad window path name ".f"} test busy-2.10 {tk busy hold root window with cursor} -body { - tk busy hold . -cursor arrow + set res [tk busy hold . -cursor arrow] update + set res } -cleanup { tk busy forget . -} -result {} +} -result {._Busy} test busy-2.11 {tk busy hold (shortcut) root window, cursor} -body { - tk busy . -cursor arrow + set res [tk busy . -cursor arrow] update + set res } -cleanup { tk busy forget . -} -result {} +} -result {._Busy} test busy-2.12 {tk busy hold root window, invalid cursor} -body { tk busy hold . -cursor nonExistingCursor update @@ -473,5 +481,29 @@ test busy-7.9 {tk busy current 2 busy with non matching filter after forget} -se destroy .f1 .f2 } -result {} +test busy-8.1 {tk busy busywindow with a busy toplevel} -body { + toplevel .top + tk busy .top + tk busy busywindow .top +} -cleanup { + tk busy forget .top + destroy .top +} -result {.top._Busy} +test busy-8.2 {tk busy busywindow with a busy widget} -body { + pack [frame .f] + tk busy .f + tk busy busywindow .f +} -cleanup { + tk busy forget .f + destroy .f +} -result {.f_Busy} +test busy-8.3 {tk busy busywindow with a nonexisting widget} -body { + tk busy . + tk busy busywindow .nonExistingWidget +} -cleanup { + tk busy forget . +} -returnCodes error -result {bad window path name ".nonExistingWidget"} + + ::tcltest::cleanupTests return |