summaryrefslogtreecommitdiff
path: root/tests/modtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modtest.cpp')
-rw-r--r--tests/modtest.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/tests/modtest.cpp b/tests/modtest.cpp
index 8ad1132..d3bd701 100644
--- a/tests/modtest.cpp
+++ b/tests/modtest.cpp
@@ -1,28 +1,20 @@
#include <swmgr.h>
#include <swtext.h>
-#include <iostream.h>
+#include <iostream>
+#ifndef NO_SWORD_NAMESPACE
+using namespace sword;
+#endif
int main(int argc, char **argv) {
SWMgr mymgr;
ModMap::iterator it;
- SWModule *module;
+ SWModule *module = mymgr.Modules["RWP"];
+ VerseKey parser;
+ ListKey lk = parser.ParseVerseList("mal4:6-rev", parser, true);
+ lk.Persist(1);
+ module->SetKey(lk);
- for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
- module = it->second;
- if (!strcmp(module->Type(), "Biblical Texts")) {
- cout << module->Name() << "\n";
- for (*module = TOP; (!module->Key().Error()); ((VerseKey *)&module->Key())->Book(((VerseKey *)&module->Key())->Book()+1)) {
- cout << module->KeyText() << "\n";
- }
- }
-
- if (!strcmp(module->Type(), "Commentaries")) {
- cout << module->Name() << "\n";
- for (*module = TOP; (!module->Error()); (*module)--) {
- cout << module->KeyText() << "\n";
- }
-
- }
- }
+ (*module) = TOP;
+ std::cout << module->KeyText() << "\n";
return 0;
}