Home | History | Annotate | Line # | Download | only in scripts
      1 #! /bin/sh
      2 ## $OpenLDAP$
      3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
      4 ##
      5 ## Copyright 2016-2024 The OpenLDAP Foundation.
      6 ## All rights reserved.
      7 ##
      8 ## Redistribution and use in source and binary forms, with or without
      9 ## modification, are permitted only as authorized by the OpenLDAP
     10 ## Public License.
     11 ##
     12 ## A copy of this license is available in the file LICENSE in the
     13 ## top-level directory of the distribution or, alternatively, at
     14 ## <http://www.OpenLDAP.org/license.html>.
     15 ##
     16 ## ACKNOWLEDGEMENTS:
     17 ## This module was written in 2016 by Ondej Kuznk for Symas Corp.
     18 
     19 echo "running defines.sh"
     20 . $SRCDIR/scripts/defines.sh
     21 
     22 . ${SCRIPTDIR}/common.sh
     23 
     24 echo "Comparing a regular entry..."
     25 $LDAPCOMPARE -H $URI1 \
     26 	"cn=Mark Elliot,ou=Alumni Association,ou=People,$BASEDN" \
     27 	"cn:Mark Elliot" >> $TESTOUT 2>&1
     28 RC=$?
     29 if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
     30 	echo "ldapcompare failed ($RC)!"
     31 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     32 	exit 1
     33 fi
     34 
     35 echo "Comparing a transformed enum entry..."
     36 $LDAPCOMPARE -H $URI1 \
     37 	"cn=Jane Doe,ou=Alumni Association,ou=People,$BASEDN" \
     38 	"enumerated:jdoe" >> $TESTOUT 2>&1
     39 RC=$?
     40 if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
     41 	echo "ldapcompare failed ($RC)!"
     42 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     43 	exit 1
     44 fi
     45 
     46 echo "Comparing a transformed interval entry..."
     47 $LDAPCOMPARE -H $URI1 "ou=People,$BASEDN" \
     48 	"signed:-19858" >> $TESTOUT 2>&1
     49 RC=$?
     50 if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
     51 	echo "ldapcompare failed ($RC)!"
     52 	test $KILLSERVERS != no && kill -HUP $KILLPIDS
     53 	exit 1
     54 fi
     55 
     56 test $KILLSERVERS != no && kill -HUP $KILLPIDS
     57 
     58 echo ">>>>> Test succeeded"
     59 
     60 test $KILLSERVERS != no && wait
     61 
     62 exit 0
     63