]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test026-dn
ITS#7344 Add initial testsuite for slapo-constraint
[openldap] / tests / scripts / test026-dn
index 778655bb0d86aa0dd9650b37d4f40d39a694dca1..88b470c444eb20f19b53f114b67281dec2eb617a 100755 (executable)
@@ -1,7 +1,8 @@
 #! /bin/sh
+# $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 2004-2007 The OpenLDAP Foundation.
+## Copyright 2004-2012 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -117,6 +118,19 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+DN="dc=example,dc=com#'1000'B"
+echo "Searching database for nameAndOptionalUID=\"$DN\"..."
+echo "# Searching database for nameAndOptionalUID=\"$DN\"..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+       "(uniqueMember=$DN)" >> $SEARCHOUT 2>&1
+
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 DN="dc=example,dc=com"
 echo "Searching database for uniqueMember~=\"$DN\" (approx)..."
 echo "# Searching database for uniqueMember~=\"$DN\" (approx)..." >> $SEARCHOUT
@@ -130,7 +144,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-DN="dc=example,dc=com#'001000'B"
+DN="dc=example,dc=com#'1000'B"
 echo "Searching database for uniqueMember~=\"$DN\" (approx)..."
 echo "# Searching database for uniqueMember~=\"$DN\" (approx)..." >> $SEARCHOUT
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -146,9 +160,9 @@ fi
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo "Filtering ldapsearch results..."
-$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original data..."
-$LDIFFILTER < $DNOUT > $LDIFFLT
+$LDIFFILTER < $DNOUT > $LDIFFLT
 echo "Comparing ldapsearch results against original..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT