strbuf: added strbuf_avail and strbuf_appendf.
This commit is contained in:
parent
6538fd9369
commit
e67e03aceb
5 changed files with 59 additions and 1 deletions
|
|
@ -39,6 +39,17 @@ void test_setlen() {
|
|||
strbuf_free(&b);
|
||||
}
|
||||
|
||||
void test_appendf() {
|
||||
|
||||
strbuf_t b = STRBUF_INIT;
|
||||
|
||||
strbuf_appendf(&b, "%s %i", "string", 32);
|
||||
|
||||
print_strbuf(&b);
|
||||
|
||||
strbuf_free(&b);
|
||||
}
|
||||
|
||||
void test_release() {
|
||||
|
||||
strbuf_t b = STRBUF_INIT;
|
||||
|
|
@ -216,6 +227,7 @@ void test_free_empty() {
|
|||
|
||||
int main() {
|
||||
|
||||
test_appendf();
|
||||
test_release_empty();
|
||||
test_release();
|
||||
test_setlen();
|
||||
|
|
|
|||
Reference in a new issue