[sword-svn] r2521 - trunk/tests
scribe at crosswire.org
scribe at crosswire.org
Fri Jun 18 11:55:04 MST 2010
Author: scribe
Date: 2010-06-18 11:55:04 -0700 (Fri, 18 Jun 2010)
New Revision: 2521
Modified:
trunk/tests/parsekey.cpp
Log:
added ability to turn off echo of params
Modified: trunk/tests/parsekey.cpp
===================================================================
--- trunk/tests/parsekey.cpp 2010-06-18 18:33:53 UTC (rev 2520)
+++ trunk/tests/parsekey.cpp 2010-06-18 18:55:04 UTC (rev 2521)
@@ -26,8 +26,8 @@
#endif
int main(int argc, char **argv) {
- if ((argc < 2) || (argc > 4)) {
- std::cerr << "usage: " << *argv << " <\"string to parse\"> [locale_name] [v11n] [context] [test-in-set-verse]\n";
+ if ((argc < 2) || (argc > 7)) {
+ std::cerr << "usage: " << *argv << " <\"string to parse\"> [locale_name] [v11n] [context] [echo params 1|0] [test-in-set-verse]\n";
exit(-1);
}
@@ -49,11 +49,13 @@
ListKey verses = DefaultVSKey.ParseVerseList(argv[1], DefaultVSKey, true);
- for (int i = 1; i < argc; i++) {
- if (i > 1) std::cout << " ";
- std::cout << argv[i];
+ if ((argc > 5) && (argv[5][0] == '1')) {
+ for (int i = 1; i < argc; i++) {
+ if (i > 1) std::cout << " ";
+ std::cout << argv[i];
+ }
+ std::cout << ": ";
}
- std::cout << ": ";
std::cout << verses.getRangeText() << "\n";
/*
for (int i = 0; i < verses.Count(); i++) {
@@ -61,7 +63,7 @@
}
*/
- if (argc > 5) {
+ if (argc > 6) {
verses.setText(argv[4]);
std::cout << "Verse is" << ((verses.Error()) ? " NOT" : "") << " in set.\n\n";
}
More information about the sword-cvs
mailing list