Add bxstring support to 'generate' module

This commit is contained in:
Thomas Jensen
2023-05-14 22:17:10 +02:00
parent 232be1cdc4
commit 6cea61c327
12 changed files with 419 additions and 157 deletions

View File

@ -261,4 +261,25 @@ void test_is_ascii_id_strict_invalid(void **state)
}
void test_repeat(void **state)
{
(void) state; /* unused */
char *actual = repeat(NULL, 1);
assert_null(actual);
actual = repeat("x", 0);
assert_string_equal("", actual);
BFREE(actual);
actual = repeat("x", 3);
assert_string_equal("xxx", actual);
BFREE(actual);
actual = repeat("abc", 3);
assert_string_equal("abcabcabc", actual);
BFREE(actual);
}
/* vim: set cindent sw=4: */