[sword-svn] r1967 - trunk/tests

scribe at www.crosswire.org scribe at www.crosswire.org
Thu Aug 31 19:52:20 MST 2006


Author: scribe
Date: 2006-08-31 19:52:17 -0700 (Thu, 31 Aug 2006)
New Revision: 1967

Modified:
   trunk/tests/mgrtest.cpp
Log:
Added option to pass sword.conf path to mgrtest


Modified: trunk/tests/mgrtest.cpp
===================================================================
--- trunk/tests/mgrtest.cpp	2006-08-30 22:12:49 UTC (rev 1966)
+++ trunk/tests/mgrtest.cpp	2006-09-01 02:52:17 UTC (rev 1967)
@@ -2,6 +2,7 @@
 #include <iostream>
 #include <versekey.h>
 #include <swmodule.h>
+#include <swconfig.h>
 #ifndef NO_SWORD_NAMESPACE
 using namespace sword;
 #endif
@@ -9,8 +10,11 @@
 int main(int argc, char **argv) {
 	std::cerr << "\n";
 	SWMgr::debug = true;
-	SWMgr mymgr;
-	char keypress[2];
+	SWConfig *sysConf = 0;
+	if (argc > 1) {
+		sysConf = new SWConfig(argv[1]);
+	}
+	SWMgr mymgr(0, sysConf);
 	std::cerr << "\n\nprefixPath: " << mymgr.prefixPath;
 	std::cerr << "\nconfigPath: " << mymgr.configPath << "\n\n";
 
@@ -31,5 +35,9 @@
 		for (mhc->Key("Gen 1:1"); mhc->Key() < (VerseKey) "Gen 1:10"; (*mhc)++)
 			std::cout << (const char *) *mhc << "\n";
 	}
+
+	if (sysConf)
+		delete sysConf;
+
 	return 0;
 }




More information about the sword-cvs mailing list