[sword-svn] r3434 - in trunk: . tests tests/testsuite utilities

scribe at crosswire.org scribe at crosswire.org
Wed Aug 17 11:17:13 MST 2016


Author: scribe
Date: 2016-08-17 11:17:13 -0700 (Wed, 17 Aug 2016)
New Revision: 3434

Added:
   trunk/tests/testsuite/osis_basic.good
   trunk/tests/testsuite/osis_basic.sh
   trunk/tests/testsuite/osis_mod2zmod.good
   trunk/tests/testsuite/osis_mod2zmod.sh
   trunk/tests/testsuite/osis_osis2modcipher.good
   trunk/tests/testsuite/osis_osis2modcipher.sh
Removed:
   trunk/tests/testsuite/osis.good
   trunk/tests/testsuite/osis.sh
   trunk/utilities/cipherraw.cpp
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/tests/Makefile.am
   trunk/tests/testsuite/Makefile.am
   trunk/tests/testsuite/ldr12n.sh
   trunk/utilities/Makefile.am
Log:
Removed deprecated (and broken) cipherraw util; instead, use mod2zmod w/ cipherkey areg or osis2mod -c cipherkey
Added more tests for cipher and compression utils
Have all tests write any generated files to tmp/
Added a clean target to clean up test temporaries
Added a Makefile.am to maybe help others understand how to run these tests

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/ChangeLog	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,4 +1,12 @@
 API ChangeLog
+
+16-Apr-2016	Troy A. Griffitts <scribe at crosswire.org>
+	Added working --chapter --verse decrementors across Testament
+	Added handling of more odd double colon verse reference texts
+	Removed deprecated utility cipherraw; use mod2zmod w/ cipherkey
+		or osis2mod -c instead.
+	Added new tests to testsuite for mod2zmod and osis2mod with cipher
+
 18-Dec-2015     Peter von Kaehne <refdoc at crosswire.org>
 	Added image and table handling to TEI latex
 	Added image handling to TEI RTF

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/configure.ac	2016-08-17 18:17:13 UTC (rev 3434)
@@ -438,7 +438,7 @@
 # ---------------------------------------------------------------------
 # Final output
 # ---------------------------------------------------------------------
-AC_CONFIG_FILES(Makefile lib/Makefile tests/Makefile tests/cppunit/Makefile utilities/Makefile examples/Makefile examples/cmdline/Makefile examples/tasks/Makefile utilities/diatheke/Makefile sword.pc include/swversion.h sword.spec)
+AC_CONFIG_FILES(Makefile lib/Makefile tests/Makefile tests/testsuite/Makefile tests/cppunit/Makefile utilities/Makefile examples/Makefile examples/cmdline/Makefile examples/tasks/Makefile utilities/diatheke/Makefile sword.pc include/swversion.h sword.spec)
 AC_OUTPUT
 
 echo

Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/tests/Makefile.am	2016-08-17 18:17:13 UTC (rev 3434)
@@ -5,7 +5,7 @@
 endif
 LDADD = $(top_builddir)/lib/libsword.la
 
-SUBDIRS = cppunit
+SUBDIRS = cppunit testsuite
 
 noinst_PROGRAMS = utf8norm ciphertest keytest mgrtest parsekey versekeytest \
 			vtreekeytest versemgrtest listtest casttest modtest \
@@ -72,7 +72,3 @@
 osistest_SOURCES = osistest.cpp
 bibliotest_SOURCES = bibliotest.cpp
 
-EXTRA_DIST = 
-include bcppmake/Makefile.am
-include testsuite/Makefile.am
-include tmp/Makefile.am

Modified: trunk/tests/testsuite/Makefile.am
===================================================================
--- trunk/tests/testsuite/Makefile.am	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/tests/testsuite/Makefile.am	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,6 +1,12 @@
-swtspdir = $(top_srcdir)/tests/testsuite
+all:
+	@echo
+	@echo to run tests type: ./runall.sh
+	@echo or make run
+	@echo
 
