summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-20 06:21:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:47 -0500
commit524044a64a432a3311a010e30e0c0fed1423730b (patch)
treef117f65b43faa951313605cf5af44db7c7899dfc /testprogs/ejs
parent240ca36cf2a3ceb89e46b73486865a4a57339c89 (diff)
downloadsamba-524044a64a432a3311a010e30e0c0fed1423730b.tar.gz
samba-524044a64a432a3311a010e30e0c0fed1423730b.tar.bz2
samba-524044a64a432a3311a010e30e0c0fed1423730b.zip
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)
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-x[-rw-r--r--]testprogs/ejs/ldb.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js
index dee33774b3..819192b51e 100644..100755
--- 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;