diff --git a/tests/data/test-whoami.ldif b/tests/data/test-whoami.ldif
index 8eccecff6051d5657d673a46825006b415812a9b..189b6cad31e02ca370c501b74e3d68a533f6451b 100644
--- a/tests/data/test-whoami.ldif
+++ b/tests/data/test-whoami.ldif
@@ -262,7 +262,6 @@ authzFrom: dn.regex:^cn=Dorothy.*dc=example,dc=com$
 authzFrom: dn.children:ou=Alumni Association,ou=People,dc=example
  ,dc=com
 authzFrom: dn.subtree:ou=Groups,dc=example,dc=com
-authzFrom: ldap:///dc=example,dc=com??sub?uid=fail
 authzTo: dn.exact:cn=Barbara Jensen,ou=Information Technology Division,ou=Peop
  le,dc=example,dc=com
 authzTo: u:melliot
@@ -271,10 +270,8 @@ authzTo: group/groupOfUniqueNames/uniqueMember:cn=ITD Staff,ou=Groups,dc=examp
  le,dc=com
 authzTo: dn.onelevel:ou=Information Technology Division,ou=People,dc=example,dc=com
 authzTo: dn.regex:^cn=Dorothy.*dc=example,dc=com$
-authzTo: dn.children:ou=Alumni Association,ou=People,dc=example,d
- c=com
+authzTo: dn.children:ou=Alumni Association,ou=People,dc=example,dc=com
 authzTo: dn.subtree:ou=Groups,dc=example,dc=com
-authzTo: ldap:///dc=example,dc=com??sub?uid=fail
 
 dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com
 objectclass: OpenLDAPperson
diff --git a/tests/scripts/test014-whoami b/tests/scripts/test014-whoami
index e0339031e2feb7df0ffc09169a620945f6d8a392..050e6c4ebfd48626d8ea6b5d4f3e670d84d154a5 100755
--- a/tests/scripts/test014-whoami
+++ b/tests/scripts/test014-whoami
@@ -227,11 +227,20 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW \
 	-e \!authzid="$AUTHZID"
 
 RC=$?
-if test $RC != 1 ; then
+case $RC in 
+1)
+	;;
+0)
+	echo "ldapwhoami should have failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit -1
+	;;
+*)
 	echo "ldapwhoami failed ($RC)!"
 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
 	exit $RC
-fi
+	;;
+esac
 
 BINDDN="cn=Must Fail,dc=example,dc=com"
 BINDPW=fail
@@ -241,11 +250,20 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW \
 	-e \!authzid="$AUTHZID"
 
 RC=$?
-if test $RC != 1 ; then
+case $RC in 
+1)
+	;;
+0)
+	echo "ldapwhoami should have failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit -1
+	;;
+*)
 	echo "ldapwhoami failed ($RC)!"
 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
 	exit $RC
-fi
+	;;
+esac
 
 # authzTo: bjorn => someone else
 echo "Testing authzTo..."
@@ -370,11 +388,20 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW \
 	-e \!authzid="$AUTHZID"
 
 RC=$?
-if test $RC != 1 ; then
+case $RC in 
+1)
+	;;
+0)
+	echo "ldapwhoami should have failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit -1
+	;;
+*)
 	echo "ldapwhoami failed ($RC)!"
 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
 	exit $RC
-fi
+	;;
+esac
 
 BINDDN="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com"
 BINDPW=bjorn
@@ -384,11 +411,20 @@ $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW \
 	-e \!authzid="$AUTHZID"
 
 RC=$?
-if test $RC != 1 ; then
+case $RC in 
+1)
+	;;
+0)
+	echo "ldapwhoami should have failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit -1
+	;;
+*)
 	echo "ldapwhoami failed ($RC)!"
 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
 	exit $RC
-fi
+	;;
+esac
 
 BINDDN="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com"
 BINDPW=bjorn