r8035: added indexing tests. current ldb fails the integer indexing, will be fixed...
authorAndrew Tridgell <tridge@samba.org>
Fri, 1 Jul 2005 05:20:08 +0000 (05:20 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:19:00 +0000 (13:19 -0500)
(This used to be commit a9c32445035a09978c5fdbc189a2767e7650dfc2)

source4/lib/ldb/tests/test-tdb-features.sh

index 8e9d9dab3c0bb9760729186d54ed95ce272c75d6..a78d2d3dd5607ba00fd19dc441c8d6e1a0fdfb94 100644 (file)
@@ -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