diff options
Diffstat (limited to 'src/pkg/encoding/csv')
-rw-r--r-- | src/pkg/encoding/csv/reader.go | 6 | ||||
-rw-r--r-- | src/pkg/encoding/csv/writer_test.go | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/pkg/encoding/csv/reader.go b/src/pkg/encoding/csv/reader.go index b328dcc37..d9432954a 100644 --- a/src/pkg/encoding/csv/reader.go +++ b/src/pkg/encoding/csv/reader.go @@ -193,12 +193,6 @@ func (r *Reader) readRune() (rune, error) { return r1, err } -// unreadRune puts the last rune read from r back. -func (r *Reader) unreadRune() { - r.r.UnreadRune() - r.column-- -} - // skip reads runes up to and including the rune delim or until error. func (r *Reader) skip(delim rune) error { for { diff --git a/src/pkg/encoding/csv/writer_test.go b/src/pkg/encoding/csv/writer_test.go index 03ca6b093..22b740c07 100644 --- a/src/pkg/encoding/csv/writer_test.go +++ b/src/pkg/encoding/csv/writer_test.go @@ -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) { |