diff options
Diffstat (limited to 'tests/lextest.cpp')
-rw-r--r-- | tests/lextest.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/lextest.cpp b/tests/lextest.cpp index 9119a2a..4d1f084 100644 --- a/tests/lextest.cpp +++ b/tests/lextest.cpp @@ -1,8 +1,27 @@ +/* + * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + #include <iostream> #include <rawld.h> #ifndef NO_SWORD_NAMESPACE using namespace sword; #endif +using std::cout; +using std::endl; int main(int argc, char **argv) { @@ -10,10 +29,15 @@ int main(int argc, char **argv) RawLD lex("tmp/lextest"); lex.setKey("b"); - lex << "x"; + lex << "entry for b"; lex.setKey("a"); - lex << "x"; + lex << "entry for a"; + + lex = TOP; + cout << lex.getKeyText() << endl; + lex++; + cout << lex.getKeyText() << endl; lex.setKey("a"); lex.deleteEntry(); |