1
0
mirror of https://github.com/golang/go synced 2024-11-20 08:04:42 -07:00
go/src/cmd/gofmt/testdata
Robert Griesemer 83601807af gofmt: added testcase for files containing \r\n line endings
(see also issue 3961).

hexdump -c testdata/crlf.input
0000000   /   *  \r  \n  \t   S   o   u   r   c   e       c   o   n   t
0000010   a   i   n   i   n   g       C   R   /   L   F       l   i   n
0000020   e       e   n   d   i   n   g   s   .  \r  \n  \t   T   h   e
0000030       g   o   f   m   t   '   e   d       o   u   t   p   u   t
0000040       m   u   s   t       o   n   l   y       h   a   v   e
0000050   L   F  \r  \n  \t   l   i   n   e       e   n   d   i   n   g
0000060   s   .  \r  \n   *   /  \r  \n   p   a   c   k   a   g   e
0000070   m   a   i   n  \r  \n  \r  \n   f   u   n   c       m   a   i
0000080   n   (   )       {  \r  \n  \t   /   /       l   i   n   e
0000090   c   o   m   m   e   n   t  \r  \n  \t   p   r   i   n   t   l
00000a0   n   (   "   h   e   l   l   o   ,       w   o   r   l   d   !
00000b0   "   )       /   /       a   n   o   t   h   e   r       l   i
00000c0   n   e       c   o   m   m   e   n   t  \r  \n  \t   p   r   i
00000d0   n   t   l   n   (   )  \r  \n   }  \r  \n
00000db

hexdump -c testdata/crlf.golden
0000000   /   *  \n  \t   S   o   u   r   c   e       c   o   n   t   a
0000010   i   n   i   n   g       C   R   /   L   F       l   i   n   e
0000020       e   n   d   i   n   g   s   .  \n  \t   T   h   e       g
0000030   o   f   m   t   '   e   d       o   u   t   p   u   t       m
0000040   u   s   t       o   n   l   y       h   a   v   e       L   F
0000050  \n  \t   l   i   n   e       e   n   d   i   n   g   s   .  \n
0000060   *   /  \n   p   a   c   k   a   g   e       m   a   i   n  \n
0000070  \n   f   u   n   c       m   a   i   n   (   )       {  \n  \t
0000080   /   /       l   i   n   e       c   o   m   m   e   n   t  \n
0000090  \t   p   r   i   n   t   l   n   (   "   h   e   l   l   o   ,
00000a0       w   o   r   l   d   !   "   )       /   /       a   n   o
00000b0   t   h   e   r       l   i   n   e       c   o   m   m   e   n
00000c0   t  \n  \t   p   r   i   n   t   l   n   (   )  \n   }  \n
00000cf

R=rsc
CC=golang-dev
https://golang.org/cl/6526052
2012-09-19 14:14:21 -07:00
..
comments.golden gofmt: fix //line handling 2011-10-14 15:54:45 -04:00
comments.input gofmt: fix //line handling 2011-10-14 15:54:45 -04:00
composites.golden gofmt: handle &T in composite literal simplify 2011-12-02 14:14:04 -05:00
composites.input gofmt: handle &T in composite literal simplify 2011-12-02 14:14:04 -05:00
crlf.golden gofmt: added testcase for files containing \r\n line endings 2012-09-19 14:14:21 -07:00
crlf.input gofmt: added testcase for files containing \r\n line endings 2012-09-19 14:14:21 -07:00
import.golden gofmt, gofix: sort imports 2011-11-02 15:53:57 -04:00
import.input gofmt, gofix: sort imports 2011-11-02 15:53:57 -04:00
old.golden
old.input
rewrite1.golden
rewrite1.input
rewrite2.golden
rewrite2.input
rewrite3.golden gofmt: leave nil nodes of the AST unchanged. 2011-11-11 14:11:30 -08:00
rewrite3.input gofmt: leave nil nodes of the AST unchanged. 2011-11-11 14:11:30 -08:00
rewrite4.golden go/printer: don't lose relevant parentheses when rewriting selector expressions 2012-02-15 12:25:37 -08:00
rewrite4.input go/printer: don't lose relevant parentheses when rewriting selector expressions 2012-02-15 12:25:37 -08:00
rewrite5.golden gofmt: handle comments correctly in rewrites 2012-06-25 13:58:28 -07:00
rewrite5.input gofmt: handle comments correctly in rewrites 2012-06-25 13:58:28 -07:00
stdin1.golden
stdin1.golden.gofmt
stdin1.input
stdin1.input.gofmt
stdin2.golden
stdin2.golden.gofmt
stdin2.input
stdin2.input.gofmt
stdin3.golden
stdin3.golden.gofmt
stdin3.input
stdin3.input.gofmt
stdin4.golden
stdin4.golden.gofmt
stdin4.input
stdin4.input.gofmt