--- a/tests/test_string.cpp Sat Apr 22 12:29:00 2023 +0200 +++ b/tests/test_string.cpp Sat Apr 22 13:06:18 2023 +0200 @@ -273,6 +273,13 @@ EXPECT_EQ(cx_strcmp(cx_strcast(t5), CX_STR("561234")), 0); EXPECT_ZERO_TERMINATED(t5); cx_strfree(&t5); + + // use an initial string + cxmutstr t6 = cx_strdup(CX_STR("Hello")); + t6 = cx_strcat_m(t6, 2, CX_STR(", "), CX_STR("World!")); + EXPECT_EQ(cx_strcmp(cx_strcast(t6), CX_STR("Hello, World!")), 0); + EXPECT_ZERO_TERMINATED(t6); + cx_strfree(&t6); } TEST(String, strsplit) {