OSDN Git Service

Update Go library to last weekly.
[pf3gnuchains/gcc-fork.git] / libgo / go / csv / reader_test.go
index 0068bad..967f96b 100644 (file)
@@ -127,10 +127,9 @@ field"`,
                Output:     [][]string{{`a""b`, `c`}},
        },
        {
-               Name:   "BadDoubleQuotes",
-               Input:  `a""b,c`,
-               Output: [][]string{{`a""b`, `c`}},
-               Error:  `bare " in non-quoted-field`, Line: 1, Column: 1,
+               Name:  "BadDoubleQuotes",
+               Input: `a""b,c`,
+               Error: `bare " in non-quoted-field`, Line: 1, Column: 1,
        },
        {
                Name:             "TrimQuote",
@@ -231,6 +230,23 @@ x,,,
                        {"", "", "", ""},
                },
        },
+       {
+               Name:             "Issue 2366",
+               TrailingComma:    true,
+               TrimLeadingSpace: true,
+               Input:            "a,b,\nc,d,e",
+               Output: [][]string{
+                       {"a", "b", ""},
+                       {"c", "d", "e"},
+               },
+       },
+       {
+               Name:             "Issue 2366a",
+               TrailingComma:    false,
+               TrimLeadingSpace: true,
+               Input:            "a,b,\nc,d,e",
+               Error:            "extra delimiter at end of line",
+       },
 }
 
 func TestRead(t *testing.T) {