swordjs
Version:
swordjs - access modules from crosswire.org/sword in JS
1,373 lines (1,285 loc) • 117 kB
JavaScript
// Generated by CoffeeScript 1.9.1
(function() {
var bcv_parser;
bcv_parser = require("../../js/sw_bcv_parser.js").bcv_parser;
describe("Parsing", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.options.osis_compaction_strategy = "b";
return p.options.sequence_combination_strategy = "combine";
});
it("should round-trip OSIS references", function() {
var bc, bcv, bcv_range, book, books, i, len, results;
p.set_options({
osis_compaction_strategy: "bc"
});
books = ["Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", "Zeph", "Hag", "Zech", "Mal", "Matt", "Mark", "Luke", "John", "Acts", "Rom", "1Cor", "2Cor", "Gal", "Eph", "Phil", "Col", "1Thess", "2Thess", "1Tim", "2Tim", "Titus", "Phlm", "Heb", "Jas", "1Pet", "2Pet", "1John", "2John", "3John", "Jude", "Rev"];
results = [];
for (i = 0, len = books.length; i < len; i++) {
book = books[i];
bc = book + ".1";
bcv = bc + ".1";
bcv_range = bcv + "-" + bc + ".2";
expect(p.parse(bc).osis()).toEqual(bc);
expect(p.parse(bcv).osis()).toEqual(bcv);
results.push(expect(p.parse(bcv_range).osis()).toEqual(bcv_range));
}
return results;
});
it("should round-trip OSIS Apocrypha references", function() {
var bc, bcv, bcv_range, book, books, i, j, len, len1, results;
p.set_options({
osis_compaction_strategy: "bc",
ps151_strategy: "b"
});
p.include_apocrypha(true);
books = ["Tob", "Jdt", "GkEsth", "Wis", "Sir", "Bar", "PrAzar", "Sus", "Bel", "SgThree", "EpJer", "1Macc", "2Macc", "3Macc", "4Macc", "1Esd", "2Esd", "PrMan", "Ps151"];
for (i = 0, len = books.length; i < len; i++) {
book = books[i];
bc = book + ".1";
bcv = bc + ".1";
bcv_range = bcv + "-" + bc + ".2";
expect(p.parse(bc).osis()).toEqual(bc);
expect(p.parse(bcv).osis()).toEqual(bcv);
expect(p.parse(bcv_range).osis()).toEqual(bcv_range);
}
p.set_options({
ps151_strategy: "bc"
});
expect(p.parse("Ps151.1").osis()).toEqual("Ps.151");
expect(p.parse("Ps151.1.1").osis()).toEqual("Ps.151.1");
expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual("Ps.151.1-Ps.151.2");
p.include_apocrypha(false);
results = [];
for (j = 0, len1 = books.length; j < len1; j++) {
book = books[j];
bc = book + ".1";
results.push(expect(p.parse(bc).osis()).toEqual(""));
}
return results;
});
return it("should handle a preceding character", function() {
expect(p.parse(" Gen 1").osis()).toEqual("Gen.1");
expect(p.parse("Matt5John3").osis()).toEqual("Matt.5,John.3");
expect(p.parse("1Ps 1").osis()).toEqual("");
return expect(p.parse("11Sam 1").osis()).toEqual("");
});
});
describe("Localized book Gen (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Gen (sw)", function() {
expect(p.parse("Kitabu cha Kwanza cha Musa 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Mwanzo 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Mwa 1:1").osis()).toEqual("Gen.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA KWANZA CHA MUSA 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("MWANZO 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("MWA 1:1").osis()).toEqual("Gen.1.1")
;
return true;
});
});
describe("Localized book Exod (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Exod (sw)", function() {
expect(p.parse("Kitabu cha Pili cha Musa 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Kutoka 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Kut 1:1").osis()).toEqual("Exod.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA PILI CHA MUSA 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("KUTOKA 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("KUT 1:1").osis()).toEqual("Exod.1.1")
;
return true;
});
});
describe("Localized book Bel (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Bel (sw)", function() {
expect(p.parse("Danieli na Makuhani wa Beli 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1")
;
return true;
});
});
describe("Localized book Lev (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Lev (sw)", function() {
expect(p.parse("Kitabu cha Tatu cha Musa 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Mambo ya Walawi 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Walawi 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Law 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Wal 1:1").osis()).toEqual("Lev.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA TATU CHA MUSA 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("MAMBO YA WALAWI 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("WALAWI 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LAW 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("WAL 1:1").osis()).toEqual("Lev.1.1")
;
return true;
});
});
describe("Localized book Num (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Num (sw)", function() {
expect(p.parse("Kitabu cha Nne cha Musa 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Hesabu 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Hes 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA NNE CHA MUSA 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("HESABU 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("HES 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1")
;
return true;
});
});
describe("Localized book Sir (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Sir (sw)", function() {
expect(p.parse("Yoshua bin Sira 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sira 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("YbS 1:1").osis()).toEqual("Sir.1.1")
;
return true;
});
});
describe("Localized book Wis (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Wis (sw)", function() {
expect(p.parse("Hekima ya Solomoni 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Hekima 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Hek 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1")
;
return true;
});
});
describe("Localized book Lam (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Lam (sw)", function() {
expect(p.parse("Maombolezo ya Yeremia 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Maombolezo 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Mao 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Omb 1:1").osis()).toEqual("Lam.1.1")
p.include_apocrypha(false)
expect(p.parse("MAOMBOLEZO YA YEREMIA 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("MAOMBOLEZO 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("MAO 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("OMB 1:1").osis()).toEqual("Lam.1.1")
;
return true;
});
});
describe("Localized book EpJer (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: EpJer (sw)", function() {
expect(p.parse("Barua ya Yeremia 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1")
;
return true;
});
});
describe("Localized book Rev (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Rev (sw)", function() {
expect(p.parse("Ufunua wa Yohana 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Ufunuo wa Yohana 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Ufunuo wa Yohane 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Ufunuo 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Ufu 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Uf 1:1").osis()).toEqual("Rev.1.1")
p.include_apocrypha(false)
expect(p.parse("UFUNUA WA YOHANA 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("UFUNUO WA YOHANA 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("UFUNUO WA YOHANE 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("UFUNUO 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("UFU 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("UF 1:1").osis()).toEqual("Rev.1.1")
;
return true;
});
});
describe("Localized book PrMan (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: PrMan (sw)", function() {
expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1")
;
return true;
});
});
describe("Localized book Deut (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Deut (sw)", function() {
expect(p.parse("Kitabu cha Tano cha Musa 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Kumbukumbu la Sheria 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Kumbukumbu la Torati 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Kumbukumbu 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Kumb 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Kum 1:1").osis()).toEqual("Deut.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA TANO CHA MUSA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("KUMBUKUMBU LA SHERIA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("KUMBUKUMBU LA TORATI 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("KUMBUKUMBU 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("KUMB 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("KUM 1:1").osis()).toEqual("Deut.1.1")
;
return true;
});
});
describe("Localized book Josh (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Josh (sw)", function() {
expect(p.parse("Yoshua 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Yos 1:1").osis()).toEqual("Josh.1.1")
p.include_apocrypha(false)
expect(p.parse("YOSHUA 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("YOS 1:1").osis()).toEqual("Josh.1.1")
;
return true;
});
});
describe("Localized book Judg (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Judg (sw)", function() {
expect(p.parse("Waamuzi 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Waam 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Amu 1:1").osis()).toEqual("Judg.1.1")
p.include_apocrypha(false)
expect(p.parse("WAAMUZI 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("WAAM 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("AMU 1:1").osis()).toEqual("Judg.1.1")
;
return true;
});
});
describe("Localized book Ruth (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Ruth (sw)", function() {
expect(p.parse("Kitabu cha Ruthi 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Kitabu cha Ruthu 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Ruthi 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Ruthu 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA RUTHI 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("KITABU CHA RUTHU 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("RUTHI 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("RUTHU 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1")
;
return true;
});
});
describe("Localized book 1Esd (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 1Esd (sw)", function() {
expect(p.parse("Kitabu cha Kwanza cha Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Kwanza Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1. Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("I. Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1 Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("I Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1")
;
return true;
});
});
describe("Localized book 2Esd (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 2Esd (sw)", function() {
expect(p.parse("Kitabu cha Pili cha Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("Pili Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("II. Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2. Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("II Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2 Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1")
;
return true;
});
});
describe("Localized book Isa (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Isa (sw)", function() {
expect(p.parse("Isaya 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Is 1:1").osis()).toEqual("Isa.1.1")
p.include_apocrypha(false)
expect(p.parse("ISAYA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("IS 1:1").osis()).toEqual("Isa.1.1")
;
return true;
});
});
describe("Localized book 2Sam (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 2Sam (sw)", function() {
expect(p.parse("Kitabu cha Pili cha Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Pili Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Pili Samweli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. Samweli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. Samweli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II Samweli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Samueli II 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 Samueli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 Samweli 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Pili Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA PILI CHA SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("PILI SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("PILI SAMWELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. SAMWELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. SAMWELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II SAMWELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("SAMUELI II 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 SAMUELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 SAMWELI 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("PILI SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1")
;
return true;
});
});
describe("Localized book 1Sam (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 1Sam (sw)", function() {
expect(p.parse("Kitabu cha Kwanza cha Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Kwanza Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Kwanza Samweli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. Samweli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. Samweli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Kwanza Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 Samweli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I Samueli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I Samweli 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Samueli I 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA KWANZA CHA SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("KWANZA SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("KWANZA SAMWELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. SAMWELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. SAMWELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("KWANZA SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 SAMWELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I SAMUELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I SAMWELI 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("SAMUELI I 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1")
;
return true;
});
});
describe("Localized book 2Kgs (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 2Kgs (sw)", function() {
expect(p.parse("Kitabu cha Pili cha Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Pili Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Wafalme II 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Wafalme 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Pili Fal 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. Fal 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. Fal 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II Fal 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Fal 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA PILI CHA WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("PILI WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("WAFALME II 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 WAFALME 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("PILI FAL 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. FAL 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. FAL 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II FAL 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 FAL 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1")
;
return true;
});
});
describe("Localized book 1Kgs (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 1Kgs (sw)", function() {
expect(p.parse("Kitabu cha Kwanza cha Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Kwanza Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Kwanza Fal 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I Wafalme 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Wafalme I 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. Fal 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. Fal 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Fal 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I Fal 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA KWANZA CHA WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("KWANZA WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("KWANZA FAL 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I WAFALME 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("WAFALME I 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. FAL 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. FAL 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 FAL 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I FAL 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1")
;
return true;
});
});
describe("Localized book 2Chr (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 2Chr (sw)", function() {
expect(p.parse("Pili Mambo ya Nyakati 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Mambo ya Nyakati 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Mambo ya Nyakati 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Mambo ya Nyakati 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Mambo ya Nyakati II 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Mambo ya Nyakati 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Pili Nya 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Nya 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Nya 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Nya 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Nya 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1")
p.include_apocrypha(false)
expect(p.parse("PILI MAMBO YA NYAKATI 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. MAMBO YA NYAKATI 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. MAMBO YA NYAKATI 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II MAMBO YA NYAKATI 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("MAMBO YA NYAKATI II 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 MAMBO YA NYAKATI 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("PILI NYA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. NYA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. NYA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II NYA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 NYA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1")
;
return true;
});
});
describe("Localized book 1Chr (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: 1Chr (sw)", function() {
expect(p.parse("Kwanza Mambo ya Nyakati 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Mambo ya Nyakati 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Mambo ya Nyakati 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Mambo ya Nyakati 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Mambo ya Nyakati 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Mambo ya Nyakati I 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Kwanza Nya 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Nya 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Nya 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Nya 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Nya 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1")
p.include_apocrypha(false)
expect(p.parse("KWANZA MAMBO YA NYAKATI 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. MAMBO YA NYAKATI 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. MAMBO YA NYAKATI 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 MAMBO YA NYAKATI 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I MAMBO YA NYAKATI 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("MAMBO YA NYAKATI I 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("KWANZA NYA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. NYA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. NYA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 NYA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I NYA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1")
;
return true;
});
});
describe("Localized book Ezra (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Ezra (sw)", function() {
expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1")
p.include_apocrypha(false)
expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1")
;
return true;
});
});
describe("Localized book Neh (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Neh (sw)", function() {
expect(p.parse("Nehemia 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1")
p.include_apocrypha(false)
expect(p.parse("NEHEMIA 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1")
;
return true;
});
});
describe("Localized book GkEsth (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: GkEsth (sw)", function() {
expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1")
;
return true;
});
});
describe("Localized book Esth (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Esth (sw)", function() {
expect(p.parse("Esther 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("Esta 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1")
p.include_apocrypha(false)
expect(p.parse("ESTHER 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("ESTA 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1")
expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1")
;
return true;
});
});
describe("Localized book Job (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Job (sw)", function() {
expect(p.parse("Kitabu cha Ayubu 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Kitabu cha Yobu 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Ayubu 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Yobu 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Ayu 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("Yob 1:1").osis()).toEqual("Job.1.1")
p.include_apocrypha(false)
expect(p.parse("KITABU CHA AYUBU 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("KITABU CHA YOBU 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("AYUBU 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("YOBU 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("AYU 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1")
expect(p.parse("YOB 1:1").osis()).toEqual("Job.1.1")
;
return true;
});
});
describe("Localized book Ps (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Ps (sw)", function() {
expect(p.parse("Zaburi 1:1").osis()).toEqual("Ps.1.1")
expect(p.parse("Zab 1:1").osis()).toEqual("Ps.1.1")
expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1")
p.include_apocrypha(false)
expect(p.parse("ZABURI 1:1").osis()).toEqual("Ps.1.1")
expect(p.parse("ZAB 1:1").osis()).toEqual("Ps.1.1")
expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1")
;
return true;
});
});
describe("Localized book PrAzar (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: PrAzar (sw)", function() {
expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1")
;
return true;
});
});
describe("Localized book Prov (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Prov (sw)", function() {
expect(p.parse("Methali 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("Mithali 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("Meth 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("Mith 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("Mit 1:1").osis()).toEqual("Prov.1.1")
p.include_apocrypha(false)
expect(p.parse("METHALI 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("MITHALI 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("METH 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("MITH 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1")
expect(p.parse("MIT 1:1").osis()).toEqual("Prov.1.1")
;
return true;
});
});
describe("Localized book Eccl (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Eccl (sw)", function() {
expect(p.parse("Mhubiri 1:1").osis()).toEqual("Eccl.1.1")
expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1")
expect(p.parse("Mhu 1:1").osis()).toEqual("Eccl.1.1")
p.include_apocrypha(false)
expect(p.parse("MHUBIRI 1:1").osis()).toEqual("Eccl.1.1")
expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1")
expect(p.parse("MHU 1:1").osis()).toEqual("Eccl.1.1")
;
return true;
});
});
describe("Localized book SgThree (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: SgThree (sw)", function() {
expect(p.parse("Wimbo wa Vijana Watatu 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1")
;
return true;
});
});
describe("Localized book Song (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Song (sw)", function() {
expect(p.parse("Wimbo Ulio Bora 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("Wimbo Bora 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("Wim 1:1").osis()).toEqual("Song.1.1")
p.include_apocrypha(false)
expect(p.parse("WIMBO ULIO BORA 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("WIMBO BORA 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1")
expect(p.parse("WIM 1:1").osis()).toEqual("Song.1.1")
;
return true;
});
});
describe("Localized book Jer (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Jer (sw)", function() {
expect(p.parse("Yeremia 1:1").osis()).toEqual("Jer.1.1")
expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1")
expect(p.parse("Yer 1:1").osis()).toEqual("Jer.1.1")
p.include_apocrypha(false)
expect(p.parse("YEREMIA 1:1").osis()).toEqual("Jer.1.1")
expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1")
expect(p.parse("YER 1:1").osis()).toEqual("Jer.1.1")
;
return true;
});
});
describe("Localized book Ezek (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Ezek (sw)", function() {
expect(p.parse("Ezekieli 1:1").osis()).toEqual("Ezek.1.1")
expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1")
expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1")
p.include_apocrypha(false)
expect(p.parse("EZEKIELI 1:1").osis()).toEqual("Ezek.1.1")
expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1")
expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1")
;
return true;
});
});
describe("Localized book Dan (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Dan (sw)", function() {
expect(p.parse("Danieli 1:1").osis()).toEqual("Dan.1.1")
expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1")
p.include_apocrypha(false)
expect(p.parse("DANIELI 1:1").osis()).toEqual("Dan.1.1")
expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1")
;
return true;
});
});
describe("Localized book Hos (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Hos (sw)", function() {
expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1")
expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1")
p.include_apocrypha(false)
expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1")
expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1")
;
return true;
});
});
describe("Localized book Joel (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Joel (sw)", function() {
expect(p.parse("Yoeli 1:1").osis()).toEqual("Joel.1.1")
expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1")
expect(p.parse("Yoe 1:1").osis()).toEqual("Joel.1.1")
p.include_apocrypha(false)
expect(p.parse("YOELI 1:1").osis()).toEqual("Joel.1.1")
expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1")
expect(p.parse("YOE 1:1").osis()).toEqual("Joel.1.1")
;
return true;
});
});
describe("Localized book Amos (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Amos (sw)", function() {
expect(p.parse("Amosi 1:1").osis()).toEqual("Amos.1.1")
expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1")
expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1")
p.include_apocrypha(false)
expect(p.parse("AMOSI 1:1").osis()).toEqual("Amos.1.1")
expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1")
expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1")
;
return true;
});
});
describe("Localized book Obad (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Obad (sw)", function() {
expect(p.parse("Obadia 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("Ob 1:1").osis()).toEqual("Obad.1.1")
p.include_apocrypha(false)
expect(p.parse("OBADIA 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1")
expect(p.parse("OB 1:1").osis()).toEqual("Obad.1.1")
;
return true;
});
});
describe("Localized book Jonah (sw)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser;
p.set_options({
book_alone_strategy: "ignore",
book_sequence_strategy: "ignore",
osis_compaction_strategy: "bc",
captive_end_digits_strategy: "delete"
});
return p.include_apocrypha(true);
});
return it("should handle book: Jonah (sw)", function() {
expect(p.parse("Jonah 1:1").osi