diff options
Diffstat (limited to 'tests/systray.test')
| -rw-r--r-- | tests/systray.test | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/tests/systray.test b/tests/systray.test index 6f38823..5a0d1c8 100644 --- a/tests/systray.test +++ b/tests/systray.test @@ -10,6 +10,9 @@ namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +# Import utility procs for specific functional areas +testutils import child + test systray-1 {systray icon creation, all options} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== } -body { @@ -124,15 +127,7 @@ test systray-14 {systray icon creation, create one per interp, visibiliy checks} image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== } -body { tk systray create -image _book -text "first interp" - interp create second - # load Tk into the 'second' interp - foreach pkg [info loaded] { - if {[lindex $pkg 1] == "Tk"} { - set loadTk "load $pkg" - break - } - } - eval $loadTk second + childTkInterp second # create the icon in the 'second' interp second eval { # should trigger an error: image _book unknown in 'second' interp' @@ -149,15 +144,7 @@ test systray-15 {systray icon creation, create one per interp} -setup { image create photo _book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw== } -body { tk systray create -image _book -text "first interp" - interp create second - # load Tk into the 'second' interp - foreach pkg [info loaded] { - if {[lindex $pkg 1] == "Tk"} { - set loadTk "load $pkg" - break - } - } - eval $loadTk second + childTkInterp second # create the icon in the 'second' interp second eval { image create photo _page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7 @@ -236,5 +223,9 @@ test sysnotify-2.2 {system notification is not linked to any systray icon on X11 tk sysnotify {Alert} {This is an alert} } -result {} +# +# CLEANUP +# +testutils forget child cleanupTests |
