summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-03-07 04:25:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:21 -0500
commit4362ce99ec3451ce5061a7de04851750c3bd7e23 (patch)
tree5d37892570832e2087affd3b86f9d6a043304d26 /testprogs
parent847102c6ca17f7b7d665863b8caa1d85baef46ad (diff)
downloadsamba-4362ce99ec3451ce5061a7de04851750c3bd7e23.tar.gz
samba-4362ce99ec3451ce5061a7de04851750c3bd7e23.tar.bz2
samba-4362ce99ec3451ce5061a7de04851750c3bd7e23.zip
r21737: Print the error strings in the ejs ldb test.
(This used to be commit fed42cf5a359e8dcbabd82dba5b18058260ddc07)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/ldap.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index 9fab283b70..41442ce1ed 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -198,9 +198,11 @@ objectClass: user
println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=PerSon))");
var res3 = ldb.search("(&(cn=ldaptestuser)(objectCategory=PerSon))");
- if (res3.error != 0 || res3.msgs.length != 1) {
- println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon))");
+ if (res3.error != 0) {
+ println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)): " + res3.errstr);
assert(res3.error == 0);
+ } else if (res3.msgs.length != 1) {
+ println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)): matched " + res3.msgs.length);
assert(res3.msgs.length == 1);
}
@@ -209,9 +211,11 @@ objectClass: user
if (gc_ldb != undefined) {
println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog");
var res3gc = gc_ldb.search("(&(cn=ldaptestuser)(objectCategory=PerSon))");
- if (res3gc.error != 0 || res3gc.msgs.length != 1) {
- println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog");
+ if (res3gc.error != 0) {
+ println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog: " + res3gc.errstr);
assert(res3gc.error == 0);
+ } else if (res3gc.msgs.length != 1) {
+ println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog: matched " + res3gc.msgs.length);
assert(res3gc.msgs.length == 1);
}