From 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 19 Jun 2014 09:22:53 +0200 Subject: Imported Upstream version 1.3 --- src/pkg/encoding/csv/reader.go | 6 ------ src/pkg/encoding/csv/writer_test.go | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/pkg/encoding/csv') 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) { -- cgit v1.2.3