summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-12-01 12:11:46 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-12-01 05:54:23 +0100
commit6ca5e9ee1c1afdab70689116d5d47d59e410314d (patch)
treeeec68596222b79d491d65989b85ac9bc858fb77a /lib
parent4dfe84a98459d1e6a7de12a54295b0c92bcdde26 (diff)
downloadsamba-6ca5e9ee1c1afdab70689116d5d47d59e410314d.tar.gz
ldb: Add test for behaviour of rdn_name
Cover a wildcard in @ATTRIBUTES and the normal case. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/tests/test-tdb-features.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ldb/tests/test-tdb-features.sh b/lib/ldb/tests/test-tdb-features.sh
index 59e61ee5d2e..a9cd6b3613d 100644
--- a/lib/ldb/tests/test-tdb-features.sh
+++ b/lib/ldb/tests/test-tdb-features.sh
@@ -4,6 +4,11 @@ echo "Running tdb feature tests"
mv $LDB_URL $LDB_URL.2
+cat <<EOF | $VALGRIND ldbadd || exit 1
+dn: @MODULES
+@LIST: rdn_name
+EOF
+
checkcount() {
count=$1
expression="$2"
@@ -25,6 +30,7 @@ EOF
checkcount 1 '(test=foo)'
checkcount 0 '(test=FOO)'
checkcount 0 '(test=FO*)'
+checkcount 1 '(cn=t1)'
echo "Making case insensitive"
cat <<EOF | $VALGRIND ldbmodify || exit 1
@@ -79,6 +85,13 @@ EOF
checkcount 1 '(j=0x100)'
checkcount 1 '(j=256)'
+cat <<EOF | $VALGRIND ldbadd || exit 1
+dn: num=1
+EOF
+
+echo "Testing search for attribute after change to use wildcard"
+checkcount 1 '(num=1)'
+
echo "Testing class search"
checkcount 0 '(objectClass=otherclass)'
checkcount 1 '(objectClass=testclass)'