encoding/csv: test that carriage return is handled in Write

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/46310043
This commit is contained in:
Shawn Smith 2014-01-07 09:32:15 -08:00 committed by Rob Pike
parent 095de8795a
commit 39a396d2ba
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ var writeTests = []struct {
{Input: [][]string{{"abc"}, {"def"}}, Output: "abc\ndef\n"},
{Input: [][]string{{"abc\ndef"}}, Output: "\"abc\ndef\"\n"},
{Input: [][]string{{"abc\ndef"}}, Output: "\"abc\r\ndef\"\r\n", UseCRLF: true},
{Input: [][]string{{"abc\rdef"}}, Output: "\"abcdef\"\r\n", UseCRLF: true},
{Input: [][]string{{"abc\rdef"}}, Output: "\"abc\rdef\"\n", UseCRLF: false},
}
func TestWrite(t *testing.T) {