1
0
mirror of https://github.com/golang/go synced 2024-11-22 09:04:42 -07:00

gofmt'ed various stragglers

R=rsc
http://go/go-review/1022002
This commit is contained in:
Robert Griesemer 2009-11-05 18:24:53 -08:00
parent 183edddb9d
commit 7e92eedced
4 changed files with 408 additions and 408 deletions

View File

@ -44,339 +44,339 @@ var tests = []Test{
"hello, world\n",
"goodbye, world\n",
"Index: a\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"+goodbye, world\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"+goodbye, world\n",
},
Test{
"hello, world\n",
"goodbye, world\n",
"diff a/a b/b\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1,1 +1,1 @@\n"
"-hello, world\n"
"+goodbye, world\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1,1 +1,1 @@\n"
"-hello, world\n"
"+goodbye, world\n",
},
Test{
"hello, world",
"goodbye, world\n",
"diff --git a/a b/b\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"\\ No newline at end of file\n"
"+goodbye, world\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"\\ No newline at end of file\n"
"+goodbye, world\n",
},
Test{
"hello, world\n",
"goodbye, world",
"Index: a\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"+goodbye, world\n"
"\\ No newline at end of file\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"+goodbye, world\n"
"\\ No newline at end of file\n",
},
Test{
"hello, world",
"goodbye, world",
"Index: a\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"\\ No newline at end of file\n"
"+goodbye, world\n"
"\\ No newline at end of file\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1 +1 @@\n"
"-hello, world\n"
"\\ No newline at end of file\n"
"+goodbye, world\n"
"\\ No newline at end of file\n",
},
Test{
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\n",
"a\nB\nC\nD\ne\nf\ng\nj\nk\nl\nm\nN\n",
"Index: a\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1,14 +1,12 @@\n"
" a\n"
"-b\n"
"-c\n"
"-d\n"
"+B\n"
"+C\n"
"+D\n"
" e\n"
" f\n"
" g\n"
"-h\n"
"-i\n"
" j\n"
" k\n"
" l\n"
" m\n"
"-n\n"
"+N\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1,14 +1,12 @@\n"
" a\n"
"-b\n"
"-c\n"
"-d\n"
"+B\n"
"+C\n"
"+D\n"
" e\n"
" f\n"
" g\n"
"-h\n"
"-i\n"
" j\n"
" k\n"
" l\n"
" m\n"
"-n\n"
"+N\n",
},
Test{
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"a\nb\nc\ng\nh\ni\nj\nk\nl\nm\nN\nO\np\nq\nr\ns\nt\nu\nv\nw\nd\ne\nf\nx\n",
"Index: a\n"
"--- a/a\n"
"+++ b/b\n"
"@@ -1,9 +1,6 @@\n"
" a\n"
" b\n"
" c\n"
"-d\n"
"-e\n"
"-f\n"
" g\n"
" h\n"
" i\n"
"@@ -11,8 +8,8 @@ j\n"
" k\n"
" l\n"
" m\n"
"-n\n"
"-o\n"
"+N\n"
"+O\n"
" p\n"
" q\n"
" r\n"
"\n"
"@@ -21,6 +18,7 @@ t\n"
" u\n"
" v\n"
" w\n"
"+d\n"
"+e\n"
"+f\n"
" x\n"
"-y\n"
"-z\n",
"--- a/a\n"
"+++ b/b\n"
"@@ -1,9 +1,6 @@\n"
" a\n"
" b\n"
" c\n"
"-d\n"
"-e\n"
"-f\n"
" g\n"
" h\n"
" i\n"
"@@ -11,8 +8,8 @@ j\n"
" k\n"
" l\n"
" m\n"
"-n\n"
"-o\n"
"+N\n"
"+O\n"
" p\n"
" q\n"
" r\n"
"\n"
"@@ -21,6 +18,7 @@ t\n"
" u\n"
" v\n"
" w\n"
"+d\n"
"+e\n"
"+f\n"
" x\n"
"-y\n"
"-z\n",
},
Test{
"a\nb\nc\ng\nh\ni\nj\nk\nl\nm\nN\nO\np\nq\nr\ns\nt\nu\nv\nw\nd\ne\nf\nx\n",
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"Index: a\n"
"--- a/b\n"
"+++ b/a\n"
"@@ -1,6 +1,9 @@\n"
" a\n"
" b\n"
" c\n"
"+d\n"
"+e\n"
"+f\n"
" g\n"
" h\n"
" i\n"
"@@ -8,8 +11,8 @@ j\n"
" k\n"
" l\n"
" m\n"
"-N\n"
"-O\n"
"+n\n"
"+o\n"
" p\n"
" q\n"
" r\n"
"@@ -18,7 +21,6 @@ t\n"
" u\n"
" v\n"
" w\n"
"-d\n"
"-e\n"
"-f\n"
" x\n"
"+y\n"
"+z\n",
"--- a/b\n"
"+++ b/a\n"
"@@ -1,6 +1,9 @@\n"
" a\n"
" b\n"
" c\n"
"+d\n"
"+e\n"
"+f\n"
" g\n"
" h\n"
" i\n"
"@@ -8,8 +11,8 @@ j\n"
" k\n"
" l\n"
" m\n"
"-N\n"
"-O\n"
"+n\n"
"+o\n"
" p\n"
" q\n"
" r\n"
"@@ -18,7 +21,6 @@ t\n"
" u\n"
" v\n"
" w\n"
"-d\n"
"-e\n"
"-f\n"
" x\n"
"+y\n"
"+z\n",
},
Test{
"a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n",
"",
"Index: a\n"
"deleted file mode 100644\n"
"--- a/a\n"
"+++ /dev/null\n"
"@@ -1,26 +0,0 @@\n"
"-a\n"
"-b\n"
"-c\n"
"-d\n"
"-e\n"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f"
"\x1c\x7c\xaf\x54\x22\x87\xc3\xc5\x68\x9b\xe1\xbd\xbc\xc3\xe0\xda"
"\xcc\xe3\x96\xda\xc2\xaf\xbb\x75\x79\x64\x86\x60\x8a\x43\x9e\x07"
"\x9c\xaa\x92\x88\xd4\x30\xb9\x8b\x95\x04\x60\x71\xc7\xbb\x2d\x93"
"\x66\x73\x01\x24\xf3\x63\xbf\xe6\x1d\x38\x15\x56\x98\xc4\x1f\x85"
"\xc3\x60\x39\x3a\x0d\x57\x53\x0c\x29\x3f\xbb\x44\x7e\x56\x56\x9d"
"\x87\xcf\xf6\x88\xe8\x98\x05\x85\xf8\xfe\x44\x21\xfa\x33\xc9\xa4"
"\x22\xbe\x89\x05\x8b\x82\x76\xc9\x7c\xaf\x48\x28\xc4\x86\x15\x89"
"\xb9\x98\xfa\x41\xfc\x3d\x8d\x80\x29\x33\x17\x45\xa5\x7f\x67\x79"
"\x7f\x92\x3b\x2e\x4c\xc1\xd2\x1b\x9e\xcf\xed\x53\x56\xb2\x49\x58"
"\xd8\xe9\x9f\x98\xa3\xfe\x78\xe1\xe8\x74\x71\x04\x1a\x87\xd9\x68"
"\x18\x68\xd0\xae\x7b\xa4\x25\xe3\x06\x03\x7e\x8b\xd3\x50\x1f\xb1"
"\x67\x08\xe3\x93\xf4\x4f\xa1\xfb\x31\xcf\x99\x5a\x43\x9f\x4b\xc4"
"\xaa\x68\x1a\xf9\x8e\x97\x02\x80\x17\xf1\x25\x21\xdf\x94\xbf\x41"
"\x08\x59\x3d\xea\x36\x23\x03\xb5\x62\x4d\xb6\x8f\x9e\xdf\x1f\x03"
"\x7d\x70\xe0\x6f\x46\x08\x96\x79\x72\xb7\xae\x41\x2b\xbd\x2a\x95",
"\x1c\x7c\xaf\x54\x22\x87\xc3\xc5\x68\x9b\xe1\xbd\xbc\xc3\xe0\xda"
"\xcc\xe3\x96\xda\xc2\xaf\xbb\x75\x79\x64\x86\x60\x8a\x43\x9e\x07"
"\x9c\xaa\x92\x88\xd4\x30\xb9\x8b\x95\x04\x60\x71\xc7\xbb\x2d\x93"
"\x66\x73\x01\x24\xf3\x63\xbf\xe6\x1d\x38\x15\x56\x98\xc4\x1f\x85"
"\xc3\x60\x39\x3a\x0d\x57\x53\x0c\x29\x3f\xbb\x44\x7e\x56\x56\x9d"
"\x87\xcf\xf6\x88\xe8\x98\x05\x85\xf8\xfe\x44\x21\xfa\x33\xc9\xa4"
"\x22\xbe\x89\x05\x8b\x82\x76\xc9\x7c\xaf\x48\x28\xc4\x86\x15\x89"
"\xb9\x98\xfa\x41\xfc\x3d\x8d\x80\x29\x33\x17\x45\xa5\x7f\x67\x79"
"\x7f\x92\x3b\x2e\x4c\xc1\xd2\x1b\x9e\xcf\xed\x53\x56\xb2\x49\x58"
"\xd8\xe9\x9f\x98\xa3\xfe\x78\xe1\xe8\x74\x71\x04\x1a\x87\xd9\x68"
"\x18\x68\xd0\xae\x7b\xa4\x25\xe3\x06\x03\x7e\x8b\xd3\x50\x1f\xb1"
"\x67\x08\xe3\x93\xf4\x4f\xa1\xfb\x31\xcf\x99\x5a\x43\x9f\x4b\xc4"
"\xaa\x68\x1a\xf9\x8e\x97\x02\x80\x17\xf1\x25\x21\xdf\x94\xbf\x41"
"\x08\x59\x3d\xea\x36\x23\x03\xb5\x62\x4d\xb6\x8f\x9e\xdf\x1f\x03"
"\x7d\x70\xe0\x6f\x46\x08\x96\x79\x72\xb7\xae\x41\x2b\xbd\x2a\x95",
"\x8e\x5f\xf8\x79\x36\x8d\xbe\x68\xc4\x2c\x78\x8a\x46\x28\x40\x3e"
"\xcf\x3b\xb9\x14\xaf\xfa\x04\x9e\x4b\xa2\x52\x51\x51\xf0\xad\xd3"
"\x03\x1c\x03\x79\x5f\x53\xc7\x1a\xd5\x28\xe2\xd9\x19\x37\xa4\xfa"
"\xdd\xff\xac\xb5\xa9\x42\x4e\x17\xeb\xb4\x0d\x20\x67\x08\x43\x21"
"\x7d\x12\x27\xfa\x96\x7a\x85\xf8\x04\x5f\xf4\xfe\xda\x9f\x66\xf2"
"\xba\x04\x39\x00\xab\x3f\x23\x20\x84\x53\xb4\x88\xb6\xee\xa2\x9e"
"\xc1\xca\xd4\x09\x2a\x27\x89\x2f\xcb\xba\xa6\x41\xb6\xe9\xc5\x08"
"\xff\xf5\x95\x35\xab\xbb\x5c\x62\x96\xe7\x7c\x8f\xf2\x40\x12\xc9"
"\x2d\xfe\xff\x75\x4f\x70\x47\xc9\xcd\x15\x0a\x1c\x23\xe7\x0f\x15"
"\x95\x75\x30\x8f\x6e\x9f\x7e\xa5\x9d\xd1\x65\x1c\x4d\x4e\xf4\x32"
"\x49\x9b\xa1\x30\x44\x62\x6f\xe2\xe6\x69\x09\xf8\x7c\x7c\xbe\x07"
"\xa9\xb6\x14\x7a\x6b\x85\xe4\xbf\x48\xbe\x5b\x3b\x70\xb3\x79\x3b"
"\xc4\x35\x9d\x86\xf1\xfe\x2b\x6f\x80\x74\x50\xf3\x96\x59\x53\x1a"
"\x75\x46\x9d\x57\x72\xb3\xb1\x26\xf5\x81\xcd\x96\x08\xbc\x2b\x10"
"\xdc\x80\xbd\xd0\xdf\x03\x6d\x8d\xec\x30\x2b\x4c\xdb\x4d\x3b\xef"
"\x7d\x3a\x39\xc8\x5a\xc4\xcc\x24\x37\xde\xe2\x95\x2b\x04\x97\xb0",
"\xcf\x3b\xb9\x14\xaf\xfa\x04\x9e\x4b\xa2\x52\x51\x51\xf0\xad\xd3"
"\x03\x1c\x03\x79\x5f\x53\xc7\x1a\xd5\x28\xe2\xd9\x19\x37\xa4\xfa"
"\xdd\xff\xac\xb5\xa9\x42\x4e\x17\xeb\xb4\x0d\x20\x67\x08\x43\x21"
"\x7d\x12\x27\xfa\x96\x7a\x85\xf8\x04\x5f\xf4\xfe\xda\x9f\x66\xf2"
"\xba\x04\x39\x00\xab\x3f\x23\x20\x84\x53\xb4\x88\xb6\xee\xa2\x9e"
"\xc1\xca\xd4\x09\x2a\x27\x89\x2f\xcb\xba\xa6\x41\xb6\xe9\xc5\x08"
"\xff\xf5\x95\x35\xab\xbb\x5c\x62\x96\xe7\x7c\x8f\xf2\x40\x12\xc9"
"\x2d\xfe\xff\x75\x4f\x70\x47\xc9\xcd\x15\x0a\x1c\x23\xe7\x0f\x15"
"\x95\x75\x30\x8f\x6e\x9f\x7e\xa5\x9d\xd1\x65\x1c\x4d\x4e\xf4\x32"
"\x49\x9b\xa1\x30\x44\x62\x6f\xe2\xe6\x69\x09\xf8\x7c\x7c\xbe\x07"
"\xa9\xb6\x14\x7a\x6b\x85\xe4\xbf\x48\xbe\x5b\x3b\x70\xb3\x79\x3b"
"\xc4\x35\x9d\x86\xf1\xfe\x2b\x6f\x80\x74\x50\xf3\x96\x59\x53\x1a"
"\x75\x46\x9d\x57\x72\xb3\xb1\x26\xf5\x81\xcd\x96\x08\xbc\x2b\x10"
"\xdc\x80\xbd\xd0\xdf\x03\x6d\x8d\xec\x30\x2b\x4c\xdb\x4d\x3b\xef"
"\x7d\x3a\x39\xc8\x5a\xc4\xcc\x24\x37\xde\xe2\x95\x2b\x04\x97\xb0",
// From git diff --binary
"Index: a\n"
"index cb34d9b1743b7c410fa750be8a58eb355987110b..0a01764bc1b2fd29da317f72208f462ad342400f 100644\n"
"GIT binary patch\n"
"literal 256\n"
"zcmV+b0ssDvU-)@8jlO8aEO?4WC_p~XJGm6E`UIX!qEb;&@U7DW90Pe@Q^y+BDB{@}\n"
"zH>CRA|E#sCLQWU!v<)C<2ty%#5-0kWdWHA|U-bUkpJwv91UUe!KO-Q7Q?!V-?xLQ-\n"
"z%G3!eCy6i1x~4(4>BR{D^_4ZNyIf+H=X{UyKoZF<{{MAPa7W3_6$%_9=MNQ?buf=^\n"
"zpMIsC(PbP>PV_QKo1rj7VsGN+X$kmze7*;%wiJ46h2+0TzFRwRvw1tjHJyg>{wr^Q\n"
"zbWrn_SyLKyMx9r3v#}=ifz6f(yekmgfW6S)18t4$Fe^;kO*`*>IyuN%#LOf&-r|)j\n"
"G1edVN^?m&S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\x17\xf1\x25\x21\xdf\x94\xbf\x41"
"\x08\x59\x3d\xea\x36\x23\x03\xb5\x62\x4d\xb6\x8f\x9e\xdf\x1f\x03"
"\x7d\x70\xe0\x6f\x46\x08\x96\x79\x72\xb7\xae\x41\x2b\xbd\x2a\x95",
"\x1c\x7c\xaf\x54\x22\x87\xc3\xc5\x68\x9b\xe1\xbd\xbc\xc3\xe0\xda"
"\xcc\xe3\x96\xda\xc2\xaf\xbb\x75\x79\x64\x86\x60\x8a\x43\x9e\x07"
"\x9c\xaa\x92\x88\xd4\x30\xb9\x8b\x95\x04\x60\x71\xc7\xbb\x2d\x93"
"\x66\x73\x01\x24\xf3\x63\xbf\xe6\x1d\x38\x15\x56\x98\xc4\x1f\x85"
"\xc3\x60\x39\x3a\x0d\x57\x53\x0c\x29\x3f\xbb\x44\x7e\x56\x56\x9d"
"\x87\xcf\xf6\x88\xe8\x98\x05\x85\xf8\xfe\x44\x21\xfa\x33\xc9\xa4"
"\x22\xbe\x89\x05\x8b\x82\x76\xc9\x7c\xaf\x48\x28\xc4\x86\x15\x89"
"\xb9\x98\xfa\x41\xfc\x3d\x8d\x80\x29\x33\x17\x45\xa5\x7f\x67\x79"
"\x7f\x92\x3b\x2e\x4c\xc1\xd2\x1b\x9e\xcf\xed\x53\x56\xb2\x49\x58"
"\xd8\xe9\x9f\x98\xa3\xfe\x78\xe1\xe8\x74\x71\x04\x1a\x87\xd9\x68"
"\x18\x68\xd0\xae\x7b\xa4\x25\xe3\x06\x03\x7e\x8b\xd3\x50\x1f\xb1"
"\x67\x08\xe3\x93\xf4\x4f\xa1\xfb\x31\xcf\x99\x5a\x43\x9f\x4b\xc4"
"\xaa\x68\x1a\xf9\x8e\x97\x02\x80\x17\xf1\x25\x21\xdf\x94\xbf\x41"
"\x08\x59\x3d\xea\x36\x23\x03\xb5\x62\x4d\xb6\x8f\x9e\xdf\x1f\x03"
"\x7d\x70\xe0\x6f\x46\x08\x96\x79\x72\xb7\xae\x41\x2b\xbd\x2a\x95",
"\x8e\x5f\xf8\x79\x36\x8d\xbe\x68\xc4\x2c\x78\x8a\x46\x28\x40\x3e"
"\xcf\x3b\xb9\x14\xaf\xfa\x04\x9e\x4b\xa2\x52\x51\x51\xf0\xad\xd3"
"\x03\x1c\x03\x79\x5f\x53\xc7\x1a\xd5\x28\xe2\xd9\x19\x37\xa4\xfa"
"\xdd\xff\xac\xb5\xa9\x42\x4e\x17\xeb\xb4\x0d\x20\x67\x08\x43\x21"
"\x7d\x12\x27\xfa\x96\x7a\x85\xf8\x04\x5f\xf4\xfe\xda\x9f\x66\xf2"
"\xba\x04\x39\x00\xab\x3f\x23\x20\x84\x53\xb4\x88\xb6\xee\xa2\x9e"
"\xc1\xca\xd4\x09\x2a\x27\x89\x2f\xcb\xba\xa6\x41\xb6\xe9\xc5\x08"
"\xff\xf5\x95\x35\xab\xbb\x5c\x62\x96\xe7\x7c\x8f\xf2\x40\x12\xc9"
"\x2d\xfe\xff\x75\x4f\x70\x47\xc9\xcd\x15\x0a\x1c\x23\xe7\x0f\x15"
"\x95\x75\x30\x8f\x6e\x9f\x7e\xa5\x9d\xd1\x65\x1c\x4d\x4e\xf4\x32"
"\x49\x9b\xa1\x30\x44\x62\x6f\xe2\xe6\x69\x09\xf8\x7c\x7c\xbe\x07"
"\xa9\xb6\x14\x7a\x6b\x85\xe4\xbf\x48\xbe\x5b\x3b\x70\xb3\x79\x3b"
"\xc4\x35\x9d\x86\xf1\xfe\x2b\x6f\x80\x74\x50\xf3\x96\x59\x53\x1a"
"\x75\x46\x9d\x57\x72\xb3\xb1\x26\xf5\x81\xcd\x96\x08\xbc\x2b\x10"
"\xdc\x80\xbd\xd0\xdf\x03\x6d\x8d\xec\x30\x2b\x4c\xdb\x4d\x3b\xef"
"\x7d\x3a\x39\xc8\x5a\xc4\xcc\x24\x37\xde\xe2\x95\x2b\x04\x97\xb0",
"\xcf\x3b\xb9\x14\xaf\xfa\x04\x9e\x4b\xa2\x52\x51\x51\xf0\xad\xd3"
"\x03\x1c\x03\x79\x5f\x53\xc7\x1a\xd5\x28\xe2\xd9\x19\x37\xa4\xfa"
"\xdd\xff\xac\xb5\xa9\x42\x4e\x17\xeb\xb4\x0d\x20\x67\x08\x43\x21"
"\x7d\x12\x27\xfa\x96\x7a\x85\xf8\x04\x5f\xf4\xfe\xda\x9f\x66\xf2"
"\xba\x04\x39\x00\xab\x3f\x23\x20\x84\x53\xb4\x88\xb6\xee\xa2\x9e"
"\xc1\xca\xd4\x09\x2a\x27\x89\x2f\xcb\xba\xa6\x41\xb6\xe9\xc5\x08"
"\xff\xf5\x95\x35\xab\xbb\x5c\x62\x96\xe7\x7c\x8f\xf2\x40\x12\xc9"
"\x2d\xfe\xff\x75\x4f\x70\x47\xc9\xcd\x15\x0a\x1c\x23\xe7\x0f\x15"
"\x95\x75\x30\x8f\x6e\x9f\x7e\xa5\x9d\xd1\x65\x1c\x4d\x4e\xf4\x32"
"\x49\x9b\xa1\x30\x44\x62\x6f\xe2\xe6\x69\x09\xf8\x7c\x7c\xbe\x07"
"\xa9\xb6\x14\x7a\x6b\x85\xe4\xbf\x48\xbe\x5b\x3b\x70\xb3\x79\x3b"
"\xc4\x35\x9d\x86\xf1\xfe\x2b\x6f\x80\x74\x50\xf3\x96\x59\x53\x1a"
"\x75\x46\x9d\x57\x72\xb3\xb1\x26\xf5\x81\xcd\x96\x08\xbc\x2b\x10"
"\xdc\x80\xbd\xd0\xdf\x03\x6d\x8d\xec\x30\x2b\x4c\xdb\x4d\x3b\xef"
"\x7d\x3a\x39\xc8\x5a\xc4\xcc\x24\x37\xde\xe2\x95\x2b\x04\x97\xb0",
// From hg diff --git
"Index: a\n"
"index cb34d9b1743b7c410fa750be8a58eb355987110b..0a01764bc1b2fd29da317f72208f462ad342400f\n"
"GIT binary patch\n"
"literal 256\n"
"zc$@(M0ssDvU-)@8jlO8aEO?4WC_p~XJGm6E`UIX!qEb;&@U7DW90Pe@Q^y+BDB{@}\n"
"zH>CRA|E#sCLQWU!v<)C<2ty%#5-0kWdWHA|U-bUkpJwv91UUe!KO-Q7Q?!V-?xLQ-\n"
"z%G3!eCy6i1x~4(4>BR{D^_4ZNyIf+H=X{UyKoZF<{{MAPa7W3_6$%_9=MNQ?buf=^\n"
"zpMIsC(PbP>PV_QKo1rj7VsGN+X$kmze7*;%wiJ46h2+0TzFRwRvw1tjHJyg>{wr^Q\n"
"zbWrn_SyLKyMx9r3v#}=ifz6f(yekmgfW6S)18t4$Fe^;kO*`*>IyuN%#LOf&-r|)j\n"
"G1edVN^?m&S\n"
"\n",
"index cb34d9b1743b7c410fa750be8a58eb355987110b..0a01764bc1b2fd29da317f72208f462ad342400f\n"
"GIT binary patch\n"
"literal 256\n"
"zc$@(M0ssDvU-)@8jlO8aEO?4WC_p~XJGm6E`UIX!qEb;&@U7DW90Pe@Q^y+BDB{@}\n"
"zH>CRA|E#sCLQWU!v<)C<2ty%#5-0kWdWHA|U-bUkpJwv91UUe!KO-Q7Q?!V-?xLQ-\n"
"z%G3!eCy6i1x~4(4>BR{D^_4ZNyIf+H=X{UyKoZF<{{MAPa7W3_6$%_9=MNQ?buf=^\n"
"zpMIsC(PbP>PV_QKo1rj7VsGN+X$kmze7*;%wiJ46h2+0TzFRwRvw1tjHJyg>{wr^Q\n"
"zbWrn_SyLKyMx9r3v#}=ifz6f(yekmgfW6S)18t4$Fe^;kO*`*>IyuN%#LOf&-r|)j\n"
"G1edVN^?m&S\n"
"\n",
},
Test{
"",
"",
"Index: hello\n"
"===================================================================\n"
"old mode 100644\n"
"new mode 100755\n",
"===================================================================\n"
"old mode 100644\n"
"new mode 100755\n",
},
}

