diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
| commit | 25f16a070dd42bc33af26334d2071a81377aee5c (patch) | |
| tree | f20dcb1268a10aa292953f0ffa965881fefed78b /tests/systray.test | |
| parent | e1675428ff056ed7a44fcc26a26dc5adb8e5f9eb (diff) | |
| parent | f8e4b115fdb0f0886cd853323937b8ea757fcc21 (diff) | |
| download | tk-core-tip-716.zip tk-core-tip-716.tar.gz tk-core-tip-716.tar.bz2 | |
Merge core-9-0-branchcore-tip-716
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 |
