Skip to content

Commit 1d91cf7

Browse files
committed
test: add Enum16 test cases
1 parent 6762d98 commit 1d91cf7

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

lib/column/enum_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,23 @@ func TestExtractEnumNamedValues(t *testing.T) {
176176
1: "a'b'c",
177177
},
178178
},
179+
{
180+
name: "Enum16 with escaped quote in multiple values",
181+
chType: `Enum16('a\'b'=1,'c\'d'=2)`,
182+
expectedType: "Enum16",
183+
expectedValues: map[int]string{
184+
1: "a'b",
185+
2: "c'd",
186+
},
187+
},
188+
{
189+
name: "Enum16 with multiple escaped quotes in one value",
190+
chType: `Enum16('a\'b\'c'=1)`,
191+
expectedType: "Enum16",
192+
expectedValues: map[int]string{
193+
1: "a'b'c",
194+
},
195+
},
179196
}
180197
for _, tt := range tests {
181198
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)