diff options
author | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-06-18 13:35:16 +0300 |
---|---|---|
committer | Olga Khlopkova <o.khlopkova@corp.mail.ru> | 2020-06-18 13:35:16 +0300 |
commit | 9a2366a1c76ff74db24db0a69162ad8cd9b0a275 (patch) | |
tree | 8de5df1f79dca959aba60ea79e114bc0a1891576 | |
parent | 714e771fba8e69e17d99936535476747781afdca (diff) |
Test for double-quoted text
-rw-r--r-- | tests/unit_tests.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit_tests.cpp b/tests/unit_tests.cpp index 283c0a7..134f8df 100644 --- a/tests/unit_tests.cpp +++ b/tests/unit_tests.cpp @@ -167,6 +167,12 @@ TEST_CASE("Wrapped quotation marks") CHECK_EQ(res[0], R"(Contains "quotes", commas and text)"); } +TEST_CASE("Double wrapped quotation marks") +{ + const auto res = CsvParser::split_record(R"(""Double quoted text"")"); + REQUIRE_EQ(res.size(), 1); +} + TEST_CASE("Read quoted empty values") { const auto res = CsvParser::split_record(",\"\""); @@ -174,7 +180,6 @@ TEST_CASE("Read quoted empty values") CHECK_EQ(res[0], ""); CHECK_EQ(res[1], ""); } - TEST_SUITE_END(); TEST_SUITE_BEGIN("Read & write"); |