START_MARKER |
|
// gdbm |
cond_begin([[ master()->resolv("Gdbm") ]]) |
|
test_true(programp(Gdbm.gdbm)) |
test_do(destruct(Gdbm.gdbm())) |
|
define([[GDBMTESTS]], |
[[ |
test_do(rm("test.gdbm")) |
test_do(add_constant("GDBMBASE",Gdbm.gdbm("test.gdbm"))) |
test_true(file_stat("test.gdbm")) |
|
GDBMNULLTEST |
test_true(GDBMBASE->store("foo","bar")) |
GDBMNULLTEST |
test_equal(GDBMBASE->fetch("foo"),"bar") |
test_do([[int e |
GDBMNULLTEST |
test_any(int e |
GDBMNULLTEST |
test_true(GDBMBASE->store(sprintf("%'23'100000s","") , sprintf("%'32'100000s",""))) |
test_true(GDBMBASE->fetch(sprintf("%'23'100000s",""))==sprintf("%'32'100000s","")) |
GDBMNULLTEST |
test_equal(GDBMBASE->fetch("foo"),"bar") |
test_any(int e |
test_true(GDBMBASE->fetch(sprintf("%'23'100000s",""))==sprintf("%'32'100000s","")) |
test_any(int e |
|
test_do(GDBMBASE->sync()) |
test_do(GDBMBASE->reorganize()) |
test_do(GDBMBASE->close()) |
]]) |
|
define([[GDBMNULLTEST]],[[ |
test_false(GDBMBASE->fetch("slakjdfasdf")) |
]]) |
|
GDBMTESTS |
|
define([[GDBMNULLTEST]],[[ |
test_false(GDBMBASE->fetch("slakjdfasdf")) |
test_do(GDBMBASE->reorganize()) |
test_do(GDBMBASE->sync()) |
test_do(GDBMBASE->close()) |
test_do(GDBMBASE->create("test.gdbm")) |
]]) |
|
GDBMTESTS |
|
test_do(rm("test.gdbm")) |
test_do(add_constant("GDBMBASE")) |
|
cond_end // Gdbm |
|
END_MARKER |
|
|