1 #include "../common/tdb_private.h"
2 #include "../common/io.c"
3 #include "../common/tdb.c"
4 #include "../common/lock.c"
5 #include "../common/freelist.c"
6 #include "../common/traverse.c"
7 #include "../common/transaction.c"
8 #include "../common/error.c"
9 #include "../common/open.c"
10 #include "../common/check.c"
11 #include "../common/hash.c"
12 #include "tap-interface.h"
16 int main(int argc
, char *argv
[])
18 struct tdb_context
*tdb
;
22 tdb
= tdb_open_ex(NULL
, 1024, TDB_INTERNAL
, O_CREAT
|O_TRUNC
|O_RDWR
,
23 0600, &taplogctx
, NULL
);
26 /* Tickle bug on appending zero length buffer to zero length buffer. */
27 key
.dsize
= strlen("hi");
28 key
.dptr
= (void *)"hi";
29 data
.dptr
= (void *)"world";
32 ok1(tdb_append(tdb
, key
, data
) == 0);
33 ok1(tdb_append(tdb
, key
, data
) == 0);
34 data
= tdb_fetch(tdb
, key
);