Skip to content

Commit 9d75356

Browse files
committed
fontchooser.test: relocate proc Click
1 parent d825217 commit 9d75356

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/fontchooser.test

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ namespace import -force ::tk::test::dialog::*
1111
upvar #0 ::tk::test::dialog::testDialog testDialog
1212
set applyFontCmd [list testDialogFont set]
1313

14-
proc Click {button} {
15-
if {$button ni "ok cancel apply"} {
16-
return -code error "invalid button name \"$button\""
17-
}
18-
$::testDialog.$button invoke
19-
}
20-
2114
# -------------------------------------------------------------------------
2215

2316
test fontchooser-1.1 {tk fontchooser: usage} -returnCodes error -body {

tests/testutils.tcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,14 @@ namespace eval ::tk::test::colors {
388388

389389
namespace eval ::tk::test::dialog {
390390

391+
proc Click {button} {
392+
variable testDialog
393+
if {$button ni "ok cancel apply"} {
394+
return -code error "invalid button name \"$button\""
395+
}
396+
$testDialog.$button invoke
397+
}
398+
391399
proc PressButton {btn} {
392400
event generate $btn <Enter>
393401
event generate $btn <Button-1> -x 5 -y 5

0 commit comments

Comments
 (0)