summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-02-05 21:25:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:48 -0500
commit0c45a12b6558b3c8fb8105510688f9fb488f7c65 (patch)
tree3b84d3c184be8efcf2dc282e966d9cbb557cbd08 /testprogs/ejs
parent289a5994a9dd8948ca8d652434c5399795a77493 (diff)
downloadsamba-0c45a12b6558b3c8fb8105510688f9fb488f7c65.tar.gz
samba-0c45a12b6558b3c8fb8105510688f9fb488f7c65.tar.bz2
samba-0c45a12b6558b3c8fb8105510688f9fb488f7c65.zip
r13356: test utf8 usernames
(This used to be commit 7ddec83a602372765711bff7207657b73922aaea)
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-xtestprogs/ejs/ldap.js24
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)