Skip to content

Commit

Permalink
Test for double-quoted text
Browse files Browse the repository at this point in the history
  • Loading branch information
mesozoic-drones committed Jun 18, 2020
1 parent 714e771 commit 9a2366a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,19 @@ 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(",\"\"");
REQUIRE_EQ(res.size(), 2);
CHECK_EQ(res[0], "");
CHECK_EQ(res[1], "");
}

TEST_SUITE_END();

TEST_SUITE_BEGIN("Read & write");
Expand Down

0 comments on commit 9a2366a

Please sign in to comment.