-EXTRA_DIST += $(swtspdir)/runall.sh
-EXTRA_DIST += $(swtspdir)/runtest.sh
-EXTRA_DIST += $(swtspdir)/verseparsing.good
-EXTRA_DIST += $(swtspdir)/verseparsing.sh
+run:
+	./runall.sh
+
+clean-local:
+	-rm -rf tmp
+	-rm -rf *.try

Modified: trunk/tests/testsuite/ldr12n.sh
===================================================================
--- trunk/tests/testsuite/ldr12n.sh	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/tests/testsuite/ldr12n.sh	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,11 +1,11 @@
 #!/bin/sh
 # Lexicon / Dictionary regularization tests to make sure we pad and lookup correctly
 
-rm -rf ldr12n/
-mkdir -p ldr12n/mods.d
-mkdir -p ldr12n/modules
+rm -rf tmp/ldr12n/
+mkdir -p tmp/ldr12n/mods.d
+mkdir -p tmp/ldr12n/modules
 
-cat > ldr12n/mods.d/ldr12n.conf <<!
+cat > tmp/ldr12n/mods.d/ldr12n.conf <<!
 [ldr12n]
 DataPath=./modules/ldr12n
 ModDrv=RawLD
@@ -15,7 +15,7 @@
 StrongsPadding=false
 !
 
-cat > ldr12n/mods.d/ldr12np.conf <<!
+cat > tmp/ldr12n/mods.d/ldr12np.conf <<!
 [ldr12np]
 DataPath=./modules/ldr12np
 ModDrv=RawLD
@@ -25,7 +25,7 @@
 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
+../../utilities/imp2ld ldr12n.imp -P -o tmp/ldr12n/modules/ldr12n 2>&1 | grep -v \$Rev
+../../utilities/imp2ld ldr12n.imp -o tmp/ldr12n/modules/ldr12np 2>&1 | grep -v \$Rev
 
-cd ldr12n && ../../ldtest ldr12n && ../../ldtest ldr12np
+cd tmp/ldr12n && ../../../ldtest ldr12n && ../../../ldtest ldr12np

