diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-06-07 04:16:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:57 -0500 |
commit | 9f6884df6a1d3eb11bd1ed030424ea18c786c178 (patch) | |
tree | 459bac8ad8f53faf05ce6c5ca19509a4589cdad6 | |
parent | 2452d41b2292c2f48de99a519e2cb948709daa76 (diff) | |
download | samba-9f6884df6a1d3eb11bd1ed030424ea18c786c178.tar.gz samba-9f6884df6a1d3eb11bd1ed030424ea18c786c178.tar.bz2 samba-9f6884df6a1d3eb11bd1ed030424ea18c786c178.zip |
r16072: Do basic wildcard searching in the ejs LDAP test.
Unfortunetly this didn't find the wildcard bug, but at least it tests
something...
Andrew Bartlett
(This used to be commit f763970caf37a9191abd9c40f297c3f413fe9a56)
-rwxr-xr-x | testprogs/ejs/ldap.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js index fa611733c9..90a69cf1a2 100755 --- a/testprogs/ejs/ldap.js +++ b/testprogs/ejs/ldap.js @@ -219,6 +219,33 @@ objectClass: user assert(res[0].dn == res3[0].dn); + println("Testing ldb.search for (&(cn=ldaptest*computer)(objectCategory=compuTER))"); + var res4 = ldb.search("(&(cn=ldaptest*computer)(objectCategory=compuTER))"); + if (res4.length != 1) { + println("Could not find (&(cn=ldaptest*computer)(objectCategory=compuTER))"); + assert(res4.length == 1); + } + + assert(res[0].dn == res4[0].dn); + + println("Testing ldb.search for (&(cn=ldaptestcomput*)(objectCategory=compuTER))"); + var res5 = ldb.search("(&(cn=ldaptestcomput*)(objectCategory=compuTER))"); + if (res5.length != 1) { + println("Could not find (&(cn=ldaptestcomput*)(objectCategory=compuTER))"); + assert(res5.length == 1); + } + + assert(res[0].dn == res5[0].dn); + + println("Testing ldb.search for (&(cn=*daptestcomputer)(objectCategory=compuTER))"); + var res6 = ldb.search("(&(cn=*daptestcomputer)(objectCategory=compuTER))"); + if (res6.length != 1) { + println("Could not find (&(cn=*daptestcomputer)(objectCategory=compuTER))"); + assert(res6.length == 1); + } + + assert(res[0].dn == res6[0].dn); + ok = ldb.del(res[0].dn); if (!ok) { println(ldb.errstring()); |