Skip to content

Commit

Permalink
Add tests for split_lines with the empty string as input
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed May 10, 2023
1 parent ee5f22a commit e6e9b67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/stringtools_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ TEST_CASE("stringtools_test - split")
std::string("***strange***"),
std::string("string.") };

REQUIRE_EQ(split_lines(false, std::string("")).size(), 0);
REQUIRE_EQ(split_lines(true, std::string("")).size(), 1);
REQUIRE_EQ(split_lines(true, text), textAsLinesWithEmty);
REQUIRE_EQ(split_lines(false, text), textAsLinesWithoutEmpty);
REQUIRE_EQ(split_words(false, text), textAsWords);
Expand Down

0 comments on commit e6e9b67

Please sign in to comment.