Overview
| Artifact ID: | a840ab258d9746c4852330e6a32efebd002031d4 |
|---|---|
| Ticket: | 2130388fffffffffffffffffffffffffffffffff |
| Date: | 2008-09-26 22:38:04 |
| User: | nijtmans |
| Artifact Attached: | 611317c285697dbc2365493fbdb2e68ea6a59455 |
| Filename: | diff.txt |
| Description: | implementation |
Content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30*** tcltest-2.3.0.tm.orig Mon Aug 18 05:35:28 2008 --- tcltest-2.3.0.tm Fri Sep 26 17:20:08 2008 *************** *** 2126,2131 **** --- 2126,2150 ---- if {$scriptCompare} { puts [outputChannel] "---- Error testing result: $scriptMatch" } else { + if {[string range $actualAnswer 0 7] == [string range $result 0 7]} { + set p 8 + while {[string index $actualAnswer $p] == [string index $result $p]} { + incr p + } + incr p -3 + set actualAnswer "...[string range $actualAnswer $p end]" + set result "...[string range $result $p end]" + } + if {[string range $actualAnswer end-7 end] == [string range $result end-7 end]} { + set p [expr {[string length $actualAnswer]-8}] + set q [expr {[string length $result]-8}] + while {[string index $actualAnswer $p] == [string index $result $q]} { + incr p -1 + incr q -1 + } + set actualAnswer "[string range $actualAnswer 0 [expr {$p+3}]]..." + set result "[string range $result 0 [expr {$q+3}]]..." + } puts [outputChannel] "---- Result was:\n$actualAnswer" puts [outputChannel] "---- Result should have been\ ($match matching):\n$result"