• Robert Griesemer's avatar
    1) Fix a problem with tabwriter.Flush: any pending text not yet · 1b9734b9
    Robert Griesemer authored
       in a cell makes a final cell in that line
       (this showed up as occasionally missing single spaces in
       godoc-formatted declarations that fit on a single line)
    
    2) Cleaned up tabwriter implementation a bit:
       - replaced local unicodeLen() with utf8.RuneCount()
       - instead of having 2 parallel arrays for line widths and sizes,
         have a single array of cells containing a width and size
       - factored code a bit better
       - added more comments
       - added testnames to tabwriter tests
       - added more test cases and fixed a broken test case that
         now works correctly
    
    R=r
    DELTA=279  (133 added, 62 deleted, 84 changed)
    OCL=30509
    CL=30514
    1b9734b9
tabwriter_test.go 6.89 KB