swordjs
Version:
swordjs - access modules from crosswire.org/sword in JS
1,163 lines (1,106 loc) • 162 kB
JavaScript
// Generated by CoffeeScript 1.9.1
(function() {
var bcv_parser;
bcv_parser = require("../../js/fr_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 (fr)", 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 (fr)", function() {
expect(p.parse("Genese 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Genèse 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Ge 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("Gn 1:1").osis()).toEqual("Gen.1.1")
p.include_apocrypha(false)
expect(p.parse("GENESE 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GENÈSE 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GE 1:1").osis()).toEqual("Gen.1.1")
expect(p.parse("GN 1:1").osis()).toEqual("Gen.1.1")
;
return true;
});
});
describe("Localized book Exod (fr)", 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 (fr)", function() {
expect(p.parse("Exode 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")
expect(p.parse("Ex 1:1").osis()).toEqual("Exod.1.1")
p.include_apocrypha(false)
expect(p.parse("EXODE 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")
expect(p.parse("EX 1:1").osis()).toEqual("Exod.1.1")
;
return true;
});
});
describe("Localized book Bel (fr)", 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 (fr)", function() {
expect(p.parse("Bel et le Serpent 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel et le serpent 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel et le Dragon 1:1").osis()).toEqual("Bel.1.1")
expect(p.parse("Bel et le 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 (fr)", 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 (fr)", function() {
expect(p.parse("Levitique 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lévitique 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lév 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Le 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lv 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("Lé 1:1").osis()).toEqual("Lev.1.1")
p.include_apocrypha(false)
expect(p.parse("LEVITIQUE 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LÉVITIQUE 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LÉV 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LE 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LV 1:1").osis()).toEqual("Lev.1.1")
expect(p.parse("LÉ 1:1").osis()).toEqual("Lev.1.1")
;
return true;
});
});
describe("Localized book Num (fr)", 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 (fr)", function() {
expect(p.parse("Nombres 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Nomb 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Nom 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Nb 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("Nm 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("No 1:1").osis()).toEqual("Num.1.1")
p.include_apocrypha(false)
expect(p.parse("NOMBRES 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NOMB 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NOM 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NB 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NM 1:1").osis()).toEqual("Num.1.1")
expect(p.parse("NO 1:1").osis()).toEqual("Num.1.1")
;
return true;
});
});
describe("Localized book Sir (fr)", 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 (fr)", function() {
expect(p.parse("La Sagesse de Ben Sira 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sagesse de Ben Sira 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ecclesiastique 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Ecclésiastique 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Siracide 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1")
expect(p.parse("Si 1:1").osis()).toEqual("Sir.1.1")
;
return true;
});
});
describe("Localized book Wis (fr)", 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 (fr)", function() {
expect(p.parse("Sagesse de Salomon 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Sagesse 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1")
expect(p.parse("Sg 1:1").osis()).toEqual("Wis.1.1")
;
return true;
});
});
describe("Localized book Lam (fr)", 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 (fr)", function() {
expect(p.parse("Lamentations de Jeremie 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lamentations de Jerémie 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lamentations de Jéremie 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lamentations de Jérémie 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lamentations 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("La 1:1").osis()).toEqual("Lam.1.1")
p.include_apocrypha(false)
expect(p.parse("LAMENTATIONS DE JEREMIE 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAMENTATIONS DE JERÉMIE 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAMENTATIONS DE JÉREMIE 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAMENTATIONS DE JÉRÉMIE 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAMENTATIONS 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1")
expect(p.parse("LA 1:1").osis()).toEqual("Lam.1.1")
;
return true;
});
});
describe("Localized book EpJer (fr)", 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 (fr)", function() {
expect(p.parse("Epitre de Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epitre de Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epitre de Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epitre de Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epître de Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epître de Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epître de Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Epître de Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épitre de Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épitre de Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épitre de Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épitre de Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épître de Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épître de Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épître de Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Épître de Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jeremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jerémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jéremie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jérémie 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jer 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep. Jér 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jer 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép. Jér 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jer 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ep Jér 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jer 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("Ép Jér 1:1").osis()).toEqual("EpJer.1.1")
expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1")
;
return true;
});
});
describe("Localized book Rev (fr)", 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 (fr)", function() {
expect(p.parse("Apocalypse de Jean 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apocalypse 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apoc 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apc 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Apo 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("Ap 1:1").osis()).toEqual("Rev.1.1")
p.include_apocrypha(false)
expect(p.parse("APOCALYPSE DE JEAN 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APOCALYPSE 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APOC 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APC 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("APO 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1")
expect(p.parse("AP 1:1").osis()).toEqual("Rev.1.1")
;
return true;
});
});
describe("Localized book PrMan (fr)", 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 (fr)", function() {
expect(p.parse("La Priere de Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("La Priere de Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("La Prière de Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("La Prière de Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Priere de Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Priere de Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Prière de Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Prière de Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr. Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr. Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr Manasse 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr Manassé 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr. Man 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("Pr Man 1:1").osis()).toEqual("PrMan.1.1")
expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1")
;
return true;
});
});
describe("Localized book Deut (fr)", 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 (fr)", function() {
expect(p.parse("Deuteronome 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deutéronome 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("Deu 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("DEUTERONOME 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUTÉRONOME 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DEU 1:1").osis()).toEqual("Deut.1.1")
expect(p.parse("DT 1:1").osis()).toEqual("Deut.1.1")
;
return true;
});
});
describe("Localized book Josh (fr)", 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 (fr)", function() {
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("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 (fr)", 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 (fr)", function() {
expect(p.parse("Juges 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Jug 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("Jg 1:1").osis()).toEqual("Judg.1.1")
p.include_apocrypha(false)
expect(p.parse("JUGES 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("JUG 1:1").osis()).toEqual("Judg.1.1")
expect(p.parse("JG 1:1").osis()).toEqual("Judg.1.1")
;
return true;
});
});
describe("Localized book Ruth (fr)", 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 (fr)", function() {
expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Rt 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("Ru 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")
expect(p.parse("RT 1:1").osis()).toEqual("Ruth.1.1")
expect(p.parse("RU 1:1").osis()).toEqual("Ruth.1.1")
;
return true;
});
});
describe("Localized book 1Esd (fr)", 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 (fr)", function() {
expect(p.parse("Premieres Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Premières Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Premiere Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Premiers Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Première Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("Premier Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1ere. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1ère. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1er. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1ere Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1re. Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1ère Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1er Esdras 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1re 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("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 Esdr 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1 Esd 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1 Es 1:1").osis()).toEqual("1Esd.1.1")
expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1")
;
return true;
});
});
describe("Localized book 2Esd (fr)", 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 (fr)", function() {
expect(p.parse("Deuxiemes Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("Deuxièmes Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("Deuxieme Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("Deuxième Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2eme. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2ème. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2de. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2eme Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2ème Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2d. Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2de Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2e. 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("2d Esdras 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2e 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("2 Esdr 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2 Esd 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2 Es 1:1").osis()).toEqual("2Esd.1.1")
expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1")
;
return true;
});
});
describe("Localized book Isa (fr)", 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 (fr)", function() {
expect(p.parse("Esaie 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Esaïe 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaie 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isaïe 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Ésaie 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Ésaïe 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Esa 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Ésa 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Es 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("Is 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("És 1:1").osis()).toEqual("Isa.1.1")
p.include_apocrypha(false)
expect(p.parse("ESAIE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ESAÏE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAIE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISAÏE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ÉSAIE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ÉSAÏE 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ESA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ÉSA 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ES 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("IS 1:1").osis()).toEqual("Isa.1.1")
expect(p.parse("ÉS 1:1").osis()).toEqual("Isa.1.1")
;
return true;
});
});
describe("Localized book 2Sam (fr)", 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 (fr)", function() {
expect(p.parse("Deuxiemes Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Deuxièmes Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Deuxieme Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("Deuxième Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2eme. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2ème. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2de. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2eme Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2ème Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2d. Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2de Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2e. 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("2d Samuel 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2e 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("2 Sa 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1")
p.include_apocrypha(false)
expect(p.parse("DEUXIEMES SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("DEUXIÈMES SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("DEUXIEME SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("DEUXIÈME SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2EME. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2ÈME. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2DE. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2EME SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2ÈME SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2D. SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2DE SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2E. 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("2D SAMUEL 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2E 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("2 SA 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1")
expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1")
;
return true;
});
});
describe("Localized book 1Sam (fr)", 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 (fr)", function() {
expect(p.parse("Premieres Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Premières Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Premiere Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Premiers Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Première Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("Premier Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ere. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ère. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1er. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ere Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1re. Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ère Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1er Samuel 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1re 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("1 Sa 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1")
p.include_apocrypha(false)
expect(p.parse("PREMIERES SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("PREMIÈRES SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("PREMIERE SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("PREMIERS SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("PREMIÈRE SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("PREMIER SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ERE. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ÈRE. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ER. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ERE SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1RE. SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ÈRE SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1ER SAMUEL 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1RE 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("1 SA 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1")
expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1")
;
return true;
});
});
describe("Localized book 2Kgs (fr)", 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 (fr)", function() {
expect(p.parse("Deuxiemes Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Deuxièmes Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Deuxieme Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("Deuxième Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2eme. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2ème. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2de. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2eme Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2ème Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2d. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2de Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2e. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2d Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2e Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 Rois 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 R 1:1").osis()).toEqual("2Kgs.1.1")
p.include_apocrypha(false)
expect(p.parse("DEUXIEMES ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("DEUXIÈMES ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("DEUXIEME ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("DEUXIÈME ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2EME. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2ÈME. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2DE. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2EME ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2ÈME ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2D. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2DE ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2E. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2. ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2D ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2E ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("II ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 ROIS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1")
expect(p.parse("2 R 1:1").osis()).toEqual("2Kgs.1.1")
;
return true;
});
});
describe("Localized book 1Kgs (fr)", 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 (fr)", function() {
expect(p.parse("Premieres Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Premières Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Premiere Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Premiers Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Première Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("Premier Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ere. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ère. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1er. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ere Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1re. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ère Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1er Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1re Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I Rois 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 R 1:1").osis()).toEqual("1Kgs.1.1")
p.include_apocrypha(false)
expect(p.parse("PREMIERES ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("PREMIÈRES ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("PREMIERE ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("PREMIERS ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("PREMIÈRE ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("PREMIER ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ERE. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ÈRE. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ER. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ERE ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1RE. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ÈRE ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1ER ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1RE ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I. ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("I ROIS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1")
expect(p.parse("1 R 1:1").osis()).toEqual("1Kgs.1.1")
;
return true;
});
});
describe("Localized book 2Chr (fr)", 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 (fr)", function() {
expect(p.parse("Deuxiemes Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Deuxièmes Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Deuxieme Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("Deuxième Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2eme. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2ème. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2de. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2eme Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2ème Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2d. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2de Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2e. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2d Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2e Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Chroniques 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Chron 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Chro 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Chr 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 Ch 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("DEUXIEMES CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("DEUXIÈMES CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("DEUXIEME CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("DEUXIÈME CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2EME. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2ÈME. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2DE. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2EME CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2ÈME CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2D. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2DE CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2E. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2. CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2D CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2E CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("II CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CHRONIQUES 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CHRON 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CHRO 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CHR 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2 CH 1:1").osis()).toEqual("2Chr.1.1")
expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1")
;
return true;
});
});
describe("Localized book 1Chr (fr)", 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 (fr)", function() {
expect(p.parse("Premieres Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Premières Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Premiere Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Premiers Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Première Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("Premier Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ere. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ère. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1er. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ere Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1re. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ère Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1er Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1re Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I Chroniques 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Chron 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Chro 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Chr 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 Ch 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("PREMIERES CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("PREMIÈRES CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("PREMIERE CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("PREMIERS CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("PREMIÈRE CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("PREMIER CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ERE. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ÈRE. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ER. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ERE CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1RE. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ÈRE CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1ER CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1RE CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I. CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("I CHRONIQUES 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CHRON 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CHRO 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CHR 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1 CH 1:1").osis()).toEqual("1Chr.1.1")
expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1")
;
return true;
});
});
describe("Localized book Ezra (fr)", 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 (fr)", function() {
expect(p.parse("Esdras 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Esdr 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("Esd 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("ESDR 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1")
expect(p.parse("ESD 1:1").osis()).toEqual("Ezra.1.1")
;
return true;
});
});
describe("Localized book Neh (fr)", 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 (fr)", function() {
expect(p.parse("Nehemie 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Nehémie 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Néhemie 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Néhémie 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Néh 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Ne 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("Né 1:1").osis()).toEqual("Neh.1.1")
p.include_apocrypha(false)
expect(p.parse("NEHEMIE 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEHÉMIE 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NÉHEMIE 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NÉHÉMIE 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NÉH 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NE 1:1").osis()).toEqual("Neh.1.1")
expect(p.parse("NÉ 1:1").osis()).toEqual("Neh.1.1")
;
return true;
});
});
describe("Localized book GkEsth (fr)", 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 (fr)", function() {
expect(p.parse("Esther (Grec) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Esther (grec) 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Esther Grec 1:1").osis()).toEqual("GkEsth.1.1")
expect(p.parse("Esther grec 1:1").osis()).toEqual("GkEsth.1.1")