svn commit: samba r7560 - in
branches/SAMBA_4_0/source/lib/ldb/tests: .
tridge at samba.org
tridge at samba.org
Tue Jun 14 02:34:14 GMT 2005
Author: tridge
Date: 2005-06-14 02:34:13 +0000 (Tue, 14 Jun 2005)
New Revision: 7560
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7560
Log:
added tests for extended bitop search functions
Added:
branches/SAMBA_4_0/source/lib/ldb/tests/test-extended.sh
Modified:
branches/SAMBA_4_0/source/lib/ldb/tests/test-tdb.sh
Changeset:
Added: branches/SAMBA_4_0/source/lib/ldb/tests/test-extended.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-extended.sh 2005-06-14 02:33:49 UTC (rev 7559)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-extended.sh 2005-06-14 02:34:13 UTC (rev 7560)
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+rm -f $LDB_URL
+
+cat <<EOF | bin/ldbadd - || exit 1
+dn: testrec1
+i1: 1
+i2: 0
+i3: 1234
+i4: 0x7003004
+
+dn: testrec2
+i1: 0x800000
+
+dn: testrec3
+i1: 0x101010101
+i1: 7
+EOF
+
+checkcount() {
+ count=$1
+ expression="$2"
+ n=`bin/ldbsearch "$expression" | grep ^dn | wc -l`
+ if [ $n != $count ]; then
+ echo "Got $n but expected $count for $expression"
+ bin/ldbsearch "$expression"
+ exit 1
+ fi
+ echo "OK: $count $expression"
+}
+
+checkcount 1 '(i3=1234)'
+checkcount 0 '(i3=12345)'
+
+checkcount 2 '(i1:1.2.840.113556.1.4.803:=1)'
+checkcount 1 '(i1:1.2.840.113556.1.4.803:=3)'
+checkcount 1 '(i1:1.2.840.113556.1.4.803:=7)'
+checkcount 0 '(i1:1.2.840.113556.1.4.803:=15)'
+checkcount 1 '(i1:1.2.840.113556.1.4.803:=0x800000)'
+checkcount 1 '(i1:1.2.840.113556.1.4.803:=8388608)'
+
+checkcount 2 '(i1:1.2.840.113556.1.4.804:=1)'
+checkcount 2 '(i1:1.2.840.113556.1.4.804:=3)'
+checkcount 2 '(i1:1.2.840.113556.1.4.804:=7)'
+checkcount 2 '(i1:1.2.840.113556.1.4.804:=15)'
+checkcount 1 '(i1:1.2.840.113556.1.4.804:=0x800000)'
+checkcount 1 '(i1:1.2.840.113556.1.4.804:=8388608)'
+
+rm -f $LDB_URL
Property changes on: branches/SAMBA_4_0/source/lib/ldb/tests/test-extended.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-tdb.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/test-tdb.sh 2005-06-14 02:33:49 UTC (rev 7559)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/test-tdb.sh 2005-06-14 02:34:13 UTC (rev 7560)
@@ -7,3 +7,4 @@
. tests/test-generic.sh
+. tests/test-extended.sh
More information about the samba-cvs
mailing list