]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test015-xsearch
more whoami tests
[openldap] / tests / scripts / test015-xsearch
index b1c69597b8115f99890c9769a95ab17665f80716..ec0f9c0a2be572a2d54b7caf3f09454bfce5ae84 100755 (executable)
@@ -1,5 +1,17 @@
 #! /bin/sh
 # $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## Copyright 1998-2004 The OpenLDAP Foundation.
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted only as authorized by the OpenLDAP
+## Public License.
+##
+## A copy of this license is available in the file LICENSE in the
+## top-level directory of the distribution or, alternatively, at
+## <http://www.OpenLDAP.org/license.html>.
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -63,6 +75,16 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+echo "Testing approximate searching..."
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+       '(sn~=jensen)' name >> $SEARCHOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 echo "Testing OR searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
        '(|(givenName=XX*YY*Z)(cn=)(undef=*)(objectclass=groupofnames)(objectclass=groupofuniquenames)(sn:caseExactMatch:=Jones))' >> $SEARCHOUT 2>&1
@@ -103,10 +125,9 @@ if test $RC != 0 ; then
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
        exit $RC
 fi
-
 echo "Testing extended RFC2254 searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
-       '(:dn:caseExactMatch:=University of Michigan)' >> $SEARCHOUT 2>&1
+       '(:dn:caseIgnoreIA5Match:=example)' >> $SEARCHOUT 2>&1
 
 RC=$?
 if test $RC != 0 ; then
@@ -117,8 +138,8 @@ fi
 
 echo "Testing values return filter searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
-       -E '!mv=(o=University of Michigan)' \
-       '(o=University of Michigan)' >> $SEARCHOUT 2>&1
+       -E '!mv=(o=Example, Inc.)' \
+       '(o=Example, Inc.)' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"