ldb: added a test for an invalid search expression
authorAndrew Tridgell <tridge@samba.org>
Thu, 28 Jul 2011 05:56:15 +0000 (15:56 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 29 Jul 2011 08:17:44 +0000 (18:17 +1000)
this tests the fix for invalid expressions in & and | expressions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

lib/ldb/tests/test-generic.sh

index ae9ff7344ad7b46da1b89b3b7ef2543c2c39a5cd..7c3db4a4119a2bd5b35c23271409879e326bd065 100755 (executable)
@@ -57,6 +57,9 @@ $VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(uid=uham)(!(objectclass=xxx)))'  || exi
 $VALGRIND ldbsearch$EXEEXT '(&(objectclass=person)(uid=uham)(!(uid=uhamxx)))' uid \* \+ dn  || exit 1
 $VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(uid=uha*)(title=*))' uid || exit 1
 
+echo "Testing invalid search expression"
+$VALGRIND ldbsearch$EXEEXT '(&(uid=uham)(title=foo\blah))' uid && exit 1
+
 # note that the "((" is treated as an attribute not an expression
 # this matches the openldap ldapsearch behaviour of looking for a '='
 # to see if the first argument is an expression or not