tests/test_string.cpp

changeset 697
ebdce4bf262b
parent 684
380bd45bc94a
     1.1 --- a/tests/test_string.cpp	Sat Apr 22 12:29:00 2023 +0200
     1.2 +++ b/tests/test_string.cpp	Sat Apr 22 13:06:18 2023 +0200
     1.3 @@ -273,6 +273,13 @@
     1.4      EXPECT_EQ(cx_strcmp(cx_strcast(t5), CX_STR("561234")), 0);
     1.5      EXPECT_ZERO_TERMINATED(t5);
     1.6      cx_strfree(&t5);
     1.7 +
     1.8 +    // use an initial string
     1.9 +    cxmutstr t6 = cx_strdup(CX_STR("Hello"));
    1.10 +    t6 = cx_strcat_m(t6, 2, CX_STR(", "), CX_STR("World!"));
    1.11 +    EXPECT_EQ(cx_strcmp(cx_strcast(t6), CX_STR("Hello, World!")), 0);
    1.12 +    EXPECT_ZERO_TERMINATED(t6);
    1.13 +    cx_strfree(&t6);
    1.14  }
    1.15  
    1.16  TEST(String, strsplit) {

mercurial