Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 50278892d15b998914cb11677d91fef433887269
Ticket: 2130388fffffffffffffffffffffffffffffffff
smart truncation of long lines in tcltest output
User & Date: nijtmans on 2008-09-26 15:38:04
Changes

  1. assignee changed to: "nijtmans"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nijtmans"
  10. subsystem changed to: "34. tcltest Package"
  11. title changed to: "smart truncation of long lines in tcltest output"
  12. type changed to: "RFE"