@@ -76,40 +76,40 @@ func TestEscapeGoKeyword(t *testing.T) {
7676
7777func TestFieldsAndTrimSpace (t * testing.T ) {
7878 testCases := []struct {
79- name string
80- input string
79+ name string
80+ input string
8181 delimiter func (r rune ) bool
82- expected []string
82+ expected []string
8383 }{
8484 {
85- name : "Comma-separated values" ,
86- input : "a, b, c" ,
85+ name : "Comma-separated values" ,
86+ input : "a, b, c" ,
8787 delimiter : func (r rune ) bool { return r == ',' },
88- expected : []string {"a" , " b" , " c" },
88+ expected : []string {"a" , " b" , " c" },
8989 },
9090 {
91- name : "Space-separated values" ,
92- input : "a b c" ,
91+ name : "Space-separated values" ,
92+ input : "a b c" ,
9393 delimiter : unicode .IsSpace ,
94- expected : []string {"a" , "b" , "c" },
94+ expected : []string {"a" , "b" , "c" },
9595 },
9696 {
97- name : "Mixed whitespace" ,
98- input : "a\t b\n c" ,
97+ name : "Mixed whitespace" ,
98+ input : "a\t b\n c" ,
9999 delimiter : unicode .IsSpace ,
100- expected : []string {"a" , "b" , "c" },
100+ expected : []string {"a" , "b" , "c" },
101101 },
102102 {
103- name : "Empty input" ,
104- input : "" ,
103+ name : "Empty input" ,
104+ input : "" ,
105105 delimiter : unicode .IsSpace ,
106- expected : []string (nil ),
106+ expected : []string (nil ),
107107 },
108108 {
109- name : "Trailing and leading spaces" ,
110- input : " a , b , c " ,
109+ name : "Trailing and leading spaces" ,
110+ input : " a , b , c " ,
111111 delimiter : func (r rune ) bool { return r == ',' },
112- expected : []string {" a " , " b " , " c " },
112+ expected : []string {" a " , " b " , " c " },
113113 },
114114 }
115115
@@ -120,20 +120,3 @@ func TestFieldsAndTrimSpace(t *testing.T) {
120120 })
121121 }
122122}
123-
124- func TestUnquote (t * testing.T ) {
125- testCases := []struct {
126- input string
127- expected string
128- }{
129- {input : `"hello"` , expected : `hello` },
130- {input : "`world`" , expected : `world` },
131- {input : `"foo'bar"` , expected : `foo'bar` },
132- {input : "" , expected : "" },
133- }
134-
135- for _ , tc := range testCases {
136- result := Unquote (tc .input )
137- assert .Equal (t , tc .expected , result )
138- }
139- }
0 commit comments