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
42 n
=$
($VALGRIND ldbsearch
"$expression" |
grep '^dn' |
wc -l)
43 if [ $n != $count ]; then
44 echo "Got $n but expected $count for $expression"
45 $VALGRIND ldbsearch
"$expression"
48 echo "OK: $count $expression"
51 checkcount
1 '(i3=1234)'
52 checkcount
0 '(i3=12345)'
54 checkcount
2 '(i1:1.2.840.113556.1.4.803:=1)'
55 checkcount
1 '(i1:1.2.840.113556.1.4.803:=3)'
56 checkcount
1 '(i1:1.2.840.113556.1.4.803:=7)'
57 checkcount
0 '(i1:1.2.840.113556.1.4.803:=15)'
58 checkcount
1 '(i1:1.2.840.113556.1.4.803:=0x800000)'
59 checkcount
1 '(i1:1.2.840.113556.1.4.803:=8388608)'
61 checkcount
2 '(i1:1.2.840.113556.1.4.804:=1)'
62 checkcount
2 '(i1:1.2.840.113556.1.4.804:=3)'
63 checkcount
2 '(i1:1.2.840.113556.1.4.804:=7)'
64 checkcount
2 '(i1:1.2.840.113556.1.4.804:=15)'
65 checkcount
1 '(i1:1.2.840.113556.1.4.804:=0x800000)'
66 checkcount
1 '(i1:1.2.840.113556.1.4.804:=8388608)'
68 # this is one that w2k gives
69 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))'