diff options
-rwxr-xr-x | testprogs/ejs/ldap.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js index a432c11653..148c3d050f 100755 --- a/testprogs/ejs/ldap.js +++ b/testprogs/ejs/ldap.js @@ -52,6 +52,15 @@ cn: LDAPtestUSER2 assert(ok); } + ok = ldb.add(" +dn: cn=ldaptestutf8user èùéìòà ,cn=users," + base_dn + " +objectClass: user +"); + if (!ok) { + println(ldb.errstring()); + assert(ok); + } + println("Testing ldb.search"); var res = ldb.search("(&(cn=ldaptestuser)(objectClass=user))"); @@ -81,6 +90,21 @@ cn: LDAPtestUSER2 println(ldb.errstring()); assert(ok); } + + println("Testing ldb.search"); + var res = ldb.search("(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))"); + + assert(res[0].dn == "cn=ldaptestutf8user èùéìòà,cn=users," + base_dn); + assert(res[0].cn == "ldaptestutf8user èùéìòà"); + assert(res[0].name == "ldaptestutf8user èùéìòà"); + assert(res[0].objectGUID != undefined); + assert(res[0].whenCreated != undefined); + + ok = ldb.del(res[0].dn); + if (!ok) { + println(ldb.errstring()); + assert(ok); + } } function find_basedn(ldb) |