Deleted: trunk/tests/testsuite/osis.good
===================================================================
--- trunk/tests/testsuite/osis.good	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/tests/testsuite/osis.good	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,124 +0,0 @@
-SUCCESS: ../../utilities/osis2mod: has finished its work and will now rest
-Key:
-Psalms 3:1
--------
-Preverse Header 0:
-Raw:
-<div sID="gen12" type="section"/> <title canonical="true" type="psalm">A Psalm of David, when he fled from Absalom his son.</title> <div sID="gen13" type="x-p"/> <lg sID="gen14"/> 
--------
-Rendered Header:
- <h3 class="title psalm">A Psalm of David, when he fled from Absalom his son.</h3>
-
-<br />
- 
--------
-CSS:
-		.divineName { font-variant: small-caps; }
-		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
-		.small-caps { font-variant: small-caps; }
-		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
-		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-	
--------
-RenderText:
- <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
-<span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
-
--------
--------
-
-Key:
-Mark 1:14
--------
-Preverse Header 0:
-Raw:
-<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
--------
-Rendered Header:
- <h3 class="title">The Beginning of the Ministry of Jesus</h3>
-
-<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
-
-<br />
-
--------
-CSS:
-		.divineName { font-variant: small-caps; }
-		.wordsOfJesus { color: red; }
-		.transChange { font-style: italic;}
-		.transChange.transChange-supplied { font-style: italic;}
-		.transChange.transChange-added { font-style: italic;}
-		.transChange.transChange-tenseChange::before { content: '*';}
-		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
-		.overline        { text-decoration: overline; }
-		.indent1         { margin-left: 10px }
-		.indent2         { margin-left: 20px }
-		.indent3         { margin-left: 30px }
-		.indent4         { margin-left: 40px }
-		abbr { &:hover{ &:before{ content: attr(title) } } }
-		.small-caps { font-variant: small-caps; }
-		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
-		.acrostic { text-align: center; }
-		.colophon {font-style: italic; font-size=small; display:block;}
-		.rdg { font-style: italic;}
-		.catchWord {font-style: bold;}
-	
--------
-RenderText:
- Now after that John was put in prison, Jesus came into Galilee, preaching the gospel of the kingdom of God, 
--------
--------
-
-
-Whitespace tests around headings:
-
-
- <h1 class="bookHeader">Old Testament</h1>
-
- <h1 class="bookHeader main">THE FIRST BOOK OF MOSES CALLED GENESIS</h1>
-
- <h1 class="bookHeader">Introduction and Outline</h1>
-
-<br />
-This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows: <br />
-<br />
-<ul>
- 	<li><sup>1</sup>Creation of Heaven and Earth, 1:1-2:4a</li>
-	<li><sup>2</sup>Creation of Man and Woman, 2:4b-25</li>
-	<li><sub>3</sub>Fall, 3:1-24</li>
-	<li>...</li>
-</ul>
- <br />
-Tables work like this: <table><tbody>
- 	<tr> <td><b>Column 1 Label</b></td> <td><b>Column 2 Label</b></td> </tr>
- 	<tr> <td>Column 1, Row 1</td> <td>Column 2, Row 1</td> </tr>
- 	<tr> <td>Column 1, Row 2</td> <td>Column 2, Row 2</td> </tr>
- </tbody></table>
-<br />
-
-  <h2 class="chapterHeader">From Creation to Abraham (1:1–11:9)</h2>
-
-
- <h3 class="title">Creation of the Heavens and the Earth</h3>
-
-<br />
-
-[ Genesis 1:1 ]  In the beginning God created the heaven and the earth.  <br />
-
-<br />
-
-[ Genesis 1:2 ] Text of verse 2.

Deleted: trunk/tests/testsuite/osis.sh
===================================================================
--- trunk/tests/testsuite/osis.sh	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/tests/testsuite/osis.sh	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-rm -rf osis/
-mkdir -p osis/mods.d
-mkdir -p osis/modules
-
-cat > osis/mods.d/osisreference.conf <<!
-[OSISReference]
-DataPath=./modules/
-ModDrv=zText
-Encoding=UTF-8
-BlockType=BOOK
-CompressType=ZIP
-SourceType=OSIS
-Lang=en
-GlobalOptionFilter=OSISStrongs
-GlobalOptionFilter=OSISMorph
-GlobalOptionFilter=OSISFootnotes
-GlobalOptionFilter=OSISHeadings
-GlobalOptionFilter=OSISRedLetterWords
-Feature=StrongsNumbers
-!
-
-../../utilities/osis2mod osis/modules/ osisReference.xml -z 2>&1 | grep -v \$Rev
-
-cd osis && ../../osistest OSISReference

