[sword-svn] r2520 - trunk/tests

scribe at crosswire.org scribe at crosswire.org
Fri Jun 18 11:33:54 MST 2010


Author: scribe
Date: 2010-06-18 11:33:53 -0700 (Fri, 18 Jun 2010)
New Revision: 2520

Modified:
   trunk/tests/parsekey.cpp
Log:
added context to parsekey test


Modified: trunk/tests/parsekey.cpp
===================================================================
--- trunk/tests/parsekey.cpp	2010-06-04 08:51:17 UTC (rev 2519)
+++ trunk/tests/parsekey.cpp	2010-06-18 18:33:53 UTC (rev 2520)
@@ -27,7 +27,7 @@
 
 int main(int argc, char **argv) {
 	if ((argc < 2) || (argc > 4)) {
-		std::cerr << "usage: " << *argv << " <\"string to parse\"> [locale_name] [v11n] [test-in-set-verse]\n";
+		std::cerr << "usage: " << *argv << " <\"string to parse\"> [locale_name] [v11n] [context] [test-in-set-verse]\n";
 		exit(-1);
 	}
 
@@ -40,10 +40,12 @@
 	if (argc > 3)
 		DefaultVSKey.setVersificationSystem(argv[3]);
 
+	const char *context = (argc > 4) ? argv[4] : "gen.1.1";
+
 	SWLog::getSystemLog()->setLogLevel(SWLog::LOG_DEBUG);
 	DefaultVSKey.validateCurrentLocale();
 
-	DefaultVSKey = "jas3:1";
+	DefaultVSKey = context;
 	
 	ListKey verses = DefaultVSKey.ParseVerseList(argv[1], DefaultVSKey, true);
 
@@ -59,7 +61,7 @@
 	}
 */
 
-	if (argc > 4) {
+	if (argc > 5) {
 		verses.setText(argv[4]);
 		std::cout << "Verse is" << ((verses.Error()) ? " NOT" : "") << " in set.\n\n";
 	}




More information about the sword-cvs mailing list