[sword-svn] r3466 - in trunk: src/modules/filters tests/testsuite

scribe at crosswire.org scribe at crosswire.org
Sun May 21 10:41:02 MST 2017


Author: scribe
Date: 2017-05-21 10:41:01 -0700 (Sun, 21 May 2017)
New Revision: 3466

Modified:
   trunk/src/modules/filters/osisplain.cpp
   trunk/src/modules/filters/swbasicfilter.cpp
   trunk/tests/testsuite/osisReference.xml
   trunk/tests/testsuite/osis_basic.good
   trunk/tests/testsuite/osis_basic.sh
   trunk/tests/testsuite/osis_mod2zmod.sh
   trunk/tests/testsuite/osis_osis2modcipher.sh
Log:
Fixed bug which causes duplicate <hi> entries if 2 <hi> exist with no other output between them
Added OSISLemma filter to osisreference tests


Modified: trunk/src/modules/filters/osisplain.cpp
===================================================================
--- trunk/src/modules/filters/osisplain.cpp	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/src/modules/filters/osisplain.cpp	2017-05-21 17:41:01 UTC (rev 3466)
@@ -240,9 +240,9 @@
 				}
 			}
 			else {
-				buf.append("*");
+				buf.append("* ");
 				buf.append(u->lastSuspendSegment);
-				buf.append("*");
+				buf.append(" *");
 			}
 			u->suspendTextPassThru = false;
 		}

Modified: trunk/src/modules/filters/swbasicfilter.cpp
===================================================================
--- trunk/src/modules/filters/swbasicfilter.cpp	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/src/modules/filters/swbasicfilter.cpp	2017-05-21 17:41:01 UTC (rev 3466)
@@ -383,6 +383,9 @@
 					}
 					escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0;
 					lastTextNode = "";
+					if (!userData->suspendTextPassThru) {
+						userData->lastSuspendSegment.size(0);
+					}
 					continue;
 				}
 			}