Copied: trunk/tests/testsuite/osis_basic.good (from rev 3433, trunk/tests/testsuite/osis.good)
===================================================================
--- trunk/tests/testsuite/osis_basic.good	                        (rev 0)
+++ trunk/tests/testsuite/osis_basic.good	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,124 @@
+SUCCESS: ../../utilities/osis2mod: has finished its work and will now rest
+Key:
+Psalms 3:1
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen12" type="section"/> <title canonical="true" type="psalm">A Psalm of David, when he fled from Absalom his son.</title> <div sID="gen13" type="x-p"/> <lg sID="gen14"/> 
+-------
+Rendered Header:
+ <h3 class="title psalm">A Psalm of David, when he fled from Absalom his son.</h3>
+
+<br />
+ 
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+<span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
+
+-------
+-------
+
+Key:
+Mark 1:14
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+-------
+Rendered Header:
+ <h3 class="title">The Beginning of the Ministry of Jesus</h3>
+
+<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+
+<br />
+
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ Now after that John was put in prison, Jesus came into Galilee, preaching the gospel of the kingdom of God, 
+-------
+-------
+
+
+Whitespace tests around headings:
+
+
+ <h1 class="bookHeader">Old Testament</h1>
+
+ <h1 class="bookHeader main">THE FIRST BOOK OF MOSES CALLED GENESIS</h1>
+
+ <h1 class="bookHeader">Introduction and Outline</h1>
+
+<br />
+This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows: <br />
+<br />
+<ul>
+ 	<li><sup>1</sup>Creation of Heaven and Earth, 1:1-2:4a</li>
+	<li><sup>2</sup>Creation of Man and Woman, 2:4b-25</li>
+	<li><sub>3</sub>Fall, 3:1-24</li>
+	<li>...</li>
+</ul>
+ <br />
+Tables work like this: <table><tbody>
+ 	<tr> <td><b>Column 1 Label</b></td> <td><b>Column 2 Label</b></td> </tr>
+ 	<tr> <td>Column 1, Row 1</td> <td>Column 2, Row 1</td> </tr>
+ 	<tr> <td>Column 1, Row 2</td> <td>Column 2, Row 2</td> </tr>
+ </tbody></table>
+<br />
+
+  <h2 class="chapterHeader">From Creation to Abraham (1:1–11:9)</h2>
+
+
+ <h3 class="title">Creation of the Heavens and the Earth</h3>
+
+<br />
+
+[ Genesis 1:1 ]  In the beginning God created the heaven and the earth.  <br />
+
+<br />
+
+[ Genesis 1:2 ] Text of verse 2.

Copied: trunk/tests/testsuite/osis_basic.sh (from rev 3433, trunk/tests/testsuite/osis.sh)
===================================================================
--- trunk/tests/testsuite/osis_basic.sh	                        (rev 0)
+++ trunk/tests/testsuite/osis_basic.sh	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+rm -rf tmp/osis_basic/
+mkdir -p tmp/osis_basic/mods.d
+mkdir -p tmp/osis_basic/modules
+
+cat > tmp/osis_basic/mods.d/osisreference.conf <<!
+[OSISReference]
+DataPath=./modules/
+ModDrv=zText
+Encoding=UTF-8
+BlockType=BOOK
+CompressType=ZIP
+SourceType=OSIS
+Lang=en
+GlobalOptionFilter=OSISStrongs
+GlobalOptionFilter=OSISMorph
+GlobalOptionFilter=OSISFootnotes
+GlobalOptionFilter=OSISHeadings
+GlobalOptionFilter=OSISRedLetterWords
+Feature=StrongsNumbers
+!
+
+../../utilities/osis2mod tmp/osis_basic/modules/ osisReference.xml -z 2>&1 | grep -v \$Rev
+
+cd tmp/osis_basic && ../../../osistest OSISReference

