[sword-svn] r3221 - in trunk/tests: . testsuite
scribe at crosswire.org
scribe at crosswire.org
Wed Apr 30 22:15:09 MST 2014
Author: scribe
Date: 2014-04-30 22:15:08 -0700 (Wed, 30 Apr 2014)
New Revision: 3221
Modified:
trunk/tests/ldtest.cpp
trunk/tests/testsuite/ldr12n.good
trunk/tests/testsuite/ldr12n.sh
Log:
updated test to check both padded and non-padded lexdict mods
Modified: trunk/tests/ldtest.cpp
===================================================================
--- trunk/tests/ldtest.cpp 2014-05-01 05:14:49 UTC (rev 3220)
+++ trunk/tests/ldtest.cpp 2014-05-01 05:15:08 UTC (rev 3221)
@@ -1,14 +1,20 @@
#include <swmodule.h>
#include <swmgr.h>
#include <iostream>
+#include <stdio.h>
using namespace sword;
using namespace std;
int main(int argc, char **argv) {
+ if (argc < 2) {
+ fprintf(stderr, "usage: %s <lexdict_name>\n", *argv);
+ exit(-1);
+ }
+
SWMgr library;
- SWModule *module = library.getModule("ldr12n");
+ SWModule *module = library.getModule(argv[1]);
if (!module) {
cerr << "\nCouldn't find module: " << argv[1] << "\n" << endl;
exit(-2);
Modified: trunk/tests/testsuite/ldr12n.good
===================================================================
--- trunk/tests/testsuite/ldr12n.good 2014-05-01 05:14:49 UTC (rev 3220)
+++ trunk/tests/testsuite/ldr12n.good 2014-05-01 05:15:08 UTC (rev 3221)
@@ -4,9 +4,21 @@
4
0005
0006
+0001
+0002
+0003
+4
+0005
+0006
0001: Body of 1
0002: Body of 2
0003: Body of 3
0005: Body of 5
0006: Body of 6
4: Body of 4
+00001: Body of 1
+00002: Body of 2
+00003: Body of 3
+00004: Body of 4
+00005: Body of 5
+00006: Body of 6
Modified: trunk/tests/testsuite/ldr12n.sh
===================================================================
--- trunk/tests/testsuite/ldr12n.sh 2014-05-01 05:14:49 UTC (rev 3220)
+++ trunk/tests/testsuite/ldr12n.sh 2014-05-01 05:15:08 UTC (rev 3221)
@@ -14,6 +14,17 @@
StrongsPadding=false
!
+cat > ldr12n/mods.d/ldr12np.conf <<!
+[ldr12np]
+DataPath=./modules/ldr12np
+ModDrv=RawLD
+Encoding=UTF-8
+SourceType=Plain
+Lang=en
+StrongsPadding=true
+!
+
../../utilities/imp2ld ldr12n.imp -P -o ldr12n/modules/ldr12n 2>&1 | grep -v \$Rev
+../../utilities/imp2ld ldr12n.imp -o ldr12n/modules/ldr12np 2>&1 | grep -v \$Rev
-cd ldr12n && ../../ldtest ldr12n
+cd ldr12n && ../../ldtest ldr12n && ../../ldtest ldr12np
More information about the sword-cvs
mailing list