From 9a2366a1c76ff74db24db0a69162ad8cd9b0a275 Mon Sep 17 00:00:00 2001 From: Olga Khlopkova Date: Thu, 18 Jun 2020 13:35:16 +0300 Subject: [PATCH] Test for double-quoted text --- tests/unit_tests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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");