Copied: trunk/tests/testsuite/osis_mod2zmod.good (from rev 3433, trunk/tests/testsuite/osis.good)
===================================================================
--- trunk/tests/testsuite/osis_mod2zmod.good	                        (rev 0)
+++ trunk/tests/testsuite/osis_mod2zmod.good	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,124 @@
+SUCCESS: ../../utilities/osis2mod: has finished its work and will now rest
+Key:
+Psalms 3:1
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen12" type="section"/> <title canonical="true" type="psalm">A Psalm of David, when he fled from Absalom his son.</title> <div sID="gen13" type="x-p"/> <lg sID="gen14"/> 
+-------
+Rendered Header:
+ <h3 class="title psalm">A Psalm of David, when he fled from Absalom his son.</h3>
+
+<br />
+ 
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+<span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
+
+-------
+-------
+
+Key:
+Mark 1:14
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+-------
+Rendered Header:
+ <h3 class="title">The Beginning of the Ministry of Jesus</h3>
+
+<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+
+<br />
+
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ Now after that John was put in prison, Jesus came into Galilee, preaching the gospel of the kingdom of God, 
+-------
+-------
+
+
+Whitespace tests around headings:
+
+
+ <h1 class="bookHeader">Old Testament</h1>
+
+ <h1 class="bookHeader main">THE FIRST BOOK OF MOSES CALLED GENESIS</h1>
+
+ <h1 class="bookHeader">Introduction and Outline</h1>
+
+<br />
+This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows: <br />
+<br />
+<ul>
+ 	<li><sup>1</sup>Creation of Heaven and Earth, 1:1-2:4a</li>
+	<li><sup>2</sup>Creation of Man and Woman, 2:4b-25</li>
+	<li><sub>3</sub>Fall, 3:1-24</li>
+	<li>...</li>
+</ul>
+ <br />
+Tables work like this: <table><tbody>
+ 	<tr> <td><b>Column 1 Label</b></td> <td><b>Column 2 Label</b></td> </tr>
+ 	<tr> <td>Column 1, Row 1</td> <td>Column 2, Row 1</td> </tr>
+ 	<tr> <td>Column 1, Row 2</td> <td>Column 2, Row 2</td> </tr>
+ </tbody></table>
+<br />
+
+  <h2 class="chapterHeader">From Creation to Abraham (1:1–11:9)</h2>
+
+
+ <h3 class="title">Creation of the Heavens and the Earth</h3>
+
+<br />
+
+[ Genesis 1:1 ]  In the beginning God created the heaven and the earth.  <br />
+
+<br />
+
+[ Genesis 1:2 ] Text of verse 2.

Added: trunk/tests/testsuite/osis_mod2zmod.sh
===================================================================
--- trunk/tests/testsuite/osis_mod2zmod.sh	                        (rev 0)
+++ trunk/tests/testsuite/osis_mod2zmod.sh	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+rm -rf tmp/osis_mod2zmod/
+mkdir -p tmp/osis_mod2zmod/mods.d
+mkdir -p tmp/osis_mod2zmod/modules
+mkdir -p tmp/osis_mod2zmod/zmodules
+
+cat > tmp/osis_mod2zmod/mods.d/osisreference.conf <<!
+[OSISReference]
+DataPath=./modules/
+ModDrv=RawText
+#ModDrv=zText
+#CipherKey=abc123
+Encoding=UTF-8
+BlockType=BOOK
+CompressType=ZIP
+SourceType=OSIS
+Lang=en
+GlobalOptionFilter=OSISStrongs
+GlobalOptionFilter=OSISMorph
+GlobalOptionFilter=OSISFootnotes
+GlobalOptionFilter=OSISHeadings
+GlobalOptionFilter=OSISRedLetterWords
+Feature=StrongsNumbers
+!
+
+cat > tmp/osis_mod2zmod/mods.d/zosisreference.conf <<!
+[zOSISReference]
+DataPath=./zmodules/
+#ModDrv=RawText
+ModDrv=zText
+CipherKey=abc123
+Encoding=UTF-8
+BlockType=BOOK
+CompressType=ZIP
+SourceType=OSIS
+Lang=en
+GlobalOptionFilter=OSISStrongs
+GlobalOptionFilter=OSISMorph
+GlobalOptionFilter=OSISFootnotes
+GlobalOptionFilter=OSISHeadings
+GlobalOptionFilter=OSISRedLetterWords
+Feature=StrongsNumbers
+!
+
+../../utilities/osis2mod tmp/osis_mod2zmod/modules/ osisReference.xml 2>&1 | grep -v \$Rev
+
+cp osis_basic.good osis_mod2zmod.good
+cd tmp/osis_mod2zmod
+../../../../utilities/mod2zmod OSISReference zmodules/ 4 2 0 abc123 > /dev/null 2>&1
+../../../osistest zOSISReference


