summaryrefslogtreecommitdiff
path: root/lib/ldb/tests
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-28 15:56:15 +1000
committerAndrew Tridgell <tridge@samba.org>2011-07-29 18:17:44 +1000
commitd815ce094e7a495fb2ddf0668015c5a1b9bb1dc4 (patch)
tree0f95ac0d057b4ae3cec6df3d8dda7d31b27ee4ae /lib/ldb/tests
parente3b76bd6205acfc1a89fbcab5d9588b32cb47b88 (diff)
downloadsamba-d815ce094e7a495fb2ddf0668015c5a1b9bb1dc4.tar.gz
ldb: added a test for an invalid search expression
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>
Diffstat (limited to 'lib/ldb/tests')
-rwxr-xr-xlib/ldb/tests/test-generic.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ldb/tests/test-generic.sh b/lib/ldb/tests/test-generic.sh
index ae9ff7344ad..7c3db4a4119 100755
--- a/lib/ldb/tests/test-generic.sh
+++ b/lib/ldb/tests/test-generic.sh
@@ -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