Skip to content

Commit 8981481

Browse files
committed
testutils.tcl: add comment explaining usage of reserved proc "init"
1 parent 27b17c0 commit 8981481

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/testutils.tcl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,19 @@ namespace eval ::tk::test::colors {
499499

500500
namespace eval ::tk::test::dialog {
501501

502+
# init --
503+
#
504+
# This is a reserved proc that is part of the auto-initialization mechanism
505+
# that proc testutils employs when importing utility procs with associated
506+
# namespace variables into the namespace in which a test file is executed.
507+
# See also the explanation at:
508+
#
509+
# INIT PROCS, IMPORTING UTILITY PROCS AND ASSOCIATED NAMESPACE VARIABLES,
510+
# AND AUTO-INITIALIZATION
511+
#
512+
# Test authors should define namespace variables here if they need to be
513+
# imported into a test file namespace. This proc must not be exported.
514+
#
502515
proc init {} {
503516
variable dialogType none
504517
variable testDialog
@@ -890,6 +903,19 @@ namespace eval ::tk::test::select {
890903

891904
namespace eval ::tk::test::text {
892905

906+
# init --
907+
#
908+
# This is a reserved proc that is part of the auto-initialization mechanism
909+
# that proc testutils employs when importing utility procs with associated
910+
# namespace variables into the namespace in which a test file is executed.
911+
# See also the explanation at:
912+
#
913+
# INIT PROCS, IMPORTING UTILITY PROCS AND ASSOCIATED NAMESPACE VARIABLES,
914+
# AND AUTO-INITIALIZATION
915+
#
916+
# Test authors should define namespace variables here if they need to be
917+
# imported into a test file namespace. This proc must not be exported.
918+
#
893919
proc init {} {
894920
variable fixedFont {Courier -12}
895921
variable fixedWidth [font measure $fixedFont m]

0 commit comments

Comments
 (0)