Property changes on: trunk/tests/testsuite/osis_mod2zmod.sh
___________________________________________________________________
Added: svn:executable
   + *

Copied: trunk/tests/testsuite/osis_osis2modcipher.good (from rev 3433, trunk/tests/testsuite/osis.good)
===================================================================
--- trunk/tests/testsuite/osis_osis2modcipher.good	                        (rev 0)
+++ trunk/tests/testsuite/osis_osis2modcipher.good	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,124 @@
+SUCCESS: ../../utilities/osis2mod: has finished its work and will now rest
+Key:
+Psalms 3:1
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen12" type="section"/> <title canonical="true" type="psalm">A Psalm of David, when he fled from Absalom his son.</title> <div sID="gen13" type="x-p"/> <lg sID="gen14"/> 
+-------
+Rendered Header:
+ <h3 class="title psalm">A Psalm of David, when he fled from Absalom his son.</h3>
+
+<br />
+ 
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ <span class="line indent0"><span class="divineName">Lord</span>, how are they increased that trouble me!</span><br />
+<span class="line indent0">many <span class="transChange transChange-added">are</span> they that rise up against me.</span><br />
+
+-------
+-------
+
+Key:
+Mark 1:14
+-------
+Preverse Header 0:
+Raw:
+<div sID="gen22" type="section"/> <title>The Beginning of the Ministry of Jesus</title> <title type="parallel">(<reference osisRef="Matt.4.12-Matt.4.22">Matt 4:12–22</reference>; <reference osisRef="Luke.4.14">Luke 4:14</reference>, <reference osisRef="Luke.4.15">15</reference>; <reference osisRef="Luke.5.1-Luke.5.11">5:1-11</reference>) </title> <div sID="gen23" type="x-p"/> 
+-------
+Rendered Header:
+ <h3 class="title">The Beginning of the Ministry of Jesus</h3>
+
+<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+
+<br />
+
+-------
+CSS:
+		.divineName { font-variant: small-caps; }
+		.wordsOfJesus { color: red; }
+		.transChange { font-style: italic;}
+		.transChange.transChange-supplied { font-style: italic;}
+		.transChange.transChange-added { font-style: italic;}
+		.transChange.transChange-tenseChange::before { content: '*';}
+		.transChange:lang(zh) { font-style: normal; text-decoration : dotted underline;}
+		.overline        { text-decoration: overline; }
+		.indent1         { margin-left: 10px }
+		.indent2         { margin-left: 20px }
+		.indent3         { margin-left: 30px }
+		.indent4         { margin-left: 40px }
+		abbr { &:hover{ &:before{ content: attr(title) } } }
+		.small-caps { font-variant: small-caps; }
+		.selah { text-align: right; width: 50%; margin: 0; padding: 0; }
+		.acrostic { text-align: center; }
+		.colophon {font-style: italic; font-size=small; display:block;}
+		.rdg { font-style: italic;}
+		.catchWord {font-style: bold;}
+	
+-------
+RenderText:
+ Now after that John was put in prison, Jesus came into Galilee, preaching the gospel of the kingdom of God, 
+-------
+-------
+
+
+Whitespace tests around headings:
+
+
+ <h1 class="bookHeader">Old Testament</h1>
+
+ <h1 class="bookHeader main">THE FIRST BOOK OF MOSES CALLED GENESIS</h1>
+
+ <h1 class="bookHeader">Introduction and Outline</h1>
+
+<br />
+This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows: <br />
+<br />
+<ul>
+ 	<li><sup>1</sup>Creation of Heaven and Earth, 1:1-2:4a</li>
+	<li><sup>2</sup>Creation of Man and Woman, 2:4b-25</li>
+	<li><sub>3</sub>Fall, 3:1-24</li>
+	<li>...</li>
+</ul>
+ <br />
+Tables work like this: <table><tbody>
+ 	<tr> <td><b>Column 1 Label</b></td> <td><b>Column 2 Label</b></td> </tr>
+ 	<tr> <td>Column 1, Row 1</td> <td>Column 2, Row 1</td> </tr>
+ 	<tr> <td>Column 1, Row 2</td> <td>Column 2, Row 2</td> </tr>
+ </tbody></table>
+<br />
+
+  <h2 class="chapterHeader">From Creation to Abraham (1:1–11:9)</h2>
+
+
+ <h3 class="title">Creation of the Heavens and the Earth</h3>
+
+<br />
+
+[ Genesis 1:1 ]  In the beginning God created the heaven and the earth.  <br />
+
+<br />
+
+[ Genesis 1:2 ] Text of verse 2.

