|
2002-06-25
| ||
| 04:43 | • Closed ticket [573338ffff]: incomplete compatibility in tcltest 2.1 (TIP 101)</i... artifact: cfa88b2f54 user: dgp | |
|
2002-06-24
| ||
| 21:42 | • New ticket [573338ffff]. artifact: 2cde84d512 user: dgp | |
incomplete compatibility in tcltest 2.1 (TIP 101)
Closed / Wont Fix573338ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-06-24 21:42:08
The changes approved in TIP 101 included a promise
of compatibility. The actual implementation falls just
slightly short of the mark.
It is intended that when any tcltest operation that
could be influenced by configuration from the
command line occurs, then tcltest is auto-configured
from ::argv as it always has been. Users wishing
to use [tcltest::configure] to control their own
configuration need to call it after
[package require tcltest 2.1] and before any other
tcltest commands (all of them are likely to auto-configure,
because they all change behavior based on the
-debug option) or reading any tcltest::* variables
directly.
This in fact does work, but it is set up with variable
traces, which leads to its own problems. Because
traces are disabled while traces are serviced, the
auto-configuration can't completely work when
triggered by access to variables that need further
traces to complete their configuration.
More specifically, if the first tcltest operation following
a [package require tcltest] is a read of any of
the following variables:
tcltest::loadFile
tcltest::outputFile
tcltest::errorFile
either directly, or through the corresponding
commands:
[tcltest::loadFile]
[tcltest::outputFile]
[tcltest::errorFile]
then the auto-configuration from the command
line arguments will not be correct for the
corresponding option, if it appears on the
command line, because these options need
enabled trace to complete their configuration.
For example, if a test file starts:
package require tcltest
puts "writing to [tcltest::outputFile]"
then the "-outfile" option will not work
properly on that test file.
The fix is to insert some other operation
before that one; or to require 2.1, and
call configure yourself.
package require tcltest
set dummy [tcltest::debug]
puts "writing to [tcltest::outputFile]"
OR
package require tcltest 2.1
eval tcltest::configure $argv
puts "writing to [tcltest::outputFile"
Given these workarounds, and the expected
rarity of these very particular test file
configurations, this bug will not be fixed.
Most files will have compatibility serviced
fine, but these rare cases will just have to
deal with it.
dgp Closed ticket [573338ffff].
[History diff]2002-06-25 04:43:05
Log in (anonymous is fine) to add a comment.