diff options
author | Your Name <you@example.com> | 2020-11-10 08:29:20 -0500 |
---|---|---|
committer | Your Name <you@example.com> | 2020-11-10 08:29:20 -0500 |
commit | 41cdb2d5e3f8e5f08b4933cbb9693ee4a6908580 (patch) | |
tree | ab3e84c50fbe6ec6887e642edc87d867731c6a85 /testLibbible.cc | |
parent | a308af1cd84185989f1262ba66b01f6a9ceafa6a (diff) | |
download | libbible-41cdb2d5e3f8e5f08b4933cbb9693ee4a6908580.tar.gz libbible-41cdb2d5e3f8e5f08b4933cbb9693ee4a6908580.tar.bz2 libbible-41cdb2d5e3f8e5f08b4933cbb9693ee4a6908580.zip |
Fixed handling of paragraph symbol
Diffstat (limited to 'testLibbible.cc')
-rw-r--r-- | testLibbible.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/testLibbible.cc b/testLibbible.cc index b06a0bd..3850aa0 100644 --- a/testLibbible.cc +++ b/testLibbible.cc @@ -53,20 +53,20 @@ void TestLibbible::testGetModules(void) { libbible::uninstallMod(pair.first); } CPPUNIT_ASSERT(libbible::getModules().empty()); - libbible::installModFromZip("modules/ESV2011.zip"); + libbible::installModFromZip("modules/KJV.zip"); libbible::installModFromZip("modules/JPS.zip"); mods = libbible::getModules(); - CPPUNIT_ASSERT(mods.find("ESV2011") != mods.end()); - CPPUNIT_ASSERT(mods["ESV2011"].size() == 66); - CPPUNIT_ASSERT(mods["ESV2011"][7] == "Ruth"); - CPPUNIT_ASSERT(mods["ESV2011"][42] == "John"); + CPPUNIT_ASSERT(mods.find("KJV") != mods.end()); + CPPUNIT_ASSERT(mods["KJV"].size() == 66); + CPPUNIT_ASSERT(mods["KJV"][7] == "Ruth"); + CPPUNIT_ASSERT(mods["KJV"][42] == "John"); CPPUNIT_ASSERT(mods.find("JPS") != mods.end()); CPPUNIT_ASSERT(mods["JPS"].size() == 39); } void TestLibbible::testGetPassages(void) { - auto passages = libbible::getPassages("ESV2011", "Romans"); - CPPUNIT_ASSERT(passages[0].modName == "ESV2011"); + auto passages = libbible::getPassages("KJV", "Romans"); + CPPUNIT_ASSERT(passages[0].modName == "KJV"); CPPUNIT_ASSERT(passages[0].book == "Romans"); CPPUNIT_ASSERT(passages[0].bookShort == "Rom"); CPPUNIT_ASSERT(passages[0].chapterStart == 1); @@ -94,7 +94,7 @@ vector<pair<int, int>> getChapVerses(std::vector<libbible::text> text) { void TestLibbible::testGetText(void) { libbible::passage pass; - pass.modName = "ESV2011"; + pass.modName = "KJV"; pass.bookShort = "Matt"; pass.chapterStart = 3; pass.verseStart = 16; @@ -114,7 +114,7 @@ void TestLibbible::testGetText(void) { pair<int, int>(4, 7)}); CPPUNIT_ASSERT(chapVerses == shouldContain); libbible::passage pass2; - pass2.modName = "ESV2011"; + pass2.modName = "KJV"; pass2.book = "John"; pass2.chapterStart = 3; pass2.verseStart = 16; @@ -126,27 +126,27 @@ void TestLibbible::testGetText(void) { allText += tex.text; } //printf("Text is: `%s`\n", allText.c_str()); - CPPUNIT_ASSERT(allText == " “For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life. "); + CPPUNIT_ASSERT(allText == "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. "); - text = libbible::getText(libbible::passage{.modName = "ESV2011", .reference="John 3:3"}); + text = libbible::getText(libbible::passage{.modName = "KJV", .reference="John 3:3"}); allText.clear(); for(auto tex : text) { allText += tex.text; } //printf("Text is: `%s`\n", allText.c_str()); - CPPUNIT_ASSERT(allText == "Jesus answered him, “Truly, truly, I say to you, unless one is born again he cannot see the kingdom of God.” "); + CPPUNIT_ASSERT(allText == "Jesus answered and said unto him, Verily, verily, I say unto thee, Except a man be born again, he cannot see the kingdom of God. "); - text = libbible::getText(libbible::passage{.modName = "ESV2011", .reference="Gal 5:22-23"}); + text = libbible::getText(libbible::passage{.modName = "KJV", .reference="Gal 5:22-23"}); chapVerses = getChapVerses(text); shouldContain = vector<pair<int, int>>({pair<int, int>(5, 22), pair<int, int>(5, 23)}); CPPUNIT_ASSERT(chapVerses == shouldContain); - text = libbible::getText(libbible::passage{.modName = "ESV2011", .reference="1 cor 1:31-2:1"}); + text = libbible::getText(libbible::passage{.modName = "KJV", .reference="1 cor 1:31-2:1"}); chapVerses = getChapVerses(text); shouldContain = vector<pair<int, int>>({pair<int, int>(1, 31), pair<int, int>(2, 1)}); CPPUNIT_ASSERT(chapVerses == shouldContain); - text = libbible::getText(libbible::passage{.modName = "ESV2011", .reference="ps 14-15"}); + text = libbible::getText(libbible::passage{.modName = "KJV", .reference="ps 14-15"}); chapVerses = getChapVerses(text); shouldContain = vector<pair<int, int>>({pair<int, int>(14, 1), pair<int, int>(14, 2), |