@@ -398,7 +401,6 @@
  			if ((!userData->supressAdjacentWhitespace) || (*from != ' ')) {
 				if (!userData->suspendTextPassThru) {
 					text.append(*from);
-					userData->lastSuspendSegment.size(0);
 				}
 				else	userData->lastSuspendSegment.append(*from);
 				lastTextNode.append(*from);

Modified: trunk/tests/testsuite/osisReference.xml
===================================================================
--- trunk/tests/testsuite/osisReference.xml	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/tests/testsuite/osisReference.xml	2017-05-21 17:41:01 UTC (rev 3466)
@@ -178,6 +178,11 @@
    </div>
   <chapter eID="Mark.1"/>
  </div>
+ <div type="book" osisID="Acts">
+  <chapter sID="Acts.2" osisID="Acts.2"/>
+    <verse sID="Acts.2.19" osisID="Acts.2.19"/><l level="1">‘<hi type="small-caps"><w lemma="strong:G1325">And I will grant</w> <w lemma="strong:G5059">wonders</w> <w lemma="strong:G3772">in the sky</w> <w lemma="strong:G0507">above</w></hi></l><l level="1"> <hi type="small-caps"><w lemma="strong:G4592">And signs</w> <w lemma="strong:G1093">on the earth</w> <w lemma="strong:G2736">below</w></hi>,</l><l level="1"> <hi type="small-caps"><w lemma="strong:G0129">Blood</w>, <w lemma="strong:G4442">and fire</w>, <w lemma="strong:G0822">and vapor</w> <w lemma="strong:G2586">of smoke</w></hi>.</l><verse eID="Acts.2.19"/>
+    <verse sID="Acts.2.20" osisID="Acts.2.20"/><l level="1">‘<hi type="small-caps"><w lemma="strong:G2246">The sun</w> <w lemma="strong:G3344">will be turned</w> <w lemma="strong:G4655">into darkness</w></hi></l><l level="1"> <hi type="small-caps"><w lemma="strong:G4582">And the moon</w> <w lemma="strong:G0129">into blood</w></hi>,</l><l level="1"> <hi type="small-caps"><w lemma="strong:G4250">Before</w> <w lemma="strong:G3173">the great</w> <w lemma="strong:G2016">and glorious</w> <w lemma="strong:G2250">day</w> <w lemma="strong:G2962">of the Lord</w> <w lemma="strong:G2064">shall come</w></hi>.</l><verse eID="Acts.2.20"/>
+  <chapter eID="Acts.2"/>
 </div>
 </osisText>
 </osis>

Modified: trunk/tests/testsuite/osis_basic.good
===================================================================
--- trunk/tests/testsuite/osis_basic.good	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/tests/testsuite/osis_basic.good	2017-05-21 17:41:01 UTC (rev 3466)
@@ -124,3 +124,20 @@
 <br />
 
 [ Genesis 1:2 ] Text of verse 2.
+
+mods.d modules Plain output
+Acts 2:19: ‘* And I will grant wonders in the sky above *
+* And signs on the earth below *,
+* Blood, and fire, and vapor of smoke *.
+
+Acts 2:20: ‘* The sun will be turned into darkness *
+* And the moon into blood *,
+* Before the great and glorious day of the Lord shall come *.
+ 
+(OSISReference)
+
+mods.d modules RTF output
+{\rtf1\ansi{\fonttbl{\f0\froman\fcharset0\fprq2 Times New Roman;}{\f1\fdecor\fprq2 Gentium;}{\f7\froman\fcharset2\fprq2 Symbol;}}Acts 2:19: {\f1 ‘{\i1 {And I will grant} {wonders} {in the sky} {above}}{\par} {\i1 {And signs} {on the earth} {below}},{\par} {\i1 {Blood}, {and fire}, {and vapor} {of smoke}}.{\par}}\par 
+Acts 2:20: {\f1 ‘{\i1 {The sun} {will be turned} {into darkness}}{\par} {\i1 {And the moon} {into blood}},{\par} {\i1 {Before} {the great} {and glorious} {day} {of the Lord} {shall come}}.{\par} }\par 
+(OSISReference)
+}
\ No newline at end of file

Modified: trunk/tests/testsuite/osis_basic.sh
===================================================================
--- trunk/tests/testsuite/osis_basic.sh	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/tests/testsuite/osis_basic.sh	2017-05-21 17:41:01 UTC (rev 3466)
@@ -13,6 +13,7 @@
 CompressType=ZIP
 SourceType=OSIS
 Lang=en
+GlobalOptionFilter=OSISLemma
 GlobalOptionFilter=OSISStrongs
 GlobalOptionFilter=OSISMorph
 GlobalOptionFilter=OSISFootnotes
@@ -23,4 +24,12 @@
 
 ../../utilities/osis2mod tmp/osis_basic/modules/ osisReference.xml -z 2>&1 | grep -v \$Rev
 
-cd tmp/osis_basic && ../../../osistest OSISReference
+cd tmp/osis_basic
+../../../osistest OSISReference
+
+echo
+echo ** Plain output
+../../../../utilities/diatheke/diatheke -b OSISReference -f plain -k Acts 2:19-20
+echo
+echo ** RTF output
+../../../../utilities/diatheke/diatheke -b OSISReference -f RTF -k Acts 2:19-20

Modified: trunk/tests/testsuite/osis_mod2zmod.sh
===================================================================
--- trunk/tests/testsuite/osis_mod2zmod.sh	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/tests/testsuite/osis_mod2zmod.sh	2017-05-21 17:41:01 UTC (rev 3466)
@@ -16,6 +16,7 @@
 CompressType=ZIP
 SourceType=OSIS
 Lang=en
+GlobalOptionFilter=OSISLemma
 GlobalOptionFilter=OSISStrongs
 GlobalOptionFilter=OSISMorph
 GlobalOptionFilter=OSISFootnotes

Modified: trunk/tests/testsuite/osis_osis2modcipher.sh
===================================================================
--- trunk/tests/testsuite/osis_osis2modcipher.sh	2017-05-21 08:43:44 UTC (rev 3465)
+++ trunk/tests/testsuite/osis_osis2modcipher.sh	2017-05-21 17:41:01 UTC (rev 3466)
@@ -14,6 +14,7 @@
 CompressType=ZIP
 SourceType=OSIS
 Lang=en
+GlobalOptionFilter=OSISLemma
 GlobalOptionFilter=OSISStrongs
 GlobalOptionFilter=OSISMorph
 GlobalOptionFilter=OSISFootnotes




More information about the sword-cvs mailing list