[sword-devel] lex driver unit test

Troy A. Griffitts sword-devel@crosswire.org
Fri, 26 Jul 2002 22:54:35 -0700

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

OK guys,
	I'm trying to get around to fixing all these lexicon issues.  I have 
added a simple lextest unit test file in sword/tests, and have attached 
the file as well.  If you guys could give me something like this that I 
can just compile and bring up in a debugger that demonstrates your 
problems, I would really appreciate it.

	Even imp2ld data files I could try that don't seem to produce what you'd 
expect would be great.  Thanks tons!


Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;

#include <rawld.h>

void main(int argc, char **argv) {

	RawLD lex("tmp/lextest");

	lex << "aaa";

	lex << "ccc";

	lex << "bbb";

	for (lex = TOP; !lex.Error(); lex++) {
		cout << lex.KeyText() << ":\n";
		cout << lex << "\n------------------\n";
	return 0;