|
2014-02-21
| ||
| 19:11 | • Ticket [2130388fff] smart truncation of long lines in tcltest output status ... artifact: f541318b07 user: jan.nijtmans | |
|
2008-09-28
| ||
| 04:07 | • Ticket [2130388fff]: 4 changes artifact: e695c08be8 user: nijtmans | |
|
2008-09-27
| ||
| 00:44 | • Ticket [2130388fff]: 1 change artifact: b6a62812ae user: dkf | |
|
2008-09-26
| ||
| 22:38 | • Ticket [2130388fff]: 4 changes artifact: 98a7b9883e user: nijtmans | |
| 22:38 | • Add attachment diff.txt to ticket [2130388fff] artifact: a840ab258d user: nijtmans | |
| 15:38 | • New ticket [2130388fff] smart truncation of long lines in tcltest output. artifact: 50278892d1 user: nijtmans | |
smart truncation of long lines in tcltest output
Open2130388fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 13 years ago
Descriptionplain2008-09-26 15:38:04
When tests fail, tcltest outputs something like:
---- Result was:
abc
---- Result should have been (exact matching):
def
==== foo-1.1 FAILED
When the two strings being compared are very
long, this becomes unreadable. junit has the
feature that in this case, the first and last
characters from both strings, as far as they
are equal are stripped and replaced with "..."
This way, you can see quickly which part of
the string is different, and what the difference
is. This feature I would like to see in tcltest
as well.
So, it could look like:
---- Result was:
...foobar ...
---- Result should have been (exact matching):
...fooBar ...
==== foo-1.1 FAILED
Therefore I made the following implementation
(see attached diff.txt file). If minimally
the first 8 characters are equal, the equal
part is replaced by "..." followed by the
last 3 equal characters. The last part of
the string is handled equivalently.
A lot of variations are possible, but I would
like some feedback/review before committing it.
Regards,
Jan Nijtmans
nijtmansplain2008-09-26 22:38:05
File Added - 294995: diff.txt
dkf Ticket [2130388fff]: 1 change
[History diff]2008-09-27 00:44:41
nijtmansplain2008-09-28 04:07:48
Don, thanks for taking this. However, realizing that this patch only works well for exact matching (not glob or regexp), it should be seen as first attempt for this feature. And a clear investigation what exact junit does would be good as well.
jan.nijtmans Ticket [2130388fff]: 1 change
[History diff]2014-02-21 19:11:26
Log in (anonymous is fine) to add a comment.
Attachments:
- diff.txt [download] added by nijtmans on 2008-09-26 22:38:04. [details]