Added: trunk/tests/testsuite/osis_osis2modcipher.sh
===================================================================
--- trunk/tests/testsuite/osis_osis2modcipher.sh	                        (rev 0)
+++ trunk/tests/testsuite/osis_osis2modcipher.sh	2016-08-17 18:17:13 UTC (rev 3434)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+rm -rf tmp/osis_osis2modcipher/
+mkdir -p tmp/osis_osis2modcipher/mods.d
+mkdir -p tmp/osis_osis2modcipher/modules
+
+cat > tmp/osis_osis2modcipher/mods.d/osisreference.conf <<!
+[OSISReference]
+DataPath=./modules/
+ModDrv=zText
+CipherKey=abc123
+Encoding=UTF-8
+BlockType=BOOK
+CompressType=ZIP
+SourceType=OSIS
+Lang=en
+GlobalOptionFilter=OSISStrongs
+GlobalOptionFilter=OSISMorph
+GlobalOptionFilter=OSISFootnotes
+GlobalOptionFilter=OSISHeadings
+GlobalOptionFilter=OSISRedLetterWords
+Feature=StrongsNumbers
+!
+
+../../utilities/osis2mod tmp/osis_osis2modcipher/modules/ osisReference.xml -z -c abc123 2>&1 | grep -v \$Rev|grep -v "with phrase"
+
+cp osis_basic.good osis_osis2modcipher.good
+cd tmp/osis_osis2modcipher
+../../../osistest OSISReference


Property changes on: trunk/tests/testsuite/osis_osis2modcipher.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/utilities/Makefile.am
===================================================================
--- trunk/utilities/Makefile.am	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/utilities/Makefile.am	2016-08-17 18:17:13 UTC (rev 3434)
@@ -5,7 +5,7 @@
 AM_CPPFLAGS += -I$(top_srcdir)/include/internal/regex
 endif
 LDADD = $(top_builddir)/lib/libsword.la
-noinst_PROGRAMS = cipherraw lexdump \
+noinst_PROGRAMS = lexdump \
 	stepdump step2vpl gbfidx modwrite addvs  \
 	addgb genbookutil treeidxutil addld  
 
@@ -23,7 +23,6 @@
 bin_PROGRAMS += $(ZLIBPROG) 
 
 
-cipherraw_SOURCES = cipherraw.cpp
 lexdump_SOURCES = lexdump.c
 lexdump_LDADD = -lstdc++
 mkfastmod_SOURCES = mkfastmod.cpp

