fix(string_util): Prevent replace_all lock

This commit is contained in:
Michael Carlberg
2016-10-19 01:26:10 +02:00
parent 7e960a3966
commit 37e367eb79
2 changed files with 16 additions and 5 deletions

View File

@ -43,6 +43,8 @@ class test_string : public unit_test {
void test_replace_all() {
CPPUNIT_ASSERT_EQUAL(string{"Foo bxr bxz"}, string_util::replace_all("Foo bar baz", "a", "x"));
CPPUNIT_ASSERT_EQUAL(string{"hoohoohoo"}, string_util::replace_all("hehehe", "he", "hoo"));
CPPUNIT_ASSERT_EQUAL(string{"113113113"}, string_util::replace_all("131313", "3", "13"));
}
void test_squeeze() {