Commit 39a396d2 authored by Shawn Smith's avatar Shawn Smith Committed by Rob Pike

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

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/46310043
parent 095de879
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment