diff options
author | dgp@users.sourceforge.net <dgp> | 2001-08-01 16:21:11 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2001-08-01 16:21:11 (GMT) |
commit | 73da871c94ff66eb9b314fb09a75a7124968bbd4 (patch) | |
tree | 38846cbe94cc8aac068898282ced4624f130770e /tests | |
parent | 2acf69a713e833db0ee374542978d48ef0ee583e (diff) | |
download | tk-73da871c94ff66eb9b314fb09a75a7124968bbd4.zip tk-73da871c94ff66eb9b314fb09a75a7124968bbd4.tar.gz tk-73da871c94ff66eb9b314fb09a75a7124968bbd4.tar.bz2 |
Merged changes from feature branch dgp-privates-into-namespace,
implementing TIP 44. All Tk commands and variables matching
tk[A-Z]* are now in the ::tk namespace.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clrpick.test | 10 | ||||
-rw-r--r-- | tests/filebox.test | 4 | ||||
-rw-r--r-- | tests/macMenu.test | 122 | ||||
-rw-r--r-- | tests/menu.test | 16 | ||||
-rw-r--r-- | tests/menuDraw.test | 62 | ||||
-rw-r--r-- | tests/msgbox.test | 4 | ||||
-rw-r--r-- | tests/text.test | 6 | ||||
-rw-r--r-- | tests/unixMenu.test | 110 | ||||
-rw-r--r-- | tests/winMenu.test | 100 | ||||
-rw-r--r-- | tests/xmfbox.test | 50 |
10 files changed, 242 insertions, 242 deletions
diff --git a/tests/clrpick.test b/tests/clrpick.test index 94a99c0..2259fe7 100644 --- a/tests/clrpick.test +++ b/tests/clrpick.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: clrpick.test,v 1.5 2000/03/02 03:02:13 ericm Exp $ +# RCS: @(#) $Id: clrpick.test,v 1.6 2001/08/01 16:21:12 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -54,7 +54,7 @@ test clrpick-1.7 {tk_chooseColor command} { list [catch {tk_chooseColor -initialcolor ##badbadbaadcolor} msg] $msg } {1 {invalid color name "##badbadbaadcolor"}} -if {[info commands tkColorDialog] == ""} { +if {[info commands tk::dialog::color::] == ""} { set isNative 1 } else { set isNative 0 @@ -82,7 +82,7 @@ proc PressButton {btn} { proc ChooseColorByKey {parent r g b} { set w .__tk__color - upvar #0 $w data + upvar ::tk::dialog::color::[winfo name $w] data update $data(red,entry) delete 0 end @@ -96,14 +96,14 @@ proc ChooseColorByKey {parent r g b} { # Manually force the refresh of the color values instead # of counting on the timing of the event stream to change # the values for us. - tkColorDialog_HandleRGBEntry $w + tk::dialog::color::HandleRGBEntry $w SendButtonPress $parent ok mouse } proc SendButtonPress {parent btn type} { set w .__tk__color - upvar #0 $w data + upvar ::tk::dialog::color::[winfo name $w] data set button $data($btn\Btn) if ![winfo ismapped $button] { diff --git a/tests/filebox.test b/tests/filebox.test index bff0465..e288b39 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: filebox.test,v 1.10 2000/06/30 20:19:07 ericm Exp $ +# RCS: @(#) $Id: filebox.test,v 1.11 2001/08/01 16:21:12 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -161,7 +161,7 @@ foreach mode $modes { list [catch {$command -filetypes {Foo}} msg] $msg } {1 {bad file type "Foo", should be "typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?"}} - if {[info commands tkMotifFDialog] == "" && [info commands ::tk::dialog::file::tkFDialog] == ""} { + if {[info commands tk::MotifFDialog] == "" && [info commands ::tk::dialog::file::] == ""} { set isNative 1 } else { set isNative 0 diff --git a/tests/macMenu.test b/tests/macMenu.test index 808e46d..b261180 100644 --- a/tests/macMenu.test +++ b/tests/macMenu.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: macMenu.test,v 1.4 2001/03/28 17:27:10 dgp Exp $ +# RCS: @(#) $Id: macMenu.test,v 1.5 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -916,7 +916,7 @@ test macMenu-21.8 {TkpSetMainMenubar - tearoff window} { menu .t2.m1.foo .t2.m1.foo add command -label foo raise .t2 - tkTearOffMenu .t2.m1.foo 100 100 + tk::TearOffMenu .t2.m1.foo 100 100 list [catch {update} msg] $msg [destroy .t2] } {0 {} {}} @@ -932,62 +932,62 @@ test macMenu-24.1 {GetMenuIndicatorGeometry} { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.1 {GetMenuAccelGeometry - cascade entry} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.2 {GetMenuAccelGeometry - no accel} { catch {destroy .m1} menu .m1 .m1 add command - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.3 {GetMenuAccelGeometry - no special chars - arbitrary string} { catch {destroy .m1} menu .m1 .m1 add command -accel "Test" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.4 {GetMenuAccelGeometry - Command} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Cmd+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.5 {GetMenuAccelGeometry - Control} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.6 {GetMenuAccelGeometry - Shift} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Shift+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.7 {GetMenuAccelGeometry - Option} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Opt+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.8 {GetMenuAccelGeometry - Combination} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Cmd+Shift+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-25.9 {GetMenuAccelGeometry - extra text} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Command+Delete" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-26.1 {GetTearoffEntryGeometry} { @@ -998,14 +998,14 @@ test macMenu-27.1 {GetMenuSeparatorGeometry} { catch {destroy .m1} menu .m1 .m1 add separator - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test macMenu-28.1 {DrawMenuEntryIndicator - non-checkbutton} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-28.2 {DrawMenuEntryIndicator - indicator off} { @@ -1013,14 +1013,14 @@ test macMenu-28.2 {DrawMenuEntryIndicator - indicator off} { menu .m1 .m1 add checkbutton -label foo -indicatoron 0 .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-28.3 {DrawMenuEntryIndicator - not selected} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-28.4 {DrawMenuEntryIndicator - checkbutton} { @@ -1028,7 +1028,7 @@ test macMenu-28.4 {DrawMenuEntryIndicator - checkbutton} { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-28.5 {DrawMenuEntryIndicator - radiobutton} { @@ -1036,7 +1036,7 @@ test macMenu-28.5 {DrawMenuEntryIndicator - radiobutton} { menu .m1 .m1 add radiobutton -label foo .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -1045,7 +1045,7 @@ test macMenu-29.1 {DrawSICN} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Cmd+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -1054,56 +1054,56 @@ test macMenu-30.1 {DrawMenuEntryAccelerator - cascade entry} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.2 {DrawMenuEntryAccelerator - no accel string} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.3 {DrawMenuEntryAccelerator - random accel string} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.4 {DrawMenuEntryAccelerator - Command} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Cmd+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.5 {DrawMenuEntryAccelerator - Option} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Opt+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.6 {DrawMenuEntryAccelerator - Shift} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Shift+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.7 {DrawMenuEntryAccelerator - Control} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test macMenu-30.8 {DrawMenuEntryAccelerator - combination} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Cmd+Shift+S" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -1111,7 +1111,7 @@ test macMenu-31.1 {DrawMenuSeparator} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -1119,7 +1119,7 @@ test macMenu-32.1 {TkpDrawMenuEntryLabel} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -1143,7 +1143,7 @@ test macMenu-40.1 {TkpDrawMenuEntry - gc for active and not strict motif} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1151,7 +1151,7 @@ test macMenu-40.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1160,7 +1160,7 @@ test macMenu-40.3 {TkpDrawMenuEntry - gc for active and strict motif} { menu .m1 set tk_strictMotif 1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -1168,35 +1168,35 @@ test macMenu-40.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled -background red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.7 {TkpDrawMenuEntry - gc for normal - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -foreground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.8 {TkpDrawMenuEntry - gc for normal} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.9 {TkpDrawMenuEntry - gc for indicator - custom entry} { @@ -1204,7 +1204,7 @@ test macMenu-40.9 {TkpDrawMenuEntry - gc for indicator - custom entry} { menu .m1 .m1 add checkbutton -label foo -selectcolor orange .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.10 {TkpDrawMenuEntry - gc for indicator} { @@ -1212,14 +1212,14 @@ test macMenu-40.10 {TkpDrawMenuEntry - gc for indicator} { menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.11 {TkpDrawMenuEntry - border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activebackground green - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1227,7 +1227,7 @@ test macMenu-40.12 {TkpDrawMenuEntry - border} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1236,7 +1236,7 @@ test macMenu-40.13 {TkpDrawMenuEntry - active border - strict motif} { set tk_strictMotif 1 menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -1244,7 +1244,7 @@ test macMenu-40.14 {TkpDrawMenuEntry - active border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground yellow - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1252,7 +1252,7 @@ test macMenu-40.15 {TkpDrawMenuEntry - active border} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -1260,28 +1260,28 @@ test macMenu-40.16 {TkpDrawMenuEntry - font - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -font "Helvectica 72" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.17 {TkpDrawMenuEntry - font} { catch {destroy .m1} menu .m1 -font "Courier 72" .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.18 {TkpDrawMenuEntry - separator} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.19 {TkpDrawMenuEntry - standard} { catch {destroy .mb} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.20 {TkpDrawMenuEntry - disabled cascade item} { @@ -1291,7 +1291,7 @@ test macMenu-40.20 {TkpDrawMenuEntry - disabled cascade item} { menu .m1.file .m1.file add command -label foo .m1 entryconfigure File -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.21 {TkpDrawMenuEntry - indicator} { @@ -1299,7 +1299,7 @@ test macMenu-40.21 {TkpDrawMenuEntry - indicator} { menu .m1 .m1 add checkbutton -label macMenu-40.20 .m1 invoke 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-40.22 {TkpDrawMenuEntry - indicator - hideMargin} { @@ -1307,7 +1307,7 @@ test macMenu-40.22 {TkpDrawMenuEntry - indicator - hideMargin} { menu .m1 .m1 add checkbutton -label macMenu-40.21 -hidemargin 1 .m1 invoke 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -1457,7 +1457,7 @@ test macMenu-42.1 {DrawMenuEntryLabel - setting indicatorSpace} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] } {{} {}} test macMenu-42.2 {DrawMenuEntryLabel - drawing image} { @@ -1466,7 +1466,7 @@ test macMenu-42.2 {DrawMenuEntryLabel - drawing image} { image create test image1 menu .m1 .m1 add command -image image1 - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] [image delete image1] } {{} {} {}} test macMenu-42.3 {DrawMenuEntryLabel - drawing select image} { @@ -1477,35 +1477,35 @@ test macMenu-42.3 {DrawMenuEntryLabel - drawing select image} { menu .m1 .m1 add checkbutton -image image1 -selectimage image2 .m1 invoke 1 - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] [eval image delete [image names]] } {{} {} {}} test macMenu-42.4 {DrawMenuEntryLabel - drawing a bitmap} { catch {destroy .m1} menu .m1 .m1 add command -bitmap questhead - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] } {{} {}} test macMenu-42.5 {DrawMenuEntryLabel - drawing null label} { catch {destroy .m1} menu .m1 .m1 add command - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] } {{} {}} test macMenu-42.6 {DrawMenuEntryLabel - drawing real label} { catch {destroy .m1} menu .m1 .m1 add command -label "This is a long label" -underline 3 - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] } {{} {}} test macMenu-42.7 {DrawMenuEntryLabel - drawing disabled label} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label "This is a long label" -state disabled - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [update idletasks] [destroy .m1] } {{} {}} test macMenu-42.8 {DrawMenuEntryLabel - disabled images} { @@ -1514,7 +1514,7 @@ test macMenu-42.8 {DrawMenuEntryLabel - disabled images} { image create test image1 menu .m1 .m1 add command -image image1 -state disabled - set tearoff [tkTearOffMenu .m1 100 100] + set tearoff [tk::TearOffMenu .m1 100 100] list [update idletasks] [destroy .m1] [image delete image1] } {{} {} {}} @@ -1549,14 +1549,14 @@ test macMenu-44.1 {DrawMenuEntryBackground} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test macMenu-44.2 {DrawMenuEntryBackground} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] $tearoff activate 0 list [update] [destroy .m1] } {{} {}} diff --git a/tests/menu.test b/tests/menu.test index db13f8f..33995b0 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: menu.test,v 1.6 2001/03/28 17:27:10 dgp Exp $ +# RCS: @(#) $Id: menu.test,v 1.7 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -1066,20 +1066,20 @@ test menu-5.6 {DestroyMenuInstance - cascades of cloned menus} { test menu-5.7 {DestroyMenuInstance - basic clones} { catch {destroy .m1} menu .m1 - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [catch {destroy $tearoff} msg] $msg [destroy .m1] } {0 {} {}} test menu-5.8 {DestroyMenuInstance - multiple clones} { catch {destroy .m1} menu .m1 - set tearoff1 [tkTearOffMenu .m1] - set tearoff2 [tkTearOffMenu .m1] + set tearoff1 [tk::TearOffMenu .m1] + set tearoff2 [tk::TearOffMenu .m1] list [catch {destroy $tearoff1} msg] $msg [destroy .m1] } {0 {} {}} test menu-5.9 {DestroyMenuInstace - master menu} { catch {destroy .m1} menu .m1 - tkTearOffMenu .m1 + tk::TearOffMenu .m1 list [catch {destroy .m1} msg] $msg } {0 {}} test menu-5.10 {DestroyMenuInstance - freeing entries} { @@ -1105,7 +1105,7 @@ test menu-5.13 {DestroyMenuInstance - clones when mismatched tearoffs} { menu .m1 menu .m2 .m1 add cascade -menu .m2 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [destroy .m2] [destroy .m1] } {{} {}} @@ -1899,7 +1899,7 @@ test menu-16.16 {MenuAddOrInsert} { catch {destroy .m2} menu .m1 menu .m2 - set tearoff [tkTearOffMenu .m2] + set tearoff [tk::TearOffMenu .m2] list [catch {.m2 add cascade -menu .m1} msg] $msg [$tearoff unpost] [catch {destroy .m1} msg2] $msg2 [catch {destroy .m2} msg3] $msg3 } {0 {} {} 0 {} 0 {}} test menu-16.17 {MenuAddOrInsert} { @@ -1908,7 +1908,7 @@ test menu-16.17 {MenuAddOrInsert} { menu .m1 menu .container . configure -menu .container - set tearoff [tkTearOffMenu .container] + set tearoff [tk::TearOffMenu .container] list [catch {.container add cascade -label "File" -menu .m1} msg] $msg [. configure -menu ""] [destroy .m1 .container] } {0 {} {} {}} test menu-16.18 {MenuAddOrInsert} { diff --git a/tests/menuDraw.test b/tests/menuDraw.test index fdb051b..ea3503b 100644 --- a/tests/menuDraw.test +++ b/tests/menuDraw.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: menuDraw.test,v 1.3 1999/04/16 01:51:39 stanton Exp $ +# RCS: @(#) $Id: menuDraw.test,v 1.4 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -168,7 +168,7 @@ test menuDraw-7.1 {TkEventuallyRecomputeMenu} { catch {destroy .m1} menu .m1 .m1 add command -label "This is a long label" - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] update idletasks list [.m1 entryconfigure 1 -label "foo"] [destroy .m1] } {{} {}} @@ -176,7 +176,7 @@ test menuDraw-7.2 {TkEventuallyRecomputeMenu - update pending} { catch {destroy .m1} menu .m1 .m1 add command -label "This is a long label" - set tearoff [tkTearOffMenu .m1] + set tearoff [tk::TearOffMenu .m1] list [.m1 entryconfigure 1 -label "foo"] [destroy .m1] } {{} {}} @@ -196,14 +196,14 @@ test menuDraw-9.1 {TkEventuallyRedrawMenu - entry test} { menu .m1 set foo 0 .m1 add radiobutton -variable foo -label test - tkTearOffMenu .m1 + tk::TearOffMenu .m1 update idletasks list [set foo test] [destroy .m1] [unset foo] } {test {} {}} test menuDraw-9.2 {TkEventuallyRedrawMenu - whole menu} { catch {destroy .m1} menu .m1 - list [catch {tkTearOffMenu .m1}] [destroy .m1] + list [catch {tk::TearOffMenu .m1}] [destroy .m1] } {0 {}} # Don't know how to test when window has been deleted and ComputeMenuGeometry @@ -244,7 +244,7 @@ test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending} menu .m1 .m1 add checkbutton -image image1 -selectimage image2 .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] update idletasks list [image delete image2] [destroy .m1] [eval image delete [image names]] } {{} {} {}} @@ -256,7 +256,7 @@ test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} { menu .m1 .m1 add checkbutton -image image1 -selectimage image2 .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [image delete image2] [destroy .m1] [eval image delete [image names]] } {{} {} {}} test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} { @@ -266,7 +266,7 @@ test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} { image create test image2 menu .m1 .m1 add checkbutton -image image1 -selectimage image2 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] update idletasks list [image delete image2] [destroy .m1] [eval image delete [image names]] } {{} {} {}} @@ -282,14 +282,14 @@ test menuDraw-12.1 {DisplayMenu - menubar background} {unixOnly} { test menuDraw-12.2 {Display menu - no entries} { catch {destroy .m1} menu .m1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw-12.3 {DisplayMenu - one entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw-12.4 {DisplayMenu - two entries} { @@ -297,7 +297,7 @@ test menuDraw-12.4 {DisplayMenu - two entries} { menu .m1 .m1 add command -label "one" .m1 add command -label "two" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw.12.5 {DisplayMenu - two columns - first bigger} { @@ -306,7 +306,7 @@ test menuDraw.12.5 {DisplayMenu - two columns - first bigger} { .m1 add command -label "one" .m1 add command -label "two" .m1 add command -label "three" -columnbreak 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw-12.5 {DisplayMenu - two column - second bigger} { @@ -315,7 +315,7 @@ test menuDraw-12.5 {DisplayMenu - two column - second bigger} { .m1 add command -label "one" .m1 add command -label "two" -columnbreak 1 .m1 add command -label "three" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw.12.7 {DisplayMenu - three columns} { @@ -327,7 +327,7 @@ test menuDraw.12.7 {DisplayMenu - three columns} { .m1 add command -label "four" .m1 add command -label "five" .m1 add command -label "six" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test menuDraw-12.6 {Display menu - testing for extra space and menubars} {unixOnly} { @@ -341,7 +341,7 @@ test menuDraw-12.7 {Display menu - extra space at end of menu} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] wm geometry $tearoff 200x100 list [update] [destroy .m1] } {{} {}} @@ -353,15 +353,15 @@ test menuDraw-13.1 {TkMenuEventProc - Expose} { .m1 add command -label "one" menu .m2 .m2 add command -label "two" - set tearoff1 [tkTearOffMenu .m1 40 40] - set tearoff2 [tkTearOffMenu .m2 40 40] + set tearoff1 [tk::TearOffMenu .m1 40 40] + set tearoff2 [tk::TearOffMenu .m2 40 40] list [raise $tearoff2] [update] [destroy .m1] [destroy .m2] } {{} {} {} {}} test menuDraw-13.2 {TkMenuEventProc - ConfigureNotify} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [wm geometry $tearoff 200x100] [update] [destroy .m1] } {{} {} {}} test menuDraw-13.3 {TkMenuEventProc - ActivateNotify} {macOnly} { @@ -369,7 +369,7 @@ test menuDraw-13.3 {TkMenuEventProc - ActivateNotify} {macOnly} { toplevel .t2 -menu .t2.m1 menu .t2.m1 .t2.m1 add command -label foo - tkTearOffMenu .t2.m1 40 40 + tk::TearOffMenu .t2.m1 40 40 list [catch {update} msg] $msg [destroy .t2] } {0 {} {}} # Testing deletes is hard, and I am going to do my best. Don't know how @@ -410,13 +410,13 @@ test menuDraw-15.1 {TkPostTearoffMenu - Basic posting} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test menuDraw-15.2 {TkPostTearoffMenu - Deactivation} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" -state active - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [$tearoff index active] [destroy .m1] } {none {}} test menuDraw-15.3 {TkPostTearoffMenu - post command} { @@ -424,27 +424,27 @@ test menuDraw-15.3 {TkPostTearoffMenu - post command} { catch {unset foo} menu .m1 -postcommand "set foo .m1" .m1 add command -label "foo" - list [catch {tkTearOffMenu .m1 40 40}] [set foo] [unset foo] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [set foo] [unset foo] [destroy .m1] } {0 .m1 {} {}} test menuDraw-15.4 {TkPostTearoffMenu - post command deleting the menu} { catch {destroy .m1} menu .m1 -postcommand "destroy .m1" .m1 add command -label "foo" - list [catch {tkTearOffMenu .m1 40 40} msg] $msg [winfo exists .m1] + list [catch {tk::TearOffMenu .m1 40 40} msg] $msg [winfo exists .m1] } {0 {} 0} test menuDraw-15.5 {TkPostTearoffMenu - tearoff at edge of screen} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" set height [winfo screenheight .m1] - list [catch {tkTearOffMenu .m1 40 $height}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 $height}] [destroy .m1] } {0 {}} test menuDraw-15.6 {TkPostTearoffMenu - tearoff off right} { catch {destroy .m1} menu .m1 .m1 add command -label "foo" set width [winfo screenwidth .m1] - list [catch {tkTearOffMenu .m1 $width 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 $width 40}] [destroy .m1] } {0 {}} @@ -455,7 +455,7 @@ test menuDraw-16.1 {TkPostSubmenu} {unixOnly} { .m1 add cascade -label test -menu .m2 menu .m2 .m2 add command -label "Hit ESCAPE to make this menu go away." - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] $tearoff postcascade 0 list [$tearoff postcascade 0] [destroy .m1] [destroy .m2] } {{} {} {}} @@ -470,7 +470,7 @@ test menuDraw-16.2 {TkPostSubMenu} {unixOnly} { .m2 add command -label "two" menu .m3 .m3 add command -label "three" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] $tearoff postcascade 0 list [$tearoff postcascade 1] [destroy .m1] [destroy .m2] [destroy .m3] } {{} {} {} {}} @@ -484,7 +484,7 @@ test menuDraw-16.4 {TkPostSubMenu} { catch {destroy .m1} menu .m1 .m1 add cascade -label test - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [$tearoff postcascade 0] [destroy .m1] } {{} {}} test menuDraw-16.5 {TkPostSubMenu} {unixOnly} { @@ -493,7 +493,7 @@ test menuDraw-16.5 {TkPostSubMenu} {unixOnly} { menu .m1 .m1 add cascade -label test -menu .m2 menu .m2 -postcommand "glorp" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {$tearoff postcascade test} msg] $msg [destroy .m1] [destroy .m2] } {1 {invalid command name "glorp"} {} {}} test menuDraw-16.6 {TkPostSubMenu} {pcOnly userInteraction} { @@ -503,7 +503,7 @@ test menuDraw-16.6 {TkPostSubMenu} {pcOnly userInteraction} { .m1 add cascade -label test -menu .m2 menu .m2 .m2 add command -label "Hit ESCAPE to get rid of this menu" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [$tearoff postcascade 0] [destroy .m1] [destroy .m2] } {{} {} {}} @@ -529,7 +529,7 @@ test menuDraw-17.2 {AdjustMenuCoords - menu} {pcOnly userInteraction} { .m1 add cascade -label test -menu .m2 menu .m2 .m2 add command -label "Hit ESCAPE to make this menu go away" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [$tearoff postcascade 0] [destroy .m1] [destroy .m2] } {{} {} {}} diff --git a/tests/msgbox.test b/tests/msgbox.test index 78adb81..b37305c 100644 --- a/tests/msgbox.test +++ b/tests/msgbox.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: msgbox.test,v 1.4 2000/04/18 02:18:34 ericm Exp $ +# RCS: @(#) $Id: msgbox.test,v 1.5 2001/08/01 16:21:12 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -72,7 +72,7 @@ test msgbox-1.10 {tk_messageBox command} { list [catch {tk_messageBox -parent foo.bar} msg] $msg } {1 {bad window path name "foo.bar"}} -if {[info commands tkMessageBox] == ""} { +if {[info commands tk::MessageBox] == ""} { set isNative 1 } else { set isNative 0 diff --git a/tests/text.test b/tests/text.test index 5e676dd..94ba999 100644 --- a/tests/text.test +++ b/tests/text.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: text.test,v 1.12 2000/07/25 00:05:40 ericm Exp $ +# RCS: @(#) $Id: text.test,v 1.13 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -964,7 +964,7 @@ test text-20.35 {TextSearchCmd procedure, firstChar and lastChar} { test text-20.36 {TextSearchCmd procedure, regexp finds empty lines} { # Test for fix of bug #1643 .t insert end "\n" - tkTextSetCursor .t 4.0 + tk::TextSetCursor .t 4.0 .t search -forward -regexp {^$} insert end } {4.0} @@ -1362,7 +1362,7 @@ test text-24.1 {bug fix - 1642} { .t insert end "line 3\n" .t insert end "line 4\n" .t insert end "line 5\n" - tkTextSetCursor .t 3.0 + tk::TextSetCursor .t 3.0 .t search -backward -regexp "\$" insert 1.0 } {2.6} diff --git a/tests/unixMenu.test b/tests/unixMenu.test index 30bb07a..fe67be6 100644 --- a/tests/unixMenu.test +++ b/tests/unixMenu.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: unixMenu.test,v 1.4 1999/05/25 20:40:54 stanton Exp $ +# RCS: @(#) $Id: unixMenu.test,v 1.5 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -88,13 +88,13 @@ test unixMenu-8.1 {GetMenuIndicatorGeometry - indicator off} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo -indicatoron 0 - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.2 {GetMenuIndicatorGeometry - not checkbutton or radio} { catch {destroy .m1} menu .m1 .m1 add command -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.3 {GetMenuIndicatorGeometry - checkbutton image} { catch {destroy .m1} @@ -103,21 +103,21 @@ test unixMenu-8.3 {GetMenuIndicatorGeometry - checkbutton image} { image create test image1 .m1 add checkbutton -image image1 -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] [image delete image1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] [image delete image1] } {0 {} {}} test unixMenu-8.4 {GetMenuIndicatorGeometry - checkbutton bitmap} { catch {destroy .m1} menu .m1 .m1 add checkbutton -bitmap questhead -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.5 {GetMenuIndicatorGeometry - checkbutton} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.6 {GetMenuIndicatorGeometry - radiobutton image} { catch {destroy .m1} @@ -126,47 +126,47 @@ test unixMenu-8.6 {GetMenuIndicatorGeometry - radiobutton image} { image create test image1 .m1 add radiobutton -image image1 -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] [image delete image1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] [image delete image1] } {0 {} {}} test unixMenu-8.7 {GetMenuIndicatorGeometry - radiobutton bitmap} { catch {destroy .m1} menu .m1 .m1 add radiobutton -bitmap questhead -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.8 {GetMenuIndicatorGeometry - radiobutton} { catch {destroy .m1} menu .m1 .m1 add radiobutton -label foo .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-8.9 {GetMenuIndicatorGeometry - hideMargin} { catch {destroy .m1} menu .m1 .m1 add radiobutton -label foo -hidemargin 1 .m1 invoke foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-9.1 {GetMenuAccelGeometry - cascade entry} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-9.2 {GetMenuAccelGeometry - non-null label} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+S" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-9.3 {GetMenuAccelGeometry - null label} { catch {destroy .m1} menu .m1 .m1 add command -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-10.1 {DrawMenuEntryBackground - active menubar} { @@ -181,7 +181,7 @@ test unixMenu-10.2 {DrawMenuEntryBackground - active} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] $tearoff activate 0 list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -189,7 +189,7 @@ test unixMenu-10.3 {DrawMenuEntryBackground - non-active} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -205,21 +205,21 @@ test unixMenu-11.2 {DrawMenuEntryAccelerator - cascade entry} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-11.3 {DrawMenuEntryAccelerator - normal entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+U" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-11.4 {DrawMenuEntryAccelerator - null entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -227,21 +227,21 @@ test unixMenu-12.1 {DrawMenuEntryIndicator - non-check or radio} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.2 {DrawMenuEntryIndicator - checkbutton - indicator off} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo -indicatoron 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.3 {DrawMenuEntryIndicator - checkbutton - not selected} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.4 {DrawMenuEntryIndicator - checkbutton - selected} { @@ -249,21 +249,21 @@ test unixMenu-12.4 {DrawMenuEntryIndicator - checkbutton - selected} { menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.5 {DrawMenuEntryIndicator - radiobutton - indicator off} { catch {destroy .m1} menu .m1 .m1 add radiobutton -label foo -indicatoron 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.6 {DrawMenuEntryIndicator - radiobutton - not selected} { catch {destroy .m1} menu .m1 .m1 add radiobutton -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} test unixMenu-12.7 {DrawMenuEntryIndicator - radiobutton - selected} { @@ -271,7 +271,7 @@ test unixMenu-12.7 {DrawMenuEntryIndicator - radiobutton - selected} { menu .m1 .m1 add radiobutton -label foo .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -286,7 +286,7 @@ test unixMenu-13.2 {DrawMenuSepartor - normal menu} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -294,7 +294,7 @@ test unixMenu-14.1 {DrawMenuEntryLabel} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -309,7 +309,7 @@ test unixMenu-15.2 {DrawMenuUnderline - no menubar} { catch {destroy .m1} menu .m1 .m1 add command -label foo -underline 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [catch {update} msg] $msg [destroy .m1] } {0 {} {}} @@ -317,14 +317,14 @@ test unixMenu-16.1 {TkpPostMenu} { catch {destroy .m1} menu .m1 .m1 add command -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-17.1 {GetMenuSeparatorGeometry} { catch {destroy .m1} menu .m1 .m1 add separator - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test unixMenu-18.1 {GetTearoffEntryGeometry} { @@ -334,7 +334,7 @@ test unixMenu-18.1 {GetTearoffEntryGeometry} { .mb.m add command -label test pack .mb raise . - list [catch {tkMbPost .mb} msg] $msg [tkMenuUnpost .mb.m] [destroy .mb] + list [catch {tk::MbPost .mb} msg] $msg [tk::MenuUnpost .mb.m] [destroy .mb] } {0 {} {} {}} # Don't know how to reproduce the case where the tkwin has been deleted. @@ -624,7 +624,7 @@ test unixMenu-23.1 {TkpDrawMenuEntry - gc for active and not strict motif} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -632,7 +632,7 @@ test unixMenu-23.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -641,7 +641,7 @@ test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} { menu .m1 set tk_strictMotif 1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -649,35 +649,35 @@ test unixMenu-23.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custo catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled -background red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.7 {TkpDrawMenuEntry - gc for normal - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -foreground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.8 {TkpDrawMenuEntry - gc for normal} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} { @@ -685,7 +685,7 @@ test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} { menu .m1 .m1 add checkbutton -label foo -selectcolor orange .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} { @@ -693,14 +693,14 @@ test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} { menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.11 {TkpDrawMenuEntry - border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activebackground green - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -708,7 +708,7 @@ test unixMenu-23.12 {TkpDrawMenuEntry - border} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -717,7 +717,7 @@ test unixMenu-23.13 {TkpDrawMenuEntry - active border - strict motif} { set tk_strictMotif 1 menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -725,7 +725,7 @@ test unixMenu-23.14 {TkpDrawMenuEntry - active border - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground yellow - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -733,7 +733,7 @@ test unixMenu-23.15 {TkpDrawMenuEntry - active border} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -741,28 +741,28 @@ test unixMenu-23.16 {TkpDrawMenuEntry - font - custom entry} { catch {destroy .m1} menu .m1 .m1 add command -label foo -font "Helvectica 72" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.17 {TkpDrawMenuEntry - font} { catch {destroy .m1} menu .m1 -font "Courier 72" .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.18 {TkpDrawMenuEntry - separator} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.19 {TkpDrawMenuEntry - standard} { catch {destroy .mb} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.20 {TkpDrawMenuEntry - disabled cascade item} { @@ -772,7 +772,7 @@ test unixMenu-23.20 {TkpDrawMenuEntry - disabled cascade item} { menu .m1.file .m1.file add command -label foo .m1 entryconfigure File -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.21 {TkpDrawMenuEntry - indicator} { @@ -780,7 +780,7 @@ test unixMenu-23.21 {TkpDrawMenuEntry - indicator} { menu .m1 .m1 add checkbutton -label Foo .m1 invoke Foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test unixMenu-23.22 {TkpDrawMenuEntry - hide margin} { @@ -788,7 +788,7 @@ test unixMenu-23.22 {TkpDrawMenuEntry - hide margin} { menu .m1 .m1 add checkbutton -label Foo -hidemargin 1 .m1 invoke Foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -849,8 +849,8 @@ test unixMenu-25.5 {TkpComputeStandardMenuGeometry - tearoff entry} {unixOnly} { menu .mb.m .mb.m add command -label test pack .mb - catch {tkMbPost .mb} - list [update] [tkMenuUnpost .mb.m] [destroy .mb] + catch {tk::MbPost .mb} + list [update] [tk::MenuUnpost .mb.m] [destroy .mb] } {{} {} {}} test unixMenu-25.6 {TkpComputeStandardMenuGeometry - standard label geometry} { catch {destroy .m1} diff --git a/tests/winMenu.test b/tests/winMenu.test index 576646f..fe4d90a 100644 --- a/tests/winMenu.test +++ b/tests/winMenu.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: winMenu.test,v 1.3 1999/04/16 01:51:43 stanton Exp $ +# RCS: @(#) $Id: winMenu.test,v 1.4 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -322,7 +322,7 @@ test winMenu-8.4 {TkpPostMenu - menu button} {pcOnly userInteraction} { menu .mb.menu .mb.menu add command -label "winMenu-8.4 - Hit ESCAPE." pack .mb - list [tkMbPost .mb] [destroy .m1] + list [tk::MbPost .mb] [destroy .m1] } {{} {}} test winMenu-8.5 {TkpPostMenu - update not pending} {pcOnly userInteraction} { catch {destroy .m1} @@ -440,32 +440,32 @@ test winMenu-14.1 {GetMenuIndicatorGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test winMenu-14.2 {GetMenuIndicatorGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo -hidemargin 1 - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test winMenu-15.1 {GetMenuAccelGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo -accel Ctrl+U - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test winMenu-15.2 {GetMenuAccelGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test winMenu-15.3 {GetMenuAccelGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+U" - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} test winMenu-16.1 {GetTearoffEntryGeometry} {pcOnly userInteraction} { @@ -479,7 +479,7 @@ test winMenu-17.1 {GetMenuSeparatorGeometry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add separator - list [catch {tkTearOffMenu .m1 40 40}] [destroy .m1] + list [catch {tk::TearOffMenu .m1 40 40}] [destroy .m1] } {0 {}} # Currently, the only callers to DrawWindowsSystemBitmap want things @@ -489,14 +489,14 @@ test winMenu-18.1 {DrawWindowsSystemBitmap - center aligned} {pcOnly} { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-18.2 {DrawWindowsSystemBitmap - right aligned} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -505,14 +505,14 @@ test winMenu-19.1 {DrawMenuEntryIndicator - not checkbutton or radiobutton} \ catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-19.2 {DrawMenuEntryIndicator - not selected} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add checkbutton -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-19.3 {DrawMenuEntryIndicator - checkbutton} {pcOnly} { @@ -520,7 +520,7 @@ test winMenu-19.3 {DrawMenuEntryIndicator - checkbutton} {pcOnly} { menu .m1 .m1 add checkbutton -label foo .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-19.4 {DrawMenuEntryIndicator - radiobutton} {pcOnly} { @@ -528,7 +528,7 @@ test winMenu-19.4 {DrawMenuEntryIndicator - radiobutton} {pcOnly} { menu .m1 .m1 add radiobutton -label foo .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-19.5 {DrawMenuEntryIndicator - disabled} {pcOnly} { @@ -537,7 +537,7 @@ test winMenu-19.5 {DrawMenuEntryIndicator - disabled} {pcOnly} { .m1 add checkbutton -label foo .m1 invoke foo .m1 entryconfigure foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-19.6 {DrawMenuEntryIndicator - indicator not on} {pcOnly} { @@ -545,7 +545,7 @@ test winMenu-19.6 {DrawMenuEntryIndicator - indicator not on} {pcOnly} { menu .m1 .m1 add checkbutton -label foo -indicatoron 0 .m1 invoke foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -553,14 +553,14 @@ test winMenu-20.1 {DrawMenuEntryAccelerator - disabled} {pcOnly} { catch {destroy .m1} menu .m1 -disabledforeground red .m1 add command -label foo -accel "Ctrl+U" -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-20.2 {DrawMenuEntryAccelerator - normal text} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -accel "Ctrl+U" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-20.3 {DrawMenuEntryAccelerator - disabled, no disabledforeground} \ @@ -568,14 +568,14 @@ test winMenu-20.3 {DrawMenuEntryAccelerator - disabled, no disabledforeground} \ catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -accel "Ctrl+U" -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-20.4 {DrawMenuEntryAccelerator - cascade, drawArrow true} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add cascade -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-20.5 {DrawMenuEntryAccelerator - cascade, drawArrow false} \ @@ -590,7 +590,7 @@ test winMenu-21.1 {DrawMenuSeparator} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -598,7 +598,7 @@ test winMenu-22.1 {DrawMenuUnderline} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -underline 0 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -611,21 +611,21 @@ test winMenu-25.1 {DrawMenuEntryLabel - normal} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-25.2 {DrawMenuEntryLabel - disabled with fg} {pcOnly} { catch {destroy .m1} menu .m1 -disabledforeground red .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-25.3 {DrawMenuEntryLabel - disabled with no fg} {pcOnly} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -662,7 +662,7 @@ test winMenu-29.1 {TkpDrawMenuEntry - gc for active and not strict motif} \ catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -671,7 +671,7 @@ test winMenu-29.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} \ catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -680,7 +680,7 @@ test winMenu-29.3 {TkpDrawMenuEntry - gc for active and strict motif} {pcOnly} { menu .m1 set tk_strictMotif 1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -690,35 +690,35 @@ test winMenu-29.4 \ catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled -background red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} {pcOnly} { catch {destroy .m1} menu .m1 -disabledforeground blue .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} {pcOnly} { catch {destroy .m1} menu .m1 -disabledforeground "" .m1 add command -label foo -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.7 {TkpDrawMenuEntry - gc for normal - custom entry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -foreground red - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.8 {TkpDrawMenuEntry - gc for normal} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.9 {TkpDrawMenuEntry - gc for indicator - custom entry} {pcOnly} { @@ -726,7 +726,7 @@ test winMenu-29.9 {TkpDrawMenuEntry - gc for indicator - custom entry} {pcOnly} menu .m1 .m1 add checkbutton -label foo -selectcolor orange .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.10 {TkpDrawMenuEntry - gc for indicator} {pcOnly} { @@ -734,14 +734,14 @@ test winMenu-29.10 {TkpDrawMenuEntry - gc for indicator} {pcOnly} { menu .m1 .m1 add checkbutton -label foo .m1 invoke 1 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.11 {TkpDrawMenuEntry - border - custom entry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activebackground green - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -749,7 +749,7 @@ test winMenu-29.12 {TkpDrawMenuEntry - border} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -758,7 +758,7 @@ test winMenu-29.13 {TkpDrawMenuEntry - active border - strict motif} {pcOnly} { set tk_strictMotif 1 menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] [set tk_strictMotif 0] } {{} {} 0} @@ -766,7 +766,7 @@ test winMenu-29.14 {TkpDrawMenuEntry - active border - custom entry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -activeforeground yellow - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -774,7 +774,7 @@ test winMenu-29.15 {TkpDrawMenuEntry - active border} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] .m1 entryconfigure 1 -state active list [update] [destroy .m1] } {{} {}} @@ -782,28 +782,28 @@ test winMenu-29.16 {TkpDrawMenuEntry - font - custom entry} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo -font "Helvectica 72" - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.17 {TkpDrawMenuEntry - font} {pcOnly} { catch {destroy .m1} menu .m1 -font "Courier 72" .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.18 {TkpDrawMenuEntry - separator} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add separator - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.19 {TkpDrawMenuEntry - standard} {pcOnly} { catch {destroy .mb} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.20 {TkpDrawMenuEntry - disabled cascade item} {pcOnly} { @@ -813,7 +813,7 @@ test winMenu-29.20 {TkpDrawMenuEntry - disabled cascade item} {pcOnly} { menu .m1.file .m1.file add command -label foo .m1 entryconfigure File -state disabled - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.21 {TkpDrawMenuEntry - indicator} {pcOnly} { @@ -821,7 +821,7 @@ test winMenu-29.21 {TkpDrawMenuEntry - indicator} {pcOnly} { menu .m1 .m1 add checkbutton -label winMenu-31.20 .m1 invoke winMenu-31.20 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-29.22 {TkpDrawMenuEntry - indicator} {pcOnly} { @@ -829,7 +829,7 @@ test winMenu-29.22 {TkpDrawMenuEntry - indicator} {pcOnly} { menu .m1 .m1 add checkbutton -label winMenu-31.21 -hidemargin 1 .m1 invoke winMenu-31.21 - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} @@ -864,14 +864,14 @@ test winMenu-31.1 {DrawMenuEntryBackground} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] list [update] [destroy .m1] } {{} {}} test winMenu-31.2 {DrawMenuEntryBackground} {pcOnly} { catch {destroy .m1} menu .m1 .m1 add command -label foo - set tearoff [tkTearOffMenu .m1 40 40] + set tearoff [tk::TearOffMenu .m1 40 40] $tearoff activate 0 list [update] [destroy .m1] } {{} {}} @@ -906,7 +906,7 @@ test winMenu-32.5 {TkpComputeStandardMenuGeometry - tearoff entry} {unixOnly} { menu .mb.m .mb.m add command -label test pack .mb - catch {tkMbPost .mb} + catch {tk::MbPost .mb} list [update] [destroy .mb] } {{} {}} test winMenu-32.6 {TkpComputeStandardMenuGeometry - standard label geometry} \ diff --git a/tests/xmfbox.test b/tests/xmfbox.test index 52ed35d..8035e44 100644 --- a/tests/xmfbox.test +++ b/tests/xmfbox.test @@ -9,7 +9,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: xmfbox.test,v 1.4 2000/03/24 23:13:19 ericm Exp $ +# RCS: @(#) $Id: xmfbox.test,v 1.5 2001/08/01 16:21:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -59,82 +59,82 @@ proc cleanup {} { catch {destroy .foo} } -test xmfbox-1.1 {tkMotifFDialog_Create, -parent switch} {unixOnly} { +test xmfbox-1.1 {tk::MotifFDialog_Create, -parent switch} {unixOnly} { catch {unset foo} - set x [tkMotifFDialog_Create foo open {-parent .}] + set x [tk::MotifFDialog_Create foo open {-parent .}] catch {destroy $x} set x } .foo -test xmfbox-1.2 {tkMotifFDialog_Create, -parent switch} {unixOnly} { +test xmfbox-1.2 {tk::MotifFDialog_Create, -parent switch} {unixOnly} { catch {unset foo} toplevel .bar wm geometry .bar +0+0 - set x [tkMotifFDialog_Create foo open {-parent .bar}] + set x [tk::MotifFDialog_Create foo open {-parent .bar}] catch {destroy $x} catch {destroy .bar} set x } .bar.foo -test xmfbox-2.1 {tkMotifFDialog_InterpFilter, ~ in dir names} {unixOnly} { +test xmfbox-2.1 {tk::MotifFDialog_InterpFilter, ~ in dir names} {unixOnly} { cleanup file mkdir ./~nosuchuser1 - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 - set kk [tkMotifFDialog_InterpFilter $x] + set kk [tk::MotifFDialog_InterpFilter $x] } [list $testPWD/~nosuchuser1 *] -test xmfbox-2.2 {tkMotifFDialog_InterpFilter, ~ in file names} {unixOnly} { +test xmfbox-2.2 {tk::MotifFDialog_InterpFilter, ~ in file names} {unixOnly} { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 - set kk [tkMotifFDialog_InterpFilter $x] + set kk [tk::MotifFDialog_InterpFilter $x] } [list $testPWD ./~nosuchuser1] -test xmfbox-2.3 {tkMotifFDialog_Update, ~ in file names} {unixOnly} { +test xmfbox-2.3 {tk::MotifFDialog_Update, ~ in file names} {unixOnly} { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] $::tk::dialog::file::foo(fEnt) delete 0 end $::tk::dialog::file::foo(fEnt) insert 0 [pwd]/~nosuchuser1 - tkMotifFDialog_InterpFilter $x - tkMotifFDialog_Update $x + tk::MotifFDialog_InterpFilter $x + tk::MotifFDialog_Update $x $::tk::dialog::file::foo(fList) get end } ~nosuchuser1 -test xmfbox-2.4 {tkMotifFDialog_LoadFile, ~ in file names} {unixOnly} { +test xmfbox-2.4 {tk::MotifFDialog_LoadFile, ~ in file names} {unixOnly} { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] expr {$i >= 0} } 1 -test xmfbox-2.5 {tkMotifFDialog_BrowseFList, ~ in file names} {unixOnly} { +test xmfbox-2.5 {tk::MotifFDialog_BrowseFList, ~ in file names} {unixOnly} { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i - tkMotifFDialog_BrowseFList $x + tk::MotifFDialog_BrowseFList $x $::tk::dialog::file::foo(sEnt) get } $testPWD/~nosuchuser1 -test xmfbox-2.5 {tkMotifFDialog_ActivateFList, ~ in file names} {unixOnly} { +test xmfbox-2.5 {tk::MotifFDialog_ActivateFList, ~ in file names} {unixOnly} { cleanup close [open ./~nosuchuser1 {CREAT TRUNC WRONLY}] - set x [tkMotifFDialog_Create foo open {}] + set x [tk::MotifFDialog_Create foo open {}] set i [lsearch [$::tk::dialog::file::foo(fList) get 0 end] ~nosuchuser1] $::tk::dialog::file::foo(fList) selection clear 0 end $::tk::dialog::file::foo(fList) selection set $i - tkMotifFDialog_BrowseFList $x - tkMotifFDialog_ActivateFList $x + tk::MotifFDialog_BrowseFList $x + tk::MotifFDialog_ActivateFList $x list $::tk::dialog::file::foo(selectPath) \ - $::tk::dialog::file::foo(selectFile) $tkPriv(selectFilePath) + $::tk::dialog::file::foo(selectFile) $tk::Priv(selectFilePath) } [list $testPWD ~nosuchuser1 $testPWD/~nosuchuser1] # cleanup |