diff options
author | Olga Khlopkova <mesozoic.drones@gmail.com> | 2020-06-18 13:32:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 13:32:18 +0300 |
commit | 367e50799e27a373f244a8d89a989577194ff7a0 (patch) | |
tree | 82e958b9e9b0933f46013d80ced53d1072ca3dd9 | |
parent | bc554c36df8a45e3a85d99df2ee062f6e71e5c37 (diff) |
Unit test for quoted empty string.
Co-authored-by: ldo2 <ldo2.msiu@gmail.com>
-rw-r--r-- | tests/unit_tests.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit_tests.cpp b/tests/unit_tests.cpp index 12d3ee5..283c0a7 100644 --- a/tests/unit_tests.cpp +++ b/tests/unit_tests.cpp @@ -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"); |