Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Hook redefinition malaise

Closed / Fixed218937ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:12
OriginalBugID: 2839 Bug
Version: 8.2
SubmitDate: '1999-09-20'
LastModified: '1999-09-21'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: jenn
OS: Other
Machine: NA
FixedDate: '1999-09-21'
ClosedDate: '2000-10-25'


Name:

Andreas Kupries


ReproducibleScript:




ObservedBehavior:

The package defines some hook procedures allowing test suites

    to extend the package in certain places, f.e. for the

    definition of new constraints and commandline arguments.


    As constraint definitions and commandline arguments are

    initialized the moment the package is actually loaded we have

    to define our own implementations of these hooks before that,

    or they come too late and are not used. But as the package

    does not check for the existence of the hook procedures it

    will overwrite our definitions during the load with its own

    and empty definitions. Not a good thing.


DesiredBehavior:

Proper usage of the redefined hooks.


Patch:

*** tcltest.tcl.orig Wed Sep 15 19:15:20 1999

--- tcltest.tcl      Wed Sep 15 19:14:36 1999

***************

*** 341,347 ****

      return

  }

  

! proc ::tcltest::initConstraintsHook {} {}


  # ::tcltest::initConstraints --

  #

--- 341,349 ----

      return

  }

  

! if {[namespace inscope ::tcltest info procs initConstraintsHook] == {}} {

!     proc ::tcltest::initConstraintsHook {} {}

! }


  # ::tcltest::initConstraints --

  #

***************

*** 621,627 ****

  #       Hook used for customization of display of usage information.

  #


! proc ::tcltest::PrintUsageInfoHook {} {}


  # ::tcltest::PrintUsageInfo

  #

--- 623,631 ----

  #       Hook used for customization of display of usage information.

  #


! if {[namespace inscope ::tcltest info procs PrintUsageInfoHook] == {}} {

!     proc ::tcltest::PrintUsageInfoHook {} {}

! }


  # ::tcltest::PrintUsageInfo

  #

***************

*** 677,689 ****

      return

  }

  

! # ::tcltest::processCmdLineArgsFlagsHook --

  #

  #This hook is used to add to the list of command line arguments that are

  #       processed by ::tcltest::processCmdLineArgs. 

  #


! proc ::tcltest::processCmdLineArgsAddFlagsHook {} {}


  # ::tcltest::processCmdLineArgsHook --

  #

--- 681,695 ----

      return

  }

  

! # ::tcltest::processCmdLineArgsAddFlagsHook --

  #

  #This hook is used to add to the list of command line arguments that are

  #       processed by ::tcltest::processCmdLineArgs. 

  #


! if {[namespace inscope ::tcltest info procs processCmdLineArgsAddFlagsHook] == {}} {

!     proc ::tcltest::processCmdLineArgsAddFlagsHook {} {}

! }


  # ::tcltest::processCmdLineArgsHook --

  #

***************

*** 694,700 ****

  #flags      The flags that have been pulled out of argv

  #


! proc ::tcltest::processCmdLineArgsHook {flag} {}


  # ::tcltest::processCmdLineArgs --

  #

--- 700,708 ----

  #flags      The flags that have been pulled out of argv

  #


! if {[namespace inscope ::tcltest info procs processCmdLineArgsHook] == {}} {

!     proc ::tcltest::processCmdLineArgsHook {flag} {}

! }


  # ::tcltest::processCmdLineArgs --

  #

***************

*** 1120,1126 ****

  #       additional things that should be done at cleanup.

  #


! proc ::tcltest::cleanupTestsHook {} {}

  

  # test --

  #

--- 1128,1136 ----

  #       additional things that should be done at cleanup.

  #


! if {[namespace inscope ::tcltest info procs cleanupTestsHook] == {}} {

!     proc ::tcltest::cleanupTestsHook {} {}

! }

  

  # test --

  #


PatchFiles:

tcltest.tcl
welch Closed ticket [218937ffff]. [History diff]2000-10-26 08:32:14
Log in (anonymous is fine) to add a comment.