Skip to content

Commit e6e9b67

Browse files
committed
Add tests for split_lines with the empty string as input
1 parent ee5f22a commit e6e9b67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/stringtools_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ TEST_CASE("stringtools_test - split")
5151
std::string("***strange***"),
5252
std::string("string.") };
5353

54+
REQUIRE_EQ(split_lines(false, std::string("")).size(), 0);
55+
REQUIRE_EQ(split_lines(true, std::string("")).size(), 1);
5456
REQUIRE_EQ(split_lines(true, text), textAsLinesWithEmty);
5557
REQUIRE_EQ(split_lines(false, text), textAsLinesWithoutEmpty);
5658
REQUIRE_EQ(split_words(false, text), textAsWords);

0 commit comments

Comments
 (0)