Skip to content

Commit

Permalink
testutils.tcl: correct and enhance comments explaining the import and…
Browse files Browse the repository at this point in the history
… auto-initialization mechanism
  • Loading branch information
1minus1is0 committed Feb 11, 2025
1 parent 8981481 commit 297a5a1
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions tests/testutils.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@ namespace eval tk {
# variables from a specific test domain (functional area). It hides
# details/peculiarities from the test writer.
#
# The "import" subcmd invokes any proc "init" defined in the doamin-
# specific namespace. See also the explanation of this mehanism below
# the header for the section "DEFINITIONS OF UTILITY PROCS PER
# FUNCTIONAL AREA" in this file.
# The "import" subcmd invokes any proc "init" defined in the domain-
# specific namespace. See also the explanation of this mehanism in
# this file at:
#
# INIT PROCS, IMPORTING UTILITY PROCS AND ASSOCIATED NAMESPACE VARIABLES,
# AND AUTO-INITIALIZATION
#
# Arguments:
# subCmd : "import" or "forget"
Expand Down Expand Up @@ -314,6 +316,7 @@ namespace import -force tk::test::*
# that foregoes the importing of the namespace variables and their automatic
# re-initialization.
#

namespace eval ::tk::test::button {
proc bogusTrace args {
error "trace aborted"
Expand Down Expand Up @@ -501,10 +504,10 @@ namespace eval ::tk::test::dialog {

# init --
#
# This is a reserved proc that is part of the auto-initialization mechanism
# that proc testutils employs when importing utility procs with associated
# namespace variables into the namespace in which a test file is executed.
# See also the explanation at:
# This is a reserved proc that is part of the mechanism that proc testutils
# employs when importing utility procs and associated namespace variables
# into the namespace in which a test file is executed.
# See also the explanation in this file at:
#
# INIT PROCS, IMPORTING UTILITY PROCS AND ASSOCIATED NAMESPACE VARIABLES,
# AND AUTO-INITIALIZATION
Expand Down Expand Up @@ -905,10 +908,10 @@ namespace eval ::tk::test::text {

# init --
#
# This is a reserved proc that is part of the auto-initialization mechanism
# that proc testutils employs when importing utility procs with associated
# namespace variables into the namespace in which a test file is executed.
# See also the explanation at:
# This is a reserved proc that is part of the mechanism that proc testutils
# employs when importing utility procs and associated namespace variables
# into the namespace in which a test file is executed.
# See also the explanation in this file at:
#
# INIT PROCS, IMPORTING UTILITY PROCS AND ASSOCIATED NAMESPACE VARIABLES,
# AND AUTO-INITIALIZATION
Expand Down

0 comments on commit 297a5a1

Please sign in to comment.