swordjs
Version:
swordjs - access modules from crosswire.org/sword in JS
1,188 lines (1,127 loc) • 163 kB
JavaScript
// Generated by CoffeeScript 1.9.1
(function() {
var bcv_parser;
bcv_parser = require("../../js/tl_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 (tl)", 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 (tl)", function() {
expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Henesis 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1")
p.include_apocrypha(false)
expect(p.parse("GENESIS 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("HENESIS 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1")
;
return true;
});
});
describe("Localized book Exod (tl)", 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 (tl)", function() {
expect(p.parse("Exodus 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Exodo 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("Exo 1:1").osis()).toEqual("Exod.1.1")
p.include_apocrypha(false)
expect(p.parse("EXODUS 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("EXODO 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1")
expect(p.parse("EXO 1:1").osis()).toEqual("Exod.1.1")
;
return true;
});
});
describe("Localized book Bel (tl)", 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 (tl)", function() {
expect(p.parse("Si Bel at ang Dragon 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel at ang Dragon 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1")
;
return true;
});
});
describe("Localized book Lev (tl)", 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 (tl)", function() {
expect(p.parse("Lebitikus 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lebitico 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Levitico 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Leb 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1")
p.include_apocrypha(false)
expect(p.parse("LEBITIKUS 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEBITICO 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEVITICO 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEB 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1")
;
return true;
});
});
describe("Localized book Num (tl)", 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 (tl)", function() {
expect(p.parse("Mga Bilang 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Bamidbar 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Bemidbar 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Bil 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("MGA BILANG 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("BAMIDBAR 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("BEMIDBAR 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("BIL 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1")
;
return true;
});
});
describe("Localized book Sir (tl)", 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 (tl)", function() {
expect(p.parse("Ang Karunungan ni Jesus, Anak ni Sirac 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ang Karunungan ni Jesus Anak ni Sirac 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Karunungan ng Anak ni Sirac 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ecclesiasticus 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ekklesiastikus 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ekklesyastikus 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ecclesiastico 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ekklesiastiko 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ekklesyastiko 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Eklesiastikus 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Eklesyastikus 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Eclesiastico 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Eklesiastiko 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Eklesyastiko 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Siracidas 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Siracides 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirakidas 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirakides 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirácidas 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirácides 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirákidas 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirákides 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Siracida 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Siracide 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirakida 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirakide 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirácida 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirácide 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirákida 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirákide 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirach 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirakh 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirách 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirákh 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirac 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirak 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirác 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sirák 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1")
;
return true;
});
});
describe("Localized book Lam (tl)", 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 (tl)", function() {
expect(p.parse("Aklat ng Pananaghoy 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Aklat ng Pagtaghoy 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Mga Lamentasyon 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Mga Panaghoy 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Panaghoy 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Panag 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1")
p.include_apocrypha(false)
expect(p.parse("AKLAT NG PANANAGHOY 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("AKLAT NG PAGTAGHOY 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("MGA LAMENTASYON 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("MGA PANAGHOY 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("PANAGHOY 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("PANAG 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1")
;
return true;
});
});
describe("Localized book EpJer (tl)", 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 (tl)", function() {
expect(p.parse("Ang Liham ni Jeremias 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Liham ni Jeremias 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Lih Jer 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1")
;
return true;
});
});
describe("Localized book Rev (tl)", 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 (tl)", function() {
expect(p.parse("Apocalipsis ni Juan 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apokalipsis ni Juan 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Pahayag kay Juan 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apocalipsis 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apokalipsis 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Rebelasyon 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Pahayag 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Pah 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1")
p.include_apocrypha(false)
expect(p.parse("APOCALIPSIS NI JUAN 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APOKALIPSIS NI JUAN 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("PAHAYAG KAY JUAN 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APOCALIPSIS 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APOKALIPSIS 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("REBELASYON 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("PAHAYAG 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("PAH 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1")
;
return true;
});
});
describe("Localized book PrMan (tl)", 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 (tl)", function() {
expect(p.parse("Ang Panalangin ni Manases 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Panalangin ni Manases 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Dalangin ni Manases 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Dasal ni Manases 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1")
;
return true;
});
});
describe("Localized book Deut (tl)", 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 (tl)", function() {
expect(p.parse("Deuteronomiya 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronomiyo 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deyuteronomyo 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Diyuteronomyo 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronomia 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronomio 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronomya 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Dyuteronomyo 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronoma 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deuteronomi 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Dt 1:1").osis()).toEqual("Deut.1.1")
p.include_apocrypha(false)
expect(p.parse("DEUTERONOMIYA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMIYO 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEYUTERONOMYO 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DIYUTERONOMYO 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMIA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMIO 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMYA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DYUTERONOMYO 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMA 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTERONOMI 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DT 1:1").osis()).toEqual("Deut.1.1")
;
return true;
});
});
describe("Localized book Josh (tl)", 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 (tl)", function() {
expect(p.parse("Joshua 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Josue 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Josué 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("Jos 1:1").osis()).toEqual("Josh.1.1")
p.include_apocrypha(false)
expect(p.parse("JOSHUA 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("JOSUE 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("JOSUÉ 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1")
expect(p.parse("JOS 1:1").osis()).toEqual("Josh.1.1")
;
return true;
});
});
describe("Localized book Judg (tl)", 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 (tl)", function() {
expect(p.parse("Mga Hukom 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Hukom 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Huk 1:1").osis()).toEqual("Judg.1.1")
p.include_apocrypha(false)
expect(p.parse("MGA HUKOM 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("HUKOM 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("HUK 1:1").osis()).toEqual("Judg.1.1")
;
return true;
});
});
describe("Localized book Ruth (tl)", 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 (tl)", function() {
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("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 (tl)", 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 (tl)", function() {
expect(p.parse("Unang Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Una Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Unang Ezra 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("I. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1 Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("I Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Una 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("1 Esd 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1")
;
return true;
});
});
describe("Localized book 2Esd (tl)", 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 (tl)", function() {
expect(p.parse("Ikalawang Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("Ikalawang Ezra 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("II. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("II Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2 Esdras 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("2 Esd 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1")
;
return true;
});
});
describe("Localized book Isa (tl)", 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 (tl)", function() {
expect(p.parse("Isaiah 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaias 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaíah 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaías 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaia 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaía 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1")
p.include_apocrypha(false)
expect(p.parse("ISAIAH 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAIAS 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAÍAH 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAÍAS 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAIA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAÍA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1")
;
return true;
});
});
describe("Localized book 2Sam (tl)", 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 (tl)", function() {
expect(p.parse("Ikalawang Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 Samuel 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("IKALAWANG SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("II SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 SAMUEL 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 (tl)", 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 (tl)", function() {
expect(p.parse("Unang Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Una Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 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("UNANG SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("UNA SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("I SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 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 (tl)", 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 (tl)", function() {
expect(p.parse("Ikalawang Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Ikaapat Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Ikalawang Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IV. Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("4. Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IV Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("4 Mga Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Hari 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Ha 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("IKALAWANG MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IKAAPAT MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IKALAWANG HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IV. MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("4. MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("IV MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("4 MGA HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 HARI 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 HA 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1")
;
return true;
});
});
describe("Localized book 1Kgs (tl)", 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 (tl)", function() {
expect(p.parse("Ikatlong Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Unang Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("III. Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("III Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Una Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("3. Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("3 Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I Mga Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Unang Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Una Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I Hari 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Ha 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("IKATLONG MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("UNANG MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("III. MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("III MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("UNA MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("3. MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("3 MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I MGA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("UNANG HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("UNA HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I HARI 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 HA 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1")
;
return true;
});
});
describe("Localized book 2Chr (tl)", 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 (tl)", function() {
expect(p.parse("Ikalawang Paralipomeno 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Mga Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Mga Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Chronicle 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Kronikel 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Ikalawang Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Paralipomeno 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Paralipomeno 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Paralipomeno 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Mga Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Mga Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Paralipomeno 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Mga Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Mga Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Mga Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Mga Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Mga Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Mga Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Chronicle 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Chronicle 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Chronicle 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Kronikel 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Chronicle 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Kronikel 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Kronikel 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Kronikel 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Cronica 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Kronika 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Cro 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("IKALAWANG PARALIPOMENO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG MGA CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG MGA KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG CHRONICLE 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG KRONIKEL 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("IKALAWANG KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. PARALIPOMENO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. PARALIPOMENO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II PARALIPOMENO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. MGA CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. MGA KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 PARALIPOMENO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. MGA CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. MGA KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II MGA CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II MGA KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 MGA CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 MGA KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II CHRONICLE 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. KRONIKEL 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CHRONICLE 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. KRONIKEL 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II KRONIKEL 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 KRONIKEL 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CRONICA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 KRONIKA 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CRO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1")
;
return true;
});
});
describe("Localized book 1Chr (tl)", 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 (tl)", function() {
expect(p.parse("Unang Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Paralipomeno 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Mga Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Mga Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Unang Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Chronicle 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Una Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Kronikel 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Cronica 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Kronika 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Cro 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("UNANG PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I PARALIPOMENO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I MGA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I MGA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNANG KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I CHRONICLE 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("UNA KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I KRONIKEL 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I CRONICA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I KRONIKA 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CRO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1")
;
return true;
});
});
describe("Localized book Ezra (tl)", 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 (tl)", function() {
expect(p.parse("Esdras 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Ez 1:1").osis()).toEqual("Ezra.1.1")
p.include_apocrypha(false)
expect(p.parse("ESDRAS 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("EZ 1:1").osis()).toEqual("Ezra.1.1")
;
return true;
});
});
describe("Localized book Neh (tl)", 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 (tl)", function() {
expect(p.parse("Nehemiah 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Nehemias 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Nehemíah 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Nehemías 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("NEHEMIAH 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEHEMIAS 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEHEMÍAH 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEHEMÍAS 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1")
;
return true;
});
});
describe("Localized book GkEsth (tl)", 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 (tl)", function() {
expect(p.parse("Ester (Griyego) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester (Griego) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester (Gryego) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester (Grego) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester Griyego 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester Griego 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester Gryego 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Ester Grego 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Estg 1:1").osis()).toEqual("GkEsth.1.1")
;
return true;
});
});
describe("Localized book Esth (tl)", 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 (tl)", 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("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("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 (tl)", 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 (tl)", function() {
expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1")
p.include_apocrypha(false)
expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1")
;
return true;
});
});
describe("Localized book SgThree (tl)", 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 (tl)", function() {
expect(p.parse("Awit ng Tatlong Banal na Kabataan 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Awit ng Tatlong Kabataang Banal 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Awit ng Tatlong Kabataan 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Awit ng Tatlong Binata 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Awit ng 3 Kabataan 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Tatlong Kabataan 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("Aw ng 3 Kab 1:1").osis()).toEqual("SgThree.1.1")
expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1")
;
return true;
});
});
describe("Localized book Song (tl)", function() {
var p;
p = {};
beforeEach(func