1#! /bin/sh
2## $OpenLDAP$
3## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4##
5## Copyright 2016-2021 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 Ond��ej Kuzn��k for Symas Corp.
18
19echo "running defines.sh"
20. $SRCDIR/scripts/defines.sh
21
22. ${SCRIPTDIR}/common.sh
23
24echo "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
28RC=$?
29if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
30	echo "ldapcompare failed ($RC)!"
31	test $KILLSERVERS != no && kill -HUP $KILLPIDS
32	exit 1
33fi
34
35echo "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
39RC=$?
40if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
41	echo "ldapcompare failed ($RC)!"
42	test $KILLSERVERS != no && kill -HUP $KILLPIDS
43	exit 1
44fi
45
46echo "Comparing a transformed interval entry..."
47$LDAPCOMPARE -H $URI1 "ou=People,$BASEDN" \
48	"signed:-19858" >> $TESTOUT 2>&1
49RC=$?
50if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
51	echo "ldapcompare failed ($RC)!"
52	test $KILLSERVERS != no && kill -HUP $KILLPIDS
53	exit 1
54fi
55
56test $KILLSERVERS != no && kill -HUP $KILLPIDS
57
58echo ">>>>> Test succeeded"
59
60test $KILLSERVERS != no && wait
61
62exit 0
63