xref: /csrg-svn/lib/libc/db/test/README (revision 66210)
1*66210Sbostic#	@(#)README	8.2 (Berkeley) 02/21/94
256037Sbostic
3*66210SbosticTo build this portably, try something like:
4*66210Sbostic
5*66210Sbostic    make INC="-I../PORT/MACH/ -I../PORT/MACH/include" LIB=../PORT/MACH/libdb.a
6*66210Sbostic
7*66210Sbosticwhere MACH is the machine, i.e. "sunos.4.1.1".
8*66210Sbostic
9*66210SbosticTo run the tests, enter "sh run.test".  If your system dictionary isn't
10*66210Sbosticin /usr/share/dict/words, edit run.test to reflect the correct place.
11*66210Sbostic
12*66210Sbostic=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1356037SbosticThe script file consists of lines with a initial character which is
1456037Sbosticthe "command" for that line.  Legal characters are as follows:
1556037Sbostic
1656553Sbosticc: compare a record
1756553Sbostic	+ must be followed by [kK][dD]; the data value in the database
1856553Sbostic	  associated with the specified key is compared to the specified
1956553Sbostic	  data value.
2056057Sbostice: echo a string
2156555Sbostic	+ writes out the rest of the line into the output file; if the
2256555Sbostic	  last character is not a carriage-return, a newline is appended.
2356037Sbosticg: do a get command
2456037Sbostic	+ must be followed by [kK]
2556037Sbostic	+ writes out the retrieved data DBT.
2656037Sbosticp: do a put command
2756037Sbostic	+ must be followed by [kK][dD]
2856037Sbosticr: do a del command
2956037Sbostic	+ must be followed by [kK]
3056037Sbostics: do a seq command
3156057Sbostic	+ writes out the retrieved data DBT.
3256037Sbosticf: set the flags for the next command
3356037Sbostic	+ no value zero's the flags
3456037SbosticD [file]: data file
3556037Sbostic	+ set the current data value to the contents of the file
3656037Sbosticd [data]:
3756037Sbostic	+ set the current key value to the contents of the line.
3856037SbosticK [file]: key file
3956037Sbostic	+ set the current key value to the contents of the file
4056037Sbostick [data]:
4156037Sbostic	+ set the current key value to the contents of the line.
4256991Sbostico [r]: dump [reverse]
4356991Sbostic	+ dump the database out, if 'r' is set, in reverse order.
4456037Sbostic
4556037SbosticOptions to dbtest are as follows:
4656037Sbostic
4759622Sbostic	-f: Use the file argument as the database file.
4856037Sbostic	-i: Use the rest of the argument to set elements in the info
4956037Sbostic	    structure.  If the type is btree, then "-i cachesize=10240"
5056037Sbostic	    will set BTREEINFO.cachesize to 10240.
5156037Sbostic	-o: The rest of the argument is the output file instead of
5256037Sbostic	    using stdout.
5356488Sbostic
5456488SbosticDbtest requires two arguments, the type of access "hash", "recno" or
5556488Sbostic"btree", and the script name.
56