Overview
| Artifact ID: | 4cfdd2b07ffd435fdccd2c3da4fd633cfaf28ff1 |
|---|---|
| Ticket: | 218881ffffffffffffffffffffffffffffffffff
testsuite fixes for Linux/Alpha |
| User & Date: | nobody on 2000-10-26 01:07:08 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 2516 Bug Version: 8.2b2 SubmitDate: '1999-08-10' LastModified: '1999-08-11' Severity: MED Status: Released Submitter: techsupp ChangedBy: hobbs OS: Other OSVersion: RedHat Linux 5.1 on Alpha XL-300 Machine: NA FixedDate: '1999-08-11' FixedInVersion: 8.2 ClosedDate: '2000-10-25' Name: Don Porter Comments: String test fixes for a 64 bit platform suggested by Jeffrey Hobbs. tcltest::PrintError adds whitespace formatting to error messages. That whitespace must be removed before comparison to the expected message in the test suite. I only fixed the test which was failing for me. Apply the same strategy to other tests which compare against a message generated by tcltest::PrintError . ObservedBehavior: $ make test ... ==== string-6.37 string is double, false on int overflow FAILED ==== Contents of test case: list [string is double -fail var 12345678901234567890] $var ---- Result was: 1 0 ---- Result should have been: 0 -1 ==== string-6.37 FAILED ==== string-6.55 string is integer, false on overflow FAILED ==== Contents of test case: list [string is integer -fail var +12345678901234567890] $var ---- Result was: 0 21 ---- Result should have been: 0 -1 ==== string-6.55 FAILED ==== tcltest-8.2 tcltest a.tcl -tmpdir thisdirectoryisafile FAILED ==== Contents of test case: catch {exec $::tcltest::tcltest a.tcl -tmpdir thisdirectoryisafile} msg list [regexp "not a directory" $msg] ---- Result was: 0 ---- Result should have been: 1 ==== tcltest-8.2 FAILED DesiredBehavior: No tests fail Patch: Index: string.test =================================================================== RCS file: /cvsroot/tcl/tests/string.test,v retrieving revision 1.19 diff -c -r1.19 string.test *** string.test 1999/07/09 02:11:56 1.19 --- string.test 1999/08/09 05:36:46 *************** *** 245,250 **** --- 245,257 ---- string compare $i1 $i2 } 0 + proc largest_int {} { + set int 1 + set exp 7; # assume we get at least 8 bits + while {$int > 0} { set int [expr {1 << [incr exp]}] } + return [expr {$int-1}] + } + test string-6.1 {string is, too few args} { list [catch {string is} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str" }} *************** *** 355,361 **** list [string is double -fail var "\n"] $var } {0 0} test string-6.37 {string is double, false on int overflow} { ! list [string is double -fail var 12345678901234567890] $var } {0 -1} test string-6.38 {string is double, false on underflow} { catch {unset var} --- 362,368 ---- list [string is double -fail var "\n"] $var } {0 0} test string-6.37 {string is double, false on int overflow} { ! list [string is double -fail var [largest_int]0] $var } {0 -1} test string-6.38 {string is double, false on underflow} { catch {unset var} *************** *** 416,422 **** list [string is integer -fail var 123abc] $var } {0 3} test string-6.55 {string is integer, false on overflow} { ! list [string is integer -fail var +12345678901234567890] $var } {0 -1} test string-6.56 {string is integer, false} { list [string is integer -fail var [expr double(1)]] $var --- 423,429 ---- list [string is integer -fail var 123abc] $var } {0 3} test string-6.55 {string is integer, false on overflow} { ! list [string is integer -fail var +[largest_int]0] $var } {0 -1} test string-6.56 {string is integer, false} { list [string is integer -fail var [expr double(1)]] $var *************** *** 527,532 **** --- 534,541 ---- test string-6.89 {string is xdigit} { list [string is xdigit -fail var 0123456789\u0061bcdefABCDEFg] $var } {0 22} + + rename largest_int {} test string-7.1 {string last, too few args} { list [catch {string last a} msg] $msg Index: tcltest.test =================================================================== RCS file: /cvsroot/tcl/tests/tcltest.test,v retrieving revision 1.4 diff -c -r1.4 tcltest.test *** tcltest.test 1999/07/30 19:10:47 1.4 --- tcltest.test 1999/08/09 05:36:46 *************** *** 230,235 **** --- 230,236 ---- } {1 {}} test tcltest-8.2 {tcltest a.tcl -tmpdir thisdirectoryisafile} { catch {exec $::tcltest::tcltest a.tcl -tmpdir thisdirectoryisafile} msg + regsub -all "\[ \r\t\n\]+" $msg " " msg list [regexp "not a directory" $msg] } {1} PatchFiles: string.test tcltest.test These were integrated into 8.2b3. -- 08/11/1999 hobbs - foundin changed to: "obsolete: 8.2b2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "testsuite fixes for Linux/Alpha"
- type changed to: "Bug"