summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-01 05:20:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:00 -0500
commit324de0b36d3c128d9fb40c27cd5667aa8bbc62ba (patch)
tree6c5422c505bf55cde45514042000af12e8d243ae /source4/lib/ldb
parent64307e63513bd47de25c031321c91ebc56a4aef3 (diff)
downloadsamba-324de0b36d3c128d9fb40c27cd5667aa8bbc62ba.tar.gz
samba-324de0b36d3c128d9fb40c27cd5667aa8bbc62ba.tar.bz2
samba-324de0b36d3c128d9fb40c27cd5667aa8bbc62ba.zip
r8035: added indexing tests. current ldb fails the integer indexing, will be fixed shortly
(This used to be commit a9c32445035a09978c5fdbc189a2767e7650dfc2)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/tests/test-tdb-features.sh28
1 files changed, 24 insertions, 4 deletions
diff --git a/source4/lib/ldb/tests/test-tdb-features.sh b/source4/lib/ldb/tests/test-tdb-features.sh
index 8e9d9dab3c..a78d2d3dd5 100644
--- a/source4/lib/ldb/tests/test-tdb-features.sh
+++ b/source4/lib/ldb/tests/test-tdb-features.sh
@@ -22,10 +22,6 @@ dn: cn=t1,cn=TEST
objectClass: testclass
test: foo
EOF
-
-
-echo $ldif | $VALGRIND bin/ldbadd || exit 1
-
checkcount 1 '(test=foo)'
checkcount 0 '(test=FOO)'
checkcount 0 '(test=fo*)'
@@ -108,4 +104,28 @@ EOF
checkcount 1 '(objectClass=otherclass)'
checkcount 1 '(objectClass=testclass)'
+echo "Adding index"
+cat <<EOF | $VALGRIND bin/ldbadd || exit 1
+dn: @INDEXLIST
+@IDXATTR: i
+@IDXATTR: test
+EOF
+checkcount 1 '(i=0x100)'
+checkcount 1 '(i=256)'
+checkcount 0 '(i=-256)'
+checkcount 1 '(test=foo)'
+checkcount 1 '(test=FOO)'
+checkcount 1 '(test=fo*)'
+
+echo "making test case sensitive"
+cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
+dn: @ATTRIBUTES
+changetype: modify
+replace: test
+test: NONE
+EOF
+checkcount 1 '(test=foo)'
+checkcount 0 '(test=FOO)'
+checkcount 0 '(test=fo*)'
+
rm -f $LDB_URL