]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test015-xsearch
ITS#7762
[openldap] / tests / scripts / test015-xsearch
index 01592fb831b98521f91b53c2586e0bb7412f8ca1..13bc313ec8f1cfc863b6e7626a5513242a43b084 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2013 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -156,6 +156,13 @@ echo "#         f=$FILTER ..." >> $SEARCHOUT
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
        "$FILTER" >> $SEARCHOUT 2>&1
 
+# ITS#4380: don't crash when a matchingRule without pretty/validate is used
+FILTER="(:dn:caseIgnoreSubstringsMatch:=Information Technology Division)"
+echo "        f=$FILTER ..."
+echo "#         f=$FILTER ..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+       "$FILTER" >> $SEARCHOUT 2>&1
+
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
@@ -222,10 +229,10 @@ LDIF=$SEARCHOUTMASTER
 LDIF2=$SEARCHOUTX
 
 echo "Filtering ldapsearch results..."
-$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-$LDIFFILTER < $LDIF > $LDIFFLT
-$LDIFFILTER < $LDIF2 >> $LDIFFLT
+$LDIFFILTER < $LDIF > $LDIFFLT
+$LDIFFILTER < $LDIF2 >> $LDIFFLT
 echo "Comparing filter output..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
 
@@ -235,4 +242,7 @@ if test $? != 0 ; then
 fi
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0