--- /dev/null
+dn: c=US
+objectClass: country
+c: US
+
+dn: o=Example,c=US
+objectClass: organization
+o: Example
+o: Example, Inc.
+
+dn: c=UK
+objectClass: country
+c: UK
+
+dn: o=Example,c=UK
+objectClass: organization
+o: Example
+o: Example, Ltd.
+
+dn: c=IT
+objectClass: country
+c: IT
+
+dn: o=Esempio,c=IT
+objectClass: organization
+o: Esempio
+o: Esempio S.p.A.
+o: Example
+
+dn: c=DE
+objectClass: country
+c: DE
+
+dn: o=Beispiel,c=DE
+objectClass: organization
+o: Beispiel
+o: Beispiel GmbH
+o: Example
+
-# geographical naming contexts
-dn: c=US
-objectClass: country
-c: US
-
-dn: o=Example,c=US
-objectClass: organization
-o: Example
-o: Example, Inc.
-
-dn: c=UK
-objectClass: country
-c: UK
-
-dn: o=Example,c=UK
-objectClass: organization
-o: Example
-o: Example, Ltd.
-
-dn: c=IT
-objectClass: country
-c: IT
-
-dn: o=Esempio,c=IT
-objectClass: organization
-o: Esempio
-o: Esempio S.p.A.
-o: Example
+# dc=example,dc=com naming context
+dn: dc=example,dc=com
+objectClass: domain
+objectClass: domainRelatedObject
+dc: example
+associatedDomain: example.com
+
+dn: cn=Geographical Naming Contexts,dc=example,dc=com
+objectClass: groupOfNames
+cn: Geographical Naming Contexts
+member: o=Example,c=US
+member: o=Example,c=UK
+member: o=Esempio,c=IT
-# dc=example,dc=com naming context
-dn: dc=example,dc=com
-objectClass: domain
-objectClass: domainRelatedObject
-dc: example
-associatedDomain: example.com
-
-dn: cn=Geographical Naming Contexts,dc=example,dc=com
-objectClass: groupOfNames
-cn: Geographical Naming Contexts
-member: o=Example,c=US
-member: o=Example,c=UK
-member: o=Esempio,c=IT
+# geographical naming contexts
+dn: c=US
+objectClass: country
+c: US
+
+dn: o=Example,c=US
+objectClass: organization
+o: Example
+o: Example, Inc.
+
+dn: c=UK
+objectClass: country
+c: UK
+
+dn: o=Example,c=UK
+objectClass: organization
+o: Example
+o: Example, Ltd.
+
+dn: c=IT
+objectClass: country
+c: IT
+
+dn: o=Esempio,c=IT
+objectClass: organization
+o: Esempio
+o: Esempio S.p.A.
+o: Example
+
+dn: c=DE
+objectClass: country
+c: DE
+
+dn: o=Beispiel,c=DE
+objectClass: organization
+o: Beispiel
+o: Beispiel GmbH
+o: Example
LDIFUNIQUE=$DATADIR/test-unique.ldif
LDIFLIMITS=$DATADIR/test-limits.ldif
LDIFDN=$DATADIR/test-dn.ldif
-LDIFEMPTYDN2=$DATADIR/test-emptydn1.ldif
-LDIFEMPTYDN1=$DATADIR/test-emptydn2.ldif
+LDIFEMPTYDN1=$DATADIR/test-emptydn1.ldif
+LDIFEMPTYDN2=$DATADIR/test-emptydn2.ldif
MONITOR=""
REFDN="c=US"
BASEDN="dc=example,dc=com"
CERTIFICATETLS=$DATADIR/certificate.tls
CERTIFICATEOUT=$DATADIR/certificate.out
DNOUT=$DATADIR/dn.out
-EMPTYDNOUT=$DATADIR/emptydn.out
+EMPTYDNOUT1=$DATADIR/emptydn.out.slapadd
+EMPTYDNOUT2=$DATADIR/emptydn.out
# Just in case we linked the binaries dynamically
LD_LIBRARY_PATH=`pwd`/../libraries:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIFOUT=$EMPTYDNOUT
+LDIFOUT=$EMPTYDNOUT1
echo "Comparing ldapsearch results against original..."
$CMP $SEARCHOUT $LDIFOUT > $CMPOUT
$LDAPADD -D "$EMPTYDNDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
-f $LDIFEMPTYDN2 > /dev/null 2>&1
+$LDAPMODIFY -D "$EMPTYDNDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \
+ > /dev/null 2>&1 << EOF
+dn: o=Beispiel,c=DE
+changetype: delete
+
+dn: c=DE
+changetype: delete
+EOF
+
echo "Searching database..."
$LDAPSEARCH -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIFOUT=$EMPTYDNOUT
+LDIFOUT=$EMPTYDNOUT2
echo "Comparing ldapsearch results against original..."
$CMP $SEARCHOUT $LDIFOUT > $CMPOUT