1 #include "tdb2-source.h"
2 #include <ccan/tap/tap.h>
5 #include "tdb1-logging.h"
7 int main(int argc
, char *argv
[])
9 struct tdb1_context
*tdb
;
13 tdb
= tdb1_open_ex(NULL
, 1024, TDB1_INTERNAL
, O_CREAT
|O_TRUNC
|O_RDWR
,
14 0600, &taplogctx
, NULL
);
17 /* Tickle bug on appending zero length buffer to zero length buffer. */
18 key
.dsize
= strlen("hi");
19 key
.dptr
= (void *)"hi";
20 data
.dptr
= (void *)"world";
23 ok1(tdb1_append(tdb
, key
, data
) == 0);
24 ok1(tdb1_append(tdb
, key
, data
) == 0);
25 data
= tdb1_fetch(tdb
, key
);