CsvTokenizer - add additional test case for escaped quotes

It simulates the case where csv fields are fully quoted and an escaped
quote ("") is found in some field. This case is handled correctly,
adding the test to guard this in potential future modifications.
pull/1541/head
Geert Janssens 3 years ago
parent 7fbe42530f
commit b2703d8a02

@ -178,6 +178,7 @@ static tokenize_csv_test_data comma_separated [] = {
{ "Test\\ with backslash,nextfield", 2, { "Test\\ with backslash","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
{ "Test with \\\" escaped quote,nextfield", 2, { "Test with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
{ "Test with \"\" escaped quote,nextfield", 2, { "Test with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
{ "\"Test (quoted) with \"\" escaped quote\",\"nextfield\"", 2, { "Test (quoted) with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
{ "\"Unescaped quote test\",nextfield", 2, { "Unescaped quote test","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
{ NULL, 0, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } },
};

Loading…
Cancel
Save