From: Matthias Dieter Wallnöfer Date: Tue, 4 Sep 2012 16:27:48 +0000 (+0200) Subject: LDB:test-generic.sh - fix smaller/greater comparison tests X-Git-Tag: talloc-2.1.11~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e72a8793ae22d089b9e300d7f1da735391e39f3d;p=thirdparty%2Fsamba.git LDB:test-generic.sh - fix smaller/greater comparison tests The comparison result has been ignored, which is not good. Also remove the "ldbsearch" command in the error branch which has not much sense. The scripts needs to be run through test-tdb.sh, test-ldap.sh or test-sqlite3.sh which I didn't realise before. Hence less changes are needed and this is a reduced version of the patch published on the mailing list. Signed-off-by: Matthias Dieter Wallnöfer Reviewed-by: Andrew Bartlett Autobuild-User(master): Matthias Dieter Wallnöfer Autobuild-Date(master): Tue Dec 19 03:09:12 CET 2017 on sn-devel-144 --- diff --git a/lib/ldb/tests/test-generic.sh b/lib/ldb/tests/test-generic.sh index e1f8e79e216..8177da5aceb 100755 --- a/lib/ldb/tests/test-generic.sh +++ b/lib/ldb/tests/test-generic.sh @@ -119,16 +119,20 @@ echo "*TODO* Testing UTF8 upper lower case searches !!" echo "Testing compare" count=`$VALGRIND ldbsearch '(cn>=t)' cn | grep '^dn' | wc -l` -if [ $count != 2 ]; then - echo returned $count records - expected 2 - echo "this fails on openLdap ..." +if [ $count != 1 ]; then + # only "cn: test_multi_test_multi_test_multi" (comes after "t") + # upper-cased words come before "t" - hence excluded + echo returned $count records - expected 1 + exit 1 fi $VALGRIND ldbsearch '(cn>t)' cn && exit 1 # strictly greater should not work count=`$VALGRIND ldbsearch '(cn<=t)' cn | grep '^dn' | wc -l` -if [ $count != 13 ]; then - echo returned $count records - expected 13 - echo "this fails on openLdap ..." +if [ $count != 18 ]; then + # everything except "cn: test_multi_test_multi_test_multi" (comes after "t") + # upper-cased letters come before "t" - hence included + echo returned $count records - expected 18 + exit 1 fi $VALGRIND ldbsearch '(cn