|
2000-10-26
| ||
| 08:32 | • Closed ticket [218938ffff]: Tcltest package, string compare => string equal</... artifact: 7d2115c278 user: welch | |
| 01:08 | • New ticket [218938ffff]. artifact: ef24cdf4dc user: nobody | |
Tcltest package, string compare => string equal
Closed / Fixed218938ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:13
OriginalBugID: 2840 Bug
Version: 8.2
SubmitDate: '1999-09-20'
LastModified: '1999-09-21'
Severity: LOW
Status: Released
Submitter: techsupp
ChangedBy: jenn
OS: Other
Machine: NA
FixedDate: '1999-09-21'
ClosedDate: '2000-10-25'
Name:
Andreas Kupries
ReproducibleScript:
Just a slight internal revision of the code, substituting string
compare's with the appropriate string equal's.
Patch:
*** tcltest.tcl.orig5Thu Sep 16 16:11:22 1999
--- tcltest.tclFri Sep 17 19:27:17 1999
***************
*** 510,516 ****
# to the "e" format of floating-point numbers.
set ::tcltest::testConstraints(eformat) 1
! if {[string compare "[format %g 5e-5]" "5e-05"] != 0} {
set ::tcltest::testConstraints(eformat) 0
}
--- 510,516 ----
# to the "e" format of floating-point numbers.
set ::tcltest::testConstraints(eformat) 1
! if {![string equal "[format %g 5e-5]" "5e-05"]} {
set ::tcltest::testConstraints(eformat) 0
}
***************
*** 830,838 ****
if {[info exists flag(-tmpdir)]} {
set ::tcltest::temporaryDirectory $flag(-tmpdir)
! if {[string compare \
[file pathtype $::tcltest::temporaryDirectory] \
! "absolute"] != 0} {
set ::tcltest::temporaryDirectory [file join [pwd] \
$::tcltest::temporaryDirectory]
}
--- 830,838 ----
if {[info exists flag(-tmpdir)]} {
set ::tcltest::temporaryDirectory $flag(-tmpdir)
! if {![string equal \
[file pathtype $::tcltest::temporaryDirectory] \
! "absolute"]} {
set ::tcltest::temporaryDirectory [file join [pwd] \
$::tcltest::temporaryDirectory]
}
***************
*** 872,878 ****
if {[info exists flag(-outfile)]} {
set tmp $flag(-outfile)
! if {[string compare [file pathtype $tmp] "absolute"] != 0} {
set tmp [file join $::tcltest::temporaryDirectory $tmp]
}
set ::tcltest::outputChannel [open $tmp w]
--- 872,878 ----
if {[info exists flag(-outfile)]} {
set tmp $flag(-outfile)
! if {![string equal [file pathtype $tmp] "absolute"]} {
set tmp [file join $::tcltest::temporaryDirectory $tmp]
}
set ::tcltest::outputChannel [open $tmp w]
***************
*** 880,886 ****
if {[info exists flag(-errfile)]} {
set tmp $flag(-errfile)
! if {[string compare [file pathtype $tmp] "absolute"] != 0} {
set tmp [file join $::tcltest::temporaryDirectory $tmp]
}
set ::tcltest::errorChannel [open $tmp w]
--- 880,886 ----
if {[info exists flag(-errfile)]} {
set tmp $flag(-errfile)
! if {![string equal [file pathtype $tmp] "absolute"]} {
set tmp [file join $::tcltest::temporaryDirectory $tmp]
}
set ::tcltest::errorChannel [open $tmp w]
***************
*** 1266,1272 ****
}
set code [catch {uplevel $script} actualAnswer]
! if {([string compare $actualAnswer $expectedAnswer] == 0) && ($code == 0)} {
incr ::tcltest::numTests(Passed)
if {[string first p $::tcltest::verbose] != -1} {
puts $::tcltest::outputChannel "++++ $name PASSED"
--- 1266,1272 ----
}
set code [catch {uplevel $script} actualAnswer]
! if {([string equal $actualAnswer $expectedAnswer]) && ($code == 0)} {
incr ::tcltest::numTests(Passed)
if {[string first p $::tcltest::verbose] != -1} {
puts $::tcltest::outputChannel "++++ $name PASSED"
PatchFiles:
tcltest.tcl
welch Closed ticket [218938ffff].
[History diff]2000-10-26 08:32:14
Log in (anonymous is fine) to add a comment.