View File

@ -152,7 +152,7 @@ func walk(path string, d *os.Dir, v Visitor, errors chan<- os.Error) {
}
if !v.VisitDir(path, d) {
return; // skip directory entries
return; // skip directory entries
}
list, err := io.ReadDir(path);
@ -180,7 +180,7 @@ func Walk(root string, v Visitor, errors chan<- os.Error) {
if errors != nil {
errors <- err;
}
return; // can't progress
return; // can't progress
}
walk(root, d, v, errors);
}

View File

@ -17,26 +17,26 @@ import (
// Call represents an active RPC.
type Call struct {
ServiceMethod string; // The name of the service and method to call.
Args interface{}; // The argument to the function (*struct).
Reply interface{}; // The reply from the function (*struct).
Error os.Error; // After completion, the error status.
Done chan *Call; // Strobes when call is complete; value is the error status.
seq uint64;
ServiceMethod string; // The name of the service and method to call.
Args interface{}; // The argument to the function (*struct).
Reply interface{}; // The reply from the function (*struct).
Error os.Error; // After completion, the error status.
Done chan *Call; // Strobes when call is complete; value is the error status.
seq uint64;
}
// Client represents an RPC Client.
// There may be multiple outstanding Calls associated
// with a single Client.
type Client struct {
mutex sync.Mutex; // protects pending, seq
mutex sync.Mutex; // protects pending, seq
shutdown os.Error; // non-nil if the client is shut down
sending sync.Mutex;
seq uint64;
conn io.ReadWriteCloser;
enc *gob.Encoder;
dec *gob.Decoder;
pending map[uint64] *Call;
sending sync.Mutex;
seq uint64;
conn io.ReadWriteCloser;
enc *gob.Encoder;
dec *gob.Decoder;
pending map[uint64]*Call;
}
func (client *Client) send(c *Call) {
@ -75,7 +75,7 @@ func (client *Client) input() {
if err == os.EOF {
err = io.ErrUnexpectedEOF;
}
break
break;
}
seq := response.Seq;
client.mutex.Lock();
@ -106,7 +106,7 @@ func NewClient(conn io.ReadWriteCloser) *Client {
client.conn = conn;
client.enc = gob.NewEncoder(conn);
client.dec = gob.NewDecoder(conn);
client.pending = make(map[uint64] *Call);
client.pending = make(map[uint64]*Call);
go client.input();
return client;
}
@ -115,7 +115,7 @@ func NewClient(conn io.ReadWriteCloser) *Client {
func DialHTTP(network, address string) (*Client, os.Error) {
conn, err := net.Dial(network, "", address);
if err != nil {
return nil, err
return nil, err;
}
io.WriteString(conn, "CONNECT " + rpcPath + " HTTP/1.0\n\n");
@ -136,7 +136,7 @@ func DialHTTP(network, address string) (*Client, os.Error) {
func Dial(network, address string) (*Client, os.Error) {
conn, err := net.Dial(network, "", address);
if err != nil {
return nil, err
return nil, err;
}
return NewClient(conn), nil;
}
@ -170,7 +170,7 @@ func (client *Client) Go(serviceMethod string, args interface{}, reply interface
// Call invokes the named function, waits for it to complete, and returns its error status.
func (client *Client) Call(serviceMethod string, args interface{}, reply interface{}) os.Error {
if client.shutdown != nil {
return client.shutdown
return client.shutdown;
}
call := <-client.Go(serviceMethod, args, reply, nil).Done;
return call.Error;

View File

@ -291,40 +291,40 @@ var tests = []entry{
"9a",
0, 0, '.', 0,
"1\t2\t3\t4\n"
"11\t222\t3333\t44444\n",
"11\t222\t3333\t44444\n",
"1.2..3...4\n"
"11222333344444\n",
"11222333344444\n",
},
entry{
"9b",
0, 0, '.', FilterHTML,
"1\t2<!---\f--->\t3\t4\n" // \f inside HTML is ignored
"11\t222\t3333\t44444\n",
"11\t222\t3333\t44444\n",
"1.2<!---\f--->..3...4\n"
"11222333344444\n",
"11222333344444\n",
},
entry{
"9c",
0, 0, '.', 0,
"1\t2\t3\t4\f" // \f causes a newline and flush
"11\t222\t3333\t44444\n",
"11\t222\t3333\t44444\n",
"1234\n"
"11222333344444\n",
"11222333344444\n",
},
entry{
"9c debug",
0, 0, '.', Debug,
"1\t2\t3\t4\f" // \f causes a newline and flush
"11\t222\t3333\t44444\n",
"11\t222\t3333\t44444\n",
"1|2|3|4\n"
"11|222|3333|44444\n",
"11|222|3333|44444\n",
},
entry{
@ -345,144 +345,144 @@ var tests = []entry{
"11",
8, 1, '.', 0,
"本\tb\tc\n"
"aa\t\u672c\u672c\u672c\tcccc\tddddd\n"
"aaa\tbbbb\n",
"aa\t\u672c\u672c\u672c\tcccc\tddddd\n"
"aaa\tbbbb\n",
"本.......b.......c\n"
"aa......本本本.....cccc....ddddd\n"
"aaa.....bbbb\n",
"aa......本本本.....cccc....ddddd\n"
"aaa.....bbbb\n",
},
entry{
"12a",
8, 1, ' ', AlignRight,
"a\tè\tc\t\n"
"aa\tèèè\tcccc\tddddd\t\n"
"aaa\tèèèè\t\n",
"aa\tèèè\tcccc\tddddd\t\n"
"aaa\tèèèè\t\n",
" a è c\n"
" aa èèè cccc ddddd\n"
" aaa èèèè\n",
" aa èèè cccc ddddd\n"
" aaa èèèè\n",
},
entry{
"12b",
2, 0, ' ', 0,
"a\tb\tc\n"
"aa\tbbb\tcccc\n"
"aaa\tbbbb\n",
"aa\tbbb\tcccc\n"
"aaa\tbbbb\n",
"a b c\n"
"aa bbbcccc\n"
"aaabbbb\n",
"aa bbbcccc\n"
"aaabbbb\n",
},
entry{
"12c",
8, 1, '_', 0,
"a\tb\tc\n"
"aa\tbbb\tcccc\n"
"aaa\tbbbb\n",
"aa\tbbb\tcccc\n"
"aaa\tbbbb\n",
"a_______b_______c\n"
"aa______bbb_____cccc\n"
"aaa_____bbbb\n",
"aa______bbb_____cccc\n"
"aaa_____bbbb\n",
},
entry{
"13a",
4, 1, '-', 0,
"4444\t日本語\t22\t1\t333\n"
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t999999999\t0000000000\n",
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t999999999\t0000000000\n",
"4444------日本語-22--1---333\n"
"999999999-22\n"
"7---------22\n"
"------------------88888888\n"
"\n"
"666666-666666-666666----4444\n"
"1------1------999999999-0000000000\n",
"999999999-22\n"
"7---------22\n"
"------------------88888888\n"
"\n"
"666666-666666-666666----4444\n"
"1------1------999999999-0000000000\n",
},
entry{
"13b",
4, 3, '.', 0,
"4444\t333\t22\t1\t333\n"
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t999999999\t0000000000\n",
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t999999999\t0000000000\n",
"4444........333...22...1...333\n"
"999999999...22\n"
"7...........22\n"
"....................88888888\n"
"\n"
"666666...666666...666666......4444\n"
"1........1........999999999...0000000000\n",
"999999999...22\n"
"7...........22\n"
"....................88888888\n"
"\n"
"666666...666666...666666......4444\n"
"1........1........999999999...0000000000\n",
},
entry{
"13c",
8, 1, '\t', FilterHTML,
"4444\t333\t22\t1\t333\n"
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t<font color=red attr=日本語>999999999</font>\t0000000000\n",
"999999999\t22\n"
"7\t22\n"
"\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t4444\n"
"1\t1\t<font color=red attr=日本語>999999999</font>\t0000000000\n",
"4444\t\t333\t22\t1\t333\n"
"999999999\t22\n"
"7\t\t22\n"
"\t\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t\t4444\n"
"1\t1\t<font color=red attr=日本語>999999999</font>\t0000000000\n",
"999999999\t22\n"
"7\t\t22\n"
"\t\t\t\t88888888\n"
"\n"
"666666\t666666\t666666\t\t4444\n"
"1\t1\t<font color=red attr=日本語>999999999</font>\t0000000000\n",
},
entry{
"14",
0, 2, ' ', AlignRight,
".0\t.3\t2.4\t-5.1\t\n"
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
".0\t0.0\t332.0\t8908.0\t\n"
".0\t-.3\t456.4\t22.1\t\n"
".0\t1.2\t44.4\t-13.3\t\t",
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
".0\t0.0\t332.0\t8908.0\t\n"
".0\t-.3\t456.4\t22.1\t\n"
".0\t1.2\t44.4\t-13.3\t\t",
" .0 .3 2.4 -5.1\n"
" 23.0 12345678.9 2.4 -989.4\n"
" 5.1 12.0 2.4 -7.0\n"
" .0 0.0 332.0 8908.0\n"
" .0 -.3 456.4 22.1\n"
" .0 1.2 44.4 -13.3",
" 23.0 12345678.9 2.4 -989.4\n"
" 5.1 12.0 2.4 -7.0\n"
" .0 0.0 332.0 8908.0\n"
" .0 -.3 456.4 22.1\n"
" .0 1.2 44.4 -13.3",
},
entry{
"14 debug",
0, 2, ' ', AlignRight | Debug,
".0\t.3\t2.4\t-5.1\t\n"
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
".0\t0.0\t332.0\t8908.0\t\n"
".0\t-.3\t456.4\t22.1\t\n"
".0\t1.2\t44.4\t-13.3\t\t",
"23.0\t12345678.9\t2.4\t-989.4\t\n"
"5.1\t12.0\t2.4\t-7.0\t\n"
".0\t0.0\t332.0\t8908.0\t\n"
".0\t-.3\t456.4\t22.1\t\n"
".0\t1.2\t44.4\t-13.3\t\t",
" .0| .3| 2.4| -5.1|\n"
" 23.0| 12345678.9| 2.4| -989.4|\n"
" 5.1| 12.0| 2.4| -7.0|\n"
" .0| 0.0| 332.0| 8908.0|\n"
" .0| -.3| 456.4| 22.1|\n"
" .0| 1.2| 44.4| -13.3|",
" 23.0| 12345678.9| 2.4| -989.4|\n"
" 5.1| 12.0| 2.4| -7.0|\n"
" .0| 0.0| 332.0| 8908.0|\n"
" .0| -.3| 456.4| 22.1|\n"
" .0| 1.2| 44.4| -13.3|",
},
entry{
@ -517,80 +517,80 @@ var tests = []entry{
"16a",
100, 0, '\t', 0,
"a\tb\t\td\n"
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\n"
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
},
entry{
"16b",
100, 0, '\t', DiscardEmptyColumns,
"a\vb\v\vd\n"
"a\vb\v\vd\ve\n"
"a\n"
"a\vb\vc\vd\n"
"a\vb\vc\vd\ve\n",
"a\vb\v\vd\ve\n"
"a\n"
"a\vb\vc\vd\n"
"a\vb\vc\vd\ve\n",
"a\tb\td\n"
"a\tb\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
},
entry{
"16b debug",
100, 0, '\t', DiscardEmptyColumns | Debug,
"a\vb\v\vd\n"
"a\vb\v\vd\ve\n"
"a\n"
"a\vb\vc\vd\n"
"a\vb\vc\vd\ve\n",
"a\vb\v\vd\ve\n"
"a\n"
"a\vb\vc\vd\n"
"a\vb\vc\vd\ve\n",
"a\t|b\t||d\n"
"a\t|b\t||d\t|e\n"
"a\n"
"a\t|b\t|c\t|d\n"
"a\t|b\t|c\t|d\t|e\n",
"a\t|b\t||d\t|e\n"
"a\n"
"a\t|b\t|c\t|d\n"
"a\t|b\t|c\t|d\t|e\n",
},
entry{
"16c",
100, 0, '\t', DiscardEmptyColumns,
"a\tb\t\td\n" // hard tabs - do not discard column
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\n"
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
},
entry{
"16c debug",
100, 0, '\t', DiscardEmptyColumns | Debug,
"a\tb\t\td\n" // hard tabs - do not discard column
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\tb\t\td\te\n"
"a\n"
"a\tb\tc\td\n"
"a\tb\tc\td\te\n",
"a\t|b\t|\t|d\n"
"a\t|b\t|\t|d\t|e\n"
"a\n"
"a\t|b\t|c\t|d\n"
"a\t|b\t|c\t|d\t|e\n",
"a\t|b\t|\t|d\t|e\n"
"a\n"
"a\t|b\t|c\t|d\n"
"a\t|b\t|c\t|d\t|e\n",
},
}