Unit test for quoted empty string.

Co-authored-by: ldo2 <ldo2.msiu@gmail.com>
This commit is contained in:
Olga Khlopkova 2020-06-18 13:32:18 +03:00 committed by GitHub
parent bc554c36df
commit 367e50799e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,6 +166,15 @@ TEST_CASE("Wrapped quotation marks")
REQUIRE_EQ(res.size(), 1);
CHECK_EQ(res[0], R"(Contains "quotes", commas and text)");
}
TEST_CASE("Read quoted empty values")
{
const auto res = CsvParser::split_record(",\"\"");
REQUIRE_EQ(res.size(), 2);
CHECK_EQ(res[0], "");
CHECK_EQ(res[1], "");
}
TEST_SUITE_END();
TEST_SUITE_BEGIN("Read & write");