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.
 
 
 
 

15 lines
335 B

#include <assert.h>
#include "stralloc.h"
#include "buffer.h"
main() {
static stralloc sa;
stralloc_copys(&sa,"foo\r\n");
assert(sa.len==5);
assert(stralloc_chomp(&sa)==2);
assert(stralloc_chop(&sa)=='o');
assert(stralloc_chop(&sa)=='o');
assert(stralloc_chop(&sa)=='f');
assert(stralloc_chop(&sa)==-1);
return 0;
}