rem: sys.unlink(dbfile); 
add: ldb.unlink(dbfile); return 0; 
context: function basic_tests(ldb){	println("Running basic tests");	ok = ldb.add("dn: cn=x,cn=testobjectClass: foox: 3");	assert(ok);	println("Testing ldb.search");	var res = ldb.search("(objectClass=*)");	assert(res[0].objectClass[0] == "foo");	assert(res[0].dn == "cn=x,cn=test");	assert(res[0].x == 3);	ok = ldb.add("dn: cn=x2,cn=testobjectClass: foox: 4");	assert(ok);	var attrs = new Array("x");	res = ldb.search("x=4", attrs);	assert(res[0].x == 4);	assert(res[0].objectClass == undefined);	assert(res[0].dn == "cn=x2,cn=test");	ok = ldb.delete("cn=x,cn=test");	assert(ok);	ok = ldb.rename("cn=x2,cn=test", "cn=x3,cn=test");	assert(ok);	res = ldb.search("x=4", attrs);	assert(res[0].dn == "cn=x3,cn=test");	ok = ldb.modify("dn: cn=x3,cn=testchangetype: modifyadd: xx: 7");	res = ldb.search("x=7");	assert(res.length == 1);	assert(res[0].x.length == 2);	}var sys = sys_init();var dbfile = "test.ldb";sys.unlink(dbfile);var ok = ldb.connect("tdb://" + dbfile);assert(ok);basic_tests(ldb);sys.unlink(dbfile);
meta: 5771	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5771/524044a64a432a3311a010e30e0c0fed1423730b/ldb.js/clean/testprogs/ejs/ldb.js