Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
432 B

13 years ago
#include "byte.h"
#include "stralloc.h"
#include "buffer.h"
#include <assert.h>
int main() {
stralloc a;
buffer b;
int i;
for (i=0; i<100; ++i)
buffer_puts(&b,"foo bar baz!\n");
assert(a.len==100*sizeof("foo bar baz!"));
for (i=0; i<100; ++i)
assert(byte_equal(a.s+i*sizeof("foo bar baz!"),sizeof("foo bar baz!"),"foo bar baz!\n"));
return 0;