summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index 4b4415afb1..76de853ac7 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -7,6 +7,7 @@ import unittest
import ldb
+
def filename():
return os.tempnam()
@@ -321,6 +322,10 @@ class SimpleLdb(unittest.TestCase):
res = l.search(expression="(dn=dc=somedn)")
self.assertEquals("foo\0bar", res[0]["displayname"][0])
+ def test_no_crash_broken_expr(self):
+ l = ldb.Ldb(filename())
+ self.assertRaises(ldb.LdbError,lambda: l.search("", ldb.SCOPE_SUBTREE, "&(dc=*)(dn=*)", ["dc"]))
+
class DnTests(unittest.TestCase):