Skip to content

Commit

Permalink
Unit test for quoted empty string.
Browse files Browse the repository at this point in the history
Co-authored-by: ldo2 <[email protected]>
  • Loading branch information
mesozoic-drones and ldo2 authored Jun 18, 2020
1 parent bc554c3 commit 367e507
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 367e507

Please sign in to comment.