From 2cc15b18dbab600939147dfe4c58aa6b8f04586e Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Thu, 8 Mar 2018 14:39:43 -0800 Subject: encoding/csv: disallow quote for use as Comma '"' has special semantic meaning that conflicts with using it as Comma. Change-Id: Ife25ba43ca25dba2ea184c1bb7579a230d376059 Reviewed-on: https://go-review.googlesource.com/99696 Run-TryBot: Joe Tsai Reviewed-by: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/encoding/csv/reader_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/encoding/csv/reader_test.go') diff --git a/src/encoding/csv/reader_test.go b/src/encoding/csv/reader_test.go index 1fc69f9ab8..5121791cb3 100644 --- a/src/encoding/csv/reader_test.go +++ b/src/encoding/csv/reader_test.go @@ -359,6 +359,10 @@ x,,, Error: errInvalidDelim, }, { Name: "BadComma3", + Comma: '"', + Error: errInvalidDelim, + }, { + Name: "BadComma4", Comma: utf8.RuneError, Error: errInvalidDelim, }, { -- cgit v1.3