3 echo "Running tdb feature tests"
10 n=`bin/ldbsearch "$expression" | grep '^dn' | wc -l`
11 if [ $n != $count ]; then
12 echo "Got $n but expected $count for $expression"
13 $VALGRIND bin/ldbsearch "$expression"
16 echo "OK: $count $expression"
19 echo "Testing case sensitive search"
20 cat <<EOF | $VALGRIND bin/ldbadd || exit 1
22 objectClass: testclass
25 checkcount 1 '(test=foo)'
26 checkcount 0 '(test=FOO)'
27 checkcount 0 '(test=FO*)'
29 echo "Making case insensitive"
30 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
34 test: CASE_INSENSITIVE
37 echo $ldif | $VALGRIND bin/ldbmodify || exit 1
38 checkcount 1 '(test=foo)'
39 checkcount 1 '(test=FOO)'
40 checkcount 1 '(test=fo*)'
43 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
49 checkcount 1 '(i=0x100)'
50 checkcount 0 '(i=256)'
52 echo "marking i as INTEGER"
53 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
59 checkcount 1 '(i=0x100)'
60 checkcount 1 '(i=256)'
63 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
69 checkcount 1 '(j=0x100)'
70 checkcount 0 '(j=256)'
72 echo "Adding wildcard attribute"
73 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
79 checkcount 1 '(j=0x100)'
80 checkcount 1 '(j=256)'
82 echo "Testing class search"
83 checkcount 0 '(objectClass=otherclass)'
84 checkcount 1 '(objectClass=testclass)'
86 echo "Adding subclass"
87 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
93 checkcount 1 '(objectClass=otherclass)'
94 checkcount 1 '(objectClass=testclass)'
97 cat <<EOF | $VALGRIND bin/ldbadd || exit 1
102 checkcount 1 '(i=0x100)'
103 checkcount 1 '(i=256)'
104 checkcount 0 '(i=-256)'
105 checkcount 1 '(test=foo)'
106 checkcount 1 '(test=FOO)'
107 checkcount 1 '(test=*f*o)'
109 echo "making test case sensitive"
110 cat <<EOF | $VALGRIND bin/ldbmodify || exit 1
116 checkcount 1 '(test=foo)'
117 checkcount 0 '(test=FOO)'
118 checkcount 1 '(test=f*o*)'