summaryrefslogtreecommitdiff
path: root/src/pkg/tabwriter/tabwriter_test.go
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-68/+96
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike1-1/+1
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
2010-02-25tabwriter: indicate section breaks if Debug flag is setRobert Griesemer1-0/+1
R=rsc CC=golang-dev http://codereview.appspot.com/224057
2009-12-151) Change default gofmt default settings forRobert Griesemer1-41/+41
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-120/+120
R=rsc http://codereview.appspot.com/172041
2009-12-02Add flag -tabindent to gofmt: forces use ofRobert Griesemer1-57/+57
tabs for indentation even if -spaces is set. Changes to gofmt: - added -tabindent flag - don't recompute parser and printer mode repeatedly Changes to go/printer: - provide new printing mode TabIndent Changes to tabwriter: - implement new mode TabIndent to use tabs independent of the actual padding character for leading empty columns - distinguish between minimal cell width and tab width (tabwidth is only used if the output contains tabs, minwidth and padding are always considered) - fixed and added more comments - some additional factoring By default, -tabindent is disabled and the default gofmt behavior is unchanged. By setting -spaces and -tabindent, gofmt will use tabs for indentation but do any other alignment with spaces. This permits a user to change the visible indentation by simply changing the editor's tab width and the code will remain properly aligned without the need to rerun gofmt. R=rsc http://codereview.appspot.com/163068
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-3/+3
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-9/+9
R=rsc, r http://go/go-review/1025029
2009-11-07- avoid division-by-zero crash in tabwriterRobert Griesemer1-6/+6
- correct tabwidth argument for some tabwriter test cases - catch negative tabwidth flag in gofmt w/o crashing R=rsc http://go/go-review/1026022
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-9/+3
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt'ed various stragglersRobert Griesemer1-120/+120
R=rsc http://go/go-review/1022002
2009-11-04gofmt-ify tabwriterRobert Griesemer1-68/+68
R=rsc http://go/go-review/1017042
2009-10-15permit escaped text segments which pass through tabwriterRobert Griesemer1-2/+30
undisturbed and uninterpreted R=rsc DELTA=141 (82 added, 23 deleted, 36 changed) OCL=35747 CL=35769
2009-10-08- debugging supportRobert Griesemer1-0/+81
R=rsc DELTA=110 (98 added, 0 deleted, 12 changed) OCL=35487 CL=35490
2009-10-07support for "hard" and "soft" tabs:Robert Griesemer1-6/+29
- soft-tab separated columns can be discarded if empty and DiscardEmptyColumns is set - hard-tab separated columns are never discarded R=rsc DELTA=63 (42 added, 7 deleted, 14 changed) OCL=35421 CL=35435
2009-10-06add IgnoreEmptyColumns feature to tabwriterRobert Griesemer1-1/+54
R=rsc DELTA=96 (74 added, 2 deleted, 20 changed) OCL=35391 CL=35402
2009-08-12convert non-low-level non-google pkg codeRuss Cox1-12/+11
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-181) Fix a problem with tabwriter.Flush: any pending text not yetRobert Griesemer1-17/+55
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
2009-06-09mv src/lib to src/pkgRob Pike1-0/+380
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102