42 lines
742 B
C
42 lines
742 B
C
/*
|
|
* Copyright 2022 Oleg Borodin <borodin@unix7.org>
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <fcntl.h>
|
|
|
|
#include <massert.h>
|
|
#include <cstring.h>
|
|
|
|
|
|
void test01(void) {
|
|
|
|
cstring_t str;
|
|
cstring_init(&str);
|
|
cstring_append(&str, "qwerty");
|
|
cstring_append(&str, "123456\n");
|
|
|
|
cstring_append(&str, "qwerty");
|
|
cstring_append(&str, "123456\n");
|
|
|
|
cstring_append(&str, "qwerty");
|
|
cstring_append(&str, "123456\n");
|
|
|
|
cstring_append(&str, "qwerty");
|
|
cstring_append(&str, "123456\n");
|
|
|
|
cstring_append(&str, "qwerty");
|
|
cstring_append(&str, "123456\n");
|
|
|
|
printf("%s\n", cstring_getref(&str));
|
|
|
|
cstring_destroy(&str);
|
|
}
|
|
|
|
int main(void) {
|
|
test01();
|
|
return 0;
|
|
}
|