diff options
Diffstat (limited to 'test/teststr.c')
-rw-r--r-- | test/teststr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/teststr.c b/test/teststr.c index 951a83001..1a1d8fa01 100644 --- a/test/teststr.c +++ b/test/teststr.c @@ -394,6 +394,19 @@ static void skip_prefix(abts_case *tc, void *data) ABTS_STR_EQUAL(tc, apr_cstr_skip_prefix("", "12"), NULL); } +static void pstrcat(abts_case *tc, void *data) +{ + ABTS_STR_EQUAL(tc, apr_pstrcat(p, "a", "bc", "def", NULL), + "abcdef"); + ABTS_STR_EQUAL(tc, apr_pstrcat(p, NULL), ""); + ABTS_STR_EQUAL(tc, apr_pstrcat(p, + "a", "b", "c", "d", "e", + "f", "g", "h", "i", "j", + "1", "2", "3", "4", "5", + NULL), + "abcdefghij12345"); +} + abts_suite *teststr(abts_suite *suite) { suite = ADD_SUITE(suite) @@ -412,6 +425,7 @@ abts_suite *teststr(abts_suite *suite) abts_run_test(suite, string_cpystrn, NULL); abts_run_test(suite, snprintf_overflow, NULL); abts_run_test(suite, skip_prefix, NULL); + abts_run_test(suite, pstrcat, NULL); return suite; } |