From 4df9b5a6e3498743475d2309f75eb42db347f7eb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 Jul 2005 11:27:32 +0000 Subject: r8490: make the ldb tests more portable (This used to be commit 6b20bcbeeb33a2cf6abc7bb251830ad6def9a79e) --- source4/lib/ldb/tests/test-extended.sh | 2 +- source4/lib/ldb/tests/test-generic.sh | 2 +- source4/lib/ldb/tests/test-tdb-features.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/lib/ldb/tests/test-extended.sh b/source4/lib/ldb/tests/test-extended.sh index c3958cf01c..a84e3b78a3 100755 --- a/source4/lib/ldb/tests/test-extended.sh +++ b/source4/lib/ldb/tests/test-extended.sh @@ -38,7 +38,7 @@ EOF checkcount() { count=$1 expression="$2" - n=`bin/ldbsearch "$expression" | grep ^dn | wc -l` + n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" bin/ldbsearch "$expression" diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh index 3ad17fe9d3..cc9f41954f 100755 --- a/source4/lib/ldb/tests/test-generic.sh +++ b/source4/lib/ldb/tests/test-generic.sh @@ -58,7 +58,7 @@ echo "Starting ldbtest indexed" time $VALGRIND ldbtest --num-records 100 --num-searches 500 || exit 1 echo "Testing one level search" -count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep ^dn | wc -l` +count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep '^dn' | wc -l` if [ $count != 3 ]; then echo returned $count records - expected 3 exit 1 diff --git a/source4/lib/ldb/tests/test-tdb-features.sh b/source4/lib/ldb/tests/test-tdb-features.sh index fb68733802..6f1afdcf33 100644 --- a/source4/lib/ldb/tests/test-tdb-features.sh +++ b/source4/lib/ldb/tests/test-tdb-features.sh @@ -7,7 +7,7 @@ mv $LDB_URL $LDB_URL.2 checkcount() { count=$1 expression="$2" - n=`bin/ldbsearch "$expression" | grep ^dn | wc -l` + n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l` if [ $n != $count ]; then echo "Got $n but expected $count for $expression" $VALGRIND bin/ldbsearch "$expression" -- cgit