]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test027-emptydn
Happy New Year!
[openldap] / tests / scripts / test027-emptydn
index 7257cceca9311cb89df420d9fc0d9e28a040f3ba..3aa815825e2caa948998a0eafc6d08abe2873311 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 2004-2007 The OpenLDAP Foundation.
+## Copyright 2004-2016 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@ fi
 
 echo "Searching database..."
 
-$LDAPSEARCH -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
+$LDAPSEARCH -S "" -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
 
 RC=$?
 if test $RC != 0 ; then
@@ -78,12 +78,12 @@ fi
 kill -HUP $KILLPIDS
 wait
 
-LDIFOUT=$EMPTYDNOUT1
-
 echo "Filtering ldapsearch results..."
-. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+echo "Filtering expected results..."
+$LDIFFILTER < $EMPTYDNOUT1 > $LDIFFLT
 echo "Comparing ldapsearch results against original..."
-$CMP $SEARCHFLT $LDIFOUT > $CMPOUT
+$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
 
 if test $? != 0 ; then
        echo "comparison failed - empty DN write operations did not complete correctly"
@@ -143,7 +143,7 @@ EOF
 
 echo "Searching database..."
 
-$LDAPSEARCH -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
+$LDAPSEARCH -S "" -b "" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1
 
 RC=$?
 if test $RC != 0 ; then
@@ -154,12 +154,12 @@ fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-LDIFOUT=$EMPTYDNOUT2
-
 echo "Filtering ldapsearch results..."
-. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+echo "Filtering expected results..."
+$LDIFFILTER < $EMPTYDNOUT2 > $LDIFFLT
 echo "Comparing ldapsearch results against original..."
-$CMP $SEARCHFLT $LDIFOUT > $CMPOUT
+$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
 
 if test $? != 0 ; then
        echo "comparison failed - empty DN write operations did not complete correctly"