3 echo "Running extended search tests"
7 cat <<EOF | $VALGRIND ldbadd || exit 1
8 dn: cn=testrec1,cn=TEST
14 dn: cn=testrec2,cn=TEST
17 dn: cn=testrec3,cn=TEST
23 samAccountType: 805306368
27 samAccountType: 805306369
31 samAccountType: 805306370
35 samAccountType: 805306369
41 n=`$VALGRIND ldbsearch "$expression" | grep '^dn' | wc -l`
42 if [ $n != $count ]; then
43 echo "Got $n but expected $count for $expression"
44 $VALGRIND ldbsearch "$expression"
47 echo "OK: $count $expression"
50 checkcount 1 '(i3=1234)'
51 checkcount 0 '(i3=12345)'
53 checkcount 2 '(i1:1.2.840.113556.1.4.803:=1)'
54 checkcount 1 '(i1:1.2.840.113556.1.4.803:=3)'
55 checkcount 1 '(i1:1.2.840.113556.1.4.803:=7)'
56 checkcount 0 '(i1:1.2.840.113556.1.4.803:=15)'
57 checkcount 1 '(i1:1.2.840.113556.1.4.803:=0x800000)'
58 checkcount 1 '(i1:1.2.840.113556.1.4.803:=8388608)'
60 checkcount 2 '(i1:1.2.840.113556.1.4.804:=1)'
61 checkcount 2 '(i1:1.2.840.113556.1.4.804:=3)'
62 checkcount 2 '(i1:1.2.840.113556.1.4.804:=7)'
63 checkcount 2 '(i1:1.2.840.113556.1.4.804:=15)'
64 checkcount 1 '(i1:1.2.840.113556.1.4.804:=0x800000)'
65 checkcount 1 '(i1:1.2.840.113556.1.4.804:=8388608)'
67 # this is one that w2k gives
68 checkcount 3 '(|(|(&(!(groupType:1.2.840.113556.1.4.803:=1))(groupType:1.2.840.113556.1.4.803:=2147483648)(groupType:1.2.840.113556.1.4.804:=10))(samAccountType=805306368))(samAccountType=805306369))'