From 0c45a12b6558b3c8fb8105510688f9fb488f7c65 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 5 Feb 2006 21:25:18 +0000 Subject: r13356: test utf8 usernames (This used to be commit 7ddec83a602372765711bff7207657b73922aaea) --- testprogs/ejs/ldap.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'testprogs/ejs') 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) -- cgit