diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-15 11:10:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:23:08 -0500 |
commit | 94d99612b9093ca83da3b6b66f875915eeabb389 (patch) | |
tree | 17aad583cb4a7bfc7f2ee384f680b7264e035120 /swat | |
parent | 2bb9fa28754b8575c5926646c1a6221475d24dcc (diff) | |
download | samba-94d99612b9093ca83da3b6b66f875915eeabb389.tar.gz samba-94d99612b9093ca83da3b6b66f875915eeabb389.tar.bz2 samba-94d99612b9093ca83da3b6b66f875915eeabb389.zip |
r8488: after discussions with simo, moved to a full OO interface, so you don't need to keep
a 'db' variable around. The ldb object knows what it is connected to.
Added a simple ldb testsuite in testprogs/ldb.js
(This used to be commit cf35818648b5b649d0cd25f115a04b7b5b5311aa)
Diffstat (limited to 'swat')
-rw-r--r-- | swat/esptest/ldb.esp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp index 38a0422c50..18427dfecd 100644 --- a/swat/esptest/ldb.esp +++ b/swat/esptest/ldb.esp @@ -8,23 +8,24 @@ var dbfile = lpGet("sam database"); var attrs = new Array("name", "dnsDomain", "objectSid", "dn"); var ldb = ldb_init(); -var db = ldb.connect(dbfile); +var ok = ldb.connect(dbfile); +assert(ok); -res = ldb.search(db, "(objectClass=domain)", attrs); +res = ldb.search("(objectClass=domain)", attrs); multi_table(res, "dn"); %> <h3>An unconstrained search</h3> <% -res = ldb.search(db, "(objectClass=user)"); +res = ldb.search("(objectClass=user)"); multi_table(res, "dn"); %> <h3>A search with bad arguments</h3> <% -res = ldb.search("blah", "foo"); +res = ldb.search("=blah", "foo"); %> all done |