From 524044a64a432a3311a010e30e0c0fed1423730b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jul 2005 06:21:30 +0000 Subject: r8636: fixed the ejs ldb test to work with the new ldb.search() syntax, and add it to our test suite so it will be maintained (This used to be commit 42ae50db8108ddc7c33f832d8752f809c99de157) --- testprogs/ejs/ldb.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) mode change 100644 => 100755 testprogs/ejs/ldb.js (limited to 'testprogs/ejs') diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js old mode 100644 new mode 100755 index dee33774b3..819192b51e --- a/testprogs/ejs/ldb.js +++ b/testprogs/ejs/ldb.js @@ -30,17 +30,17 @@ x: 4 "); assert(ok); var attrs = new Array("x"); - res = ldb.search("x=4", attrs); + res = ldb.search("x=4", NULL, ldb.SCOPE_DEFAULT, 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"); + ok = ldb.del("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); + res = ldb.search("x=4", NULL, ldb.SCOPE_DEFAULT, attrs); assert(res[0].dn == "cn=x3,cn=test"); ok = ldb.modify(" @@ -56,15 +56,13 @@ x: 7 } -var sys = sys_init(); +sys_init(ldb); var dbfile = "test.ldb"; -sys.unlink(dbfile); +ldb.unlink(dbfile); var ok = ldb.connect("tdb://" + dbfile); assert(ok); basic_tests(ldb); -sys.unlink(dbfile); - - - +ldb.unlink(dbfile); +return 0; -- cgit