UNPKG

swordjs

Version:

swordjs - access modules from crosswire.org/sword in JS

1,342 lines (1,258 loc) 115 kB
// Generated by CoffeeScript 1.9.1 (function() { var bcv_parser; bcv_parser = require("../../js/da_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 (da)", 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 (da)", function() { expect(p.parse("Første Mosebog 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1. Mosebog 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Første Mos 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1 Mosebog 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1. Mos 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1 Mos 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("FØRSTE MOSEBOG 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1. MOSEBOG 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("FØRSTE MOS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1 MOSEBOG 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1. MOS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("1 MOS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") ; return true; }); }); describe("Localized book Exod (da)", 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 (da)", function() { expect(p.parse("Anden Mosebog 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2. Mosebog 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2 Mosebog 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Anden Mos 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2. Mos 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exodus 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2 Mos 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("ANDEN MOSEBOG 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2. MOSEBOG 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2 MOSEBOG 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("ANDEN MOS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2. MOS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODUS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("2 MOS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") ; return true; }); }); describe("Localized book Bel (da)", 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 (da)", function() { expect(p.parse("Bel og Dragen 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ; return true; }); }); describe("Localized book Lev (da)", 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 (da)", function() { expect(p.parse("Tredje Mosebog 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3. Mosebog 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Tredje Mos 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3 Mosebog 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3. Mos 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3 Mos 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("TREDJE MOSEBOG 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3. MOSEBOG 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("TREDJE MOS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3 MOSEBOG 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3. MOS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("3 MOS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") ; return true; }); }); describe("Localized book Num (da)", 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 (da)", function() { expect(p.parse("Fjerde Mosebog 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4. Mosebog 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Fjerde Mos 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4 Mosebog 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4. Mos 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Numeri 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4 Mos 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("FJERDE MOSEBOG 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4. MOSEBOG 1:1").osis()).toEqual("Num.1.1") expect(p.parse("FJERDE MOS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4 MOSEBOG 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4. MOS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMERI 1:1").osis()).toEqual("Num.1.1") expect(p.parse("4 MOS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") ; return true; }); }); describe("Localized book Sir (da)", 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 (da)", function() { expect(p.parse("Siraks Bog 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sirak 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ; return true; }); }); describe("Localized book Wis (da)", 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 (da)", function() { expect(p.parse("Visdommens Bog 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Visdommen 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ; return true; }); }); describe("Localized book Lam (da)", 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 (da)", function() { expect(p.parse("Klagesangene 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Klages 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("KLAGESANGENE 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("KLAGES 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") ; return true; }); }); describe("Localized book EpJer (da)", 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 (da)", function() { expect(p.parse("Jeremias' Brev 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Jeremias’ Brev 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ; return true; }); }); describe("Localized book Rev (da)", 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 (da)", function() { expect(p.parse("Johannes' Abenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johannes' Åbenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johannes’ Abenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johannes’ Åbenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johannesapokalypsen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Abenbaringsbogen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johs. Abenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johs. Åbenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Åbenbaringsbogen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johs Abenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Johs Åbenbaring 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Aabenbaringen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Abenbaringen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Åbenbaringen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Apokalypsen 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Ab 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Åb 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("JOHANNES' ABENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHANNES' ÅBENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHANNES’ ABENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHANNES’ ÅBENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHANNESAPOKALYPSEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("ABENBARINGSBOGEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHS. ABENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHS. ÅBENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("ÅBENBARINGSBOGEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHS ABENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("JOHS ÅBENBARING 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("AABENBARINGEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("ABENBARINGEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("ÅBENBARINGEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("APOKALYPSEN 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("AB 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("ÅB 1:1").osis()).toEqual("Rev.1.1") ; return true; }); }); describe("Localized book PrMan (da)", 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 (da)", function() { expect(p.parse("Manasses Bøn 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ; return true; }); }); describe("Localized book Deut (da)", 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 (da)", function() { expect(p.parse("Deuteronomium 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Femte Mosebog 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5. Mosebog 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5 Mosebog 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Femte Mos 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5. Mos 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5 Mos 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("DEUTERONOMIUM 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("FEMTE MOSEBOG 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5. MOSEBOG 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5 MOSEBOG 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("FEMTE MOS 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5. MOS 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("5 MOS 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") ; return true; }); }); describe("Localized book Josh (da)", 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 (da)", function() { expect(p.parse("Josvabogen 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josvas Bog 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josvabog 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josua 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("JOSVABOGEN 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSVAS BOG 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSVABOG 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSUA 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 (da)", 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 (da)", function() { expect(p.parse("Dommerbogen 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Dommer 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Dom 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("DOMMERBOGEN 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("DOMMER 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("DOM 1:1").osis()).toEqual("Judg.1.1") ; return true; }); }); describe("Localized book Ruth (da)", 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 (da)", function() { expect(p.parse("Ruths Bog 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("RUTHS BOG 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 (da)", 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 (da)", function() { expect(p.parse("Første Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("Tredje Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("3. Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("3 Esdrasbog 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ; return true; }); }); describe("Localized book 2Esd (da)", 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 (da)", function() { expect(p.parse("Fjerde Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Anden Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("4. Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("4 Esdrasbog 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ; return true; }); }); describe("Localized book Isa (da)", 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 (da)", function() { expect(p.parse("Esajas' Bog 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Esajas’ Bog 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Esajas 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Jesaia 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Es 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("ESAJAS' BOG 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ESAJAS’ BOG 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ESAJAS 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("JESAIA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ES 1:1").osis()).toEqual("Isa.1.1") ; return true; }); }); describe("Localized book 2Sam (da)", 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 (da)", function() { expect(p.parse("Anden Kongerigernes Bog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Kongerigernes Bog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Kongerigernes Bog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Anden Samuelsbog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuelsbog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuelsbog 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Anden Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Anden Sam 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 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("ANDEN KONGERIGERNES BOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. KONGERIGERNES BOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 KONGERIGERNES BOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("ANDEN SAMUELSBOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELSBOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELSBOG 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("ANDEN SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("ANDEN SAM 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 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 (da)", 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 (da)", function() { expect(p.parse("Første Kongerigernes Bog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Kongerigernes Bog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Kongerigernes Bog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Første Samuelsbog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuelsbog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Første Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuelsbog 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Første Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sam 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("FØRSTE KONGERIGERNES BOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. KONGERIGERNES BOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 KONGERIGERNES BOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FØRSTE SAMUELSBOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELSBOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FØRSTE SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELSBOG 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FØRSTE SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAM 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 (da)", 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 (da)", function() { expect(p.parse("Fjerde Kongerigernes Bog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. Kongerigernes Bog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 Kongerigernes Bog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Anden Kongebog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kongebog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kongebog 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Anden Kong 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kong 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kong 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("FJERDE KONGERIGERNES BOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. KONGERIGERNES BOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 KONGERIGERNES BOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("ANDEN KONGEBOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KONGEBOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KONGEBOG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("ANDEN KONG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KONG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KONG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") ; return true; }); }); describe("Localized book 1Kgs (da)", 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 (da)", function() { expect(p.parse("Tredje Kongerigernes Bog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. Kongerigernes Bog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 Kongerigernes Bog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Første Kongebog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kongebog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Første Kong 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kongebog 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kong 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kong 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("TREDJE KONGERIGERNES BOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. KONGERIGERNES BOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 KONGERIGERNES BOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FØRSTE KONGEBOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KONGEBOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FØRSTE KONG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KONGEBOG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KONG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KONG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") ; return true; }); }); describe("Localized book 2Chr (da)", 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 (da)", function() { expect(p.parse("Anden Krønikebog 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Krønikebog 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Krønikebog 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Anden Kron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Anden Krøn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Kron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Krøn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Kron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Krøn 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("ANDEN KRØNIKEBOG 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. KRØNIKEBOG 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 KRØNIKEBOG 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("ANDEN KRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("ANDEN KRØN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. KRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. KRØN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 KRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 KRØN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ; return true; }); }); describe("Localized book 1Chr (da)", 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 (da)", function() { expect(p.parse("Første Krønikebog 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Krønikebog 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Krønikebog 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Første Kron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Første Krøn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Kron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Krøn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Kron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Krøn 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("FØRSTE KRØNIKEBOG 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. KRØNIKEBOG 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 KRØNIKEBOG 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FØRSTE KRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FØRSTE KRØN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. KRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. KRØN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 KRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 KRØN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ; return true; }); }); describe("Localized book Ezra (da)", 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 (da)", function() { expect(p.parse("Ezras Bog 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("EZRAS BOG 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") ; return true; }); }); describe("Localized book Neh (da)", 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 (da)", function() { expect(p.parse("Nehemias’ Bog 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemias 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("NEHEMIAS’ BOG 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAS 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") ; return true; }); }); describe("Localized book GkEsth (da)", 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 (da)", function() { expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") ; return true; }); }); describe("Localized book Esth (da)", 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 (da)", function() { expect(p.parse("Esters Bog 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("ESTERS BOG 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 (da)", 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 (da)", function() { expect(p.parse("Jobs Bog 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Hiob 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("JOBS BOG 1:1").osis()).toEqual("Job.1.1") expect(p.parse("HIOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") ; return true; }); }); describe("Localized book Ps (da)", 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 (da)", function() { expect(p.parse("Salmernes Bog 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salmerne 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salme 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Sl 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("SALMERNES BOG 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALMERNE 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALME 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SL 1:1").osis()).toEqual("Ps.1.1") ; return true; }); }); describe("Localized book PrAzar (da)", 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 (da)", function() { expect(p.parse("Azarjas Bøn 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azarjas bøn 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") ; return true; }); }); describe("Localized book Prov (da)", 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 (da)", function() { expect(p.parse("Ordsprogenes Bog 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Ordsprogene 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Ordsp 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("ORDSPROGENES BOG 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("ORDSPROGENE 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("ORDSP 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") ; return true; }); }); describe("Localized book Eccl (da)", 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 (da)", function() { expect(p.parse("Prædikerens Bog 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Prædikeren 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Prad 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Præd 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("PRÆDIKERENS BOG 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("PRÆDIKEREN 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("PRAD 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("PRÆD 1:1").osis()).toEqual("Eccl.1.1") ; return true; }); }); describe("Localized book SgThree (da)", 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 (da)", function() { expect(p.parse("De Tre Mænds Lovsang 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("De tre mænds lovsang 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") ; return true; }); }); describe("Localized book Song (da)", 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 (da)", function() { expect(p.parse("Salomons Højsang 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Højsangen 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Hojs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Højs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("SALOMONS HØJSANG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("HØJSANGEN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("HOJS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("HØJS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") ; return true; }); }); describe("Localized book Jer (da)", 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 (da)", function() { expect(p.parse("Jeremias' Bog 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremias’ Bog 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremias 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("JEREMIAS' BOG 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIAS’ BOG 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIAS 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") ; return true; }); }); describe("Localized book Ezek (da)", 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 (da)", function() { expect(p.parse("Ezekiels’ Bog 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekiels Bog 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Hezechiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ez 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EZEKIELS’ BOG 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIELS BOG 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("HEZECHIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZ 1:1").osis()).toEqual("Ezek.1.1") ; return true; }); }); describe("Localized book Dan (da)", 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 (da)", function() { expect(p.parse("Daniels Bog 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Daniel 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("DANIELS BOG 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") ; return true; }); }); describe("Localized book Hos (da)", 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 (da)", function() { expect(p.parse("Hoseas’ Bog 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hoseas 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("HOSEAS’ BOG 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOSEAS 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") ; return true; }); }); describe("Localized book Joel (da)", 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 (da)", function() { expect(p.parse("Joels Bog 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("JOELS BOG 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") ; return true; }); }); describe("Localized book Amos (da)", 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 (da)", function() { expect(p.parse("Amos' Bog 1