Deleted: trunk/utilities/cipherraw.cpp
===================================================================
--- trunk/utilities/cipherraw.cpp	2016-08-17 13:25:41 UTC (rev 3433)
+++ trunk/utilities/cipherraw.cpp	2016-08-17 18:17:13 UTC (rev 3434)
@@ -1,131 +0,0 @@
-/******************************************************************************
- *
- *  cipherraw.cpp -	Utility to encipher a raw (uncompressed) module
- *
- * $Id$
- *
- * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifdef _MSC_VER
-	#pragma warning( disable: 4251 )
-	#pragma warning( disable: 4996 )
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#ifndef __GNUC__
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <filemgr.h>
-#include <swcipher.h>
-#include <versekey.h>
-#include <rawverse.h>
-#include <swbuf.h>
-
-#ifndef NO_SWORD_NAMESPACE
-using namespace sword;
-#endif
-
-int main(int argc, char **argv) {
-	SWCipher *zobj;
-	VerseKey key;
-	RawVerse *rawdrv;
-	int ofd[2], oxfd[2];
-	long tmpoff = 0, offset, loffset = 0, lzoffset = 0;
-	unsigned short size, lsize = 0, lzsize;
-	char *tmpbuf;
-	
-	if (argc != 3) {
-		fprintf(stderr, "usage: %s <datapath> \"<key>\"\n", argv[0]);
-		exit(1);
-	}
-
-	rawdrv = new RawVerse(argv[1]);
-	zobj = new SWCipher((unsigned char *)argv[2]);
-
-	tmpbuf = new char [ strlen(argv[1]) + 11 ];
-	sprintf(tmpbuf, "%sot.zzz", argv[1]);
-	ofd[0] = FileMgr::createPathAndFile(tmpbuf);
-	sprintf(tmpbuf, "%sot.zzz.vss", argv[1]);
-	oxfd[0] = FileMgr::createPathAndFile(tmpbuf);
-	sprintf(tmpbuf, "%snt.zzz", argv[1]);
-	ofd[1] = FileMgr::createPathAndFile(tmpbuf);
-	sprintf(tmpbuf, "%snt.zzz.vss", argv[1]);
-	oxfd[1] = FileMgr::createPathAndFile(tmpbuf);
-
-	delete [] tmpbuf;
-
-	printf("\n");
-	write(oxfd[0], &lzoffset, 4);
-	write(oxfd[0], &lzsize, 2);
-	write(oxfd[1], &lzoffset, 4);
-	write(oxfd[1], &lzsize, 2);
-
-	key.setAutoNormalize(false);
-	key.setIntros(true);
-	for (key.setIndex(0); (!key.popError()); key++) {
-		rawdrv->findOffset(key.getTestament(), key.getIndex(), &offset, &size);
-		printf("%s: OLD offset: %ld; size: %d\n", (const char *)key, offset, size);
-
-		if ((offset == loffset) && (size == lsize)) {
-			printf("using previous offset,size %d\n", size);
-			offset = lseek(oxfd[key.getTestament() - 1], 0, SEEK_CUR);
-			printf("%ld %ld %d \n", offset, lzoffset, lzsize);
-			write(oxfd[key.getTestament() - 1], &lzoffset, 4);
-			write(oxfd[key.getTestament() - 1], &lzsize, 2);
-		}
-		else {
-			lsize   = size;
-			loffset = offset;
-
-			if (size) {
-				SWBuf tmpbuf;
-				rawdrv->readText(key.getTestament(), offset, size, tmpbuf);
-				zobj->Buf(tmpbuf.c_str(), size);
-				unsigned long ulSize = size;
-				zobj->cipherBuf(&ulSize);
-				size = (unsigned int)ulSize;
-			}
-			offset = lseek(ofd[key.getTestament() - 1], 0, SEEK_CUR);
-			tmpoff = lseek(oxfd[key.getTestament() - 1], 0, SEEK_CUR);
-			printf("%s: (%ld) NEW offset: %ld; size: %d\n", (const char *)key, tmpoff, offset, size);
-			write(oxfd[key.getTestament() - 1], &offset, 4);
-			unsigned long ulSize = size;
-			if (size) 
-				write(ofd[key.getTestament() - 1], zobj->cipherBuf(&ulSize), size);
-			size = (unsigned int)ulSize;
-			lzoffset = offset;
-			write(oxfd[key.getTestament() - 1], &size, 2);
-			lzsize = size;
-		}
-	}
-	delete zobj;
-	close(ofd[0]);
-	close(oxfd[0]);
-	close(ofd[1]);
-	close(oxfd[1]);
-	return 0;
-}




More information about the sword-cvs mailing list