bible-ref-parse
Version:
Identifies and parses Bible references (like John 3:16) in over 40 languages.
1,354 lines (1,291 loc) • 75.4 kB
JavaScript
(function() {
var bcv_parser;
bcv_parser = require("../../dist/am-bcv-parser.js").bcv_parser;
describe("Parsing (am)", function() {
var p;
p = {};
beforeEach(function() {
p = new bcv_parser();
p.options.osis_compaction_strategy = "b";
p.options.sequence_combination_strategy = "combine";
});
it("should round-trip OSIS references", function() {
var bc, bcv, bcv_range, book, books, i, len;
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"];
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);
}
});
it("should round-trip OSIS Apocrypha references", function() {
var bc, bcv, bcv_range, book, books, i, j, len, len1;
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);
for (j = 0, len1 = books.length; j < len1; j++) {
book = books[j];
bc = book + ".1";
expect(p.parse(bc).osis()).toEqual("");
}
});
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("");
expect(p.parse("11Sam 1").osis()).toEqual("");
});
});
describe("Localized book Gen (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Gen (am)", function() {
expect(p.parse("ዘፍጥረት 1:1").osis()).toEqual("Gen.1.1", "parsing: 'ዘፍጥረት 1:1'");
expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Gen 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዘፍጥረት 1:1").osis()).toEqual("Gen.1.1", "parsing: 'ዘፍጥረት 1:1'");
expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GEN 1:1'");
});
});
describe("Localized book Exod (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Exod (am)", function() {
expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
expect(p.parse("ዘፀአት 1:1").osis()).toEqual("Exod.1.1", "parsing: 'ዘፀአት 1:1'");
p.include_apocrypha(false);
expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
expect(p.parse("ዘፀአት 1:1").osis()).toEqual("Exod.1.1", "parsing: 'ዘፀአት 1:1'");
});
});
describe("Localized book Bel (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Bel (am)", function() {
expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1", "parsing: 'Bel 1:1'");
});
});
describe("Localized book Lev (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Lev (am)", function() {
expect(p.parse("ዘሌዋውያን 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ዘሌዋውያን 1:1'");
expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lev 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዘሌዋውያን 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ዘሌዋውያን 1:1'");
expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEV 1:1'");
});
});
describe("Localized book Num (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Num (am)", function() {
expect(p.parse("ዘኁልቍ 1:1").osis()).toEqual("Num.1.1", "parsing: 'ዘኁልቍ 1:1'");
expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዘኁልቍ 1:1").osis()).toEqual("Num.1.1", "parsing: 'ዘኁልቍ 1:1'");
expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
});
});
describe("Localized book Sir (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Sir (am)", function() {
expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1", "parsing: 'Sir 1:1'");
});
});
describe("Localized book Wis (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Wis (am)", function() {
expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1", "parsing: 'Wis 1:1'");
});
});
describe("Localized book Lam (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Lam (am)", function() {
expect(p.parse("ሰቆቃወ 1:1").osis()).toEqual("Lam.1.1", "parsing: 'ሰቆቃወ 1:1'");
expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሰቆቃወ 1:1").osis()).toEqual("Lam.1.1", "parsing: 'ሰቆቃወ 1:1'");
expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
});
});
describe("Localized book EpJer (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: EpJer (am)", function() {
expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1", "parsing: 'EpJer 1:1'");
});
});
describe("Localized book Rev (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Rev (am)", function() {
expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Rev 1:1'");
expect(p.parse("ራእይ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ራእይ 1:1'");
p.include_apocrypha(false);
expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1", "parsing: 'REV 1:1'");
expect(p.parse("ራእይ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ራእይ 1:1'");
});
});
describe("Localized book PrMan (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: PrMan (am)", function() {
expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1", "parsing: 'PrMan 1:1'");
});
});
describe("Localized book Deut (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Deut (am)", function() {
expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
expect(p.parse("ዘዳግም 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ዘዳግም 1:1'");
p.include_apocrypha(false);
expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
expect(p.parse("ዘዳግም 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ዘዳግም 1:1'");
});
});
describe("Localized book Josh (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Josh (am)", function() {
expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josh 1:1'");
expect(p.parse("ኢያሱ 1:1").osis()).toEqual("Josh.1.1", "parsing: 'ኢያሱ 1:1'");
p.include_apocrypha(false);
expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSH 1:1'");
expect(p.parse("ኢያሱ 1:1").osis()).toEqual("Josh.1.1", "parsing: 'ኢያሱ 1:1'");
});
});
describe("Localized book Judg (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Judg (am)", function() {
expect(p.parse("መሳፍንት 1:1").osis()).toEqual("Judg.1.1", "parsing: 'መሳፍንት 1:1'");
expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
p.include_apocrypha(false);
expect(p.parse("መሳፍንት 1:1").osis()).toEqual("Judg.1.1", "parsing: 'መሳፍንት 1:1'");
expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
});
});
describe("Localized book Ruth (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Ruth (am)", function() {
expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
expect(p.parse("ሩት 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'ሩት 1:1'");
p.include_apocrypha(false);
expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
expect(p.parse("ሩት 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'ሩት 1:1'");
});
});
describe("Localized book 1Esd (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 1Esd (am)", function() {
expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1", "parsing: '1Esd 1:1'");
});
});
describe("Localized book 2Esd (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 2Esd (am)", function() {
expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1", "parsing: '2Esd 1:1'");
});
});
describe("Localized book Isa (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Isa (am)", function() {
expect(p.parse("ኢሳይያስ 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ኢሳይያስ 1:1'");
expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
p.include_apocrypha(false);
expect(p.parse("ኢሳይያስ 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ኢሳይያስ 1:1'");
expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
});
});
describe("Localized book 2Sam (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 2Sam (am)", function() {
expect(p.parse("2. ሳሙኤል 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ሳሙኤል 1:1'");
expect(p.parse("2 ሳሙኤል 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ሳሙኤል 1:1'");
expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
p.include_apocrypha(false);
expect(p.parse("2. ሳሙኤል 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ሳሙኤል 1:1'");
expect(p.parse("2 ሳሙኤል 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ሳሙኤል 1:1'");
expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
});
});
describe("Localized book 1Sam (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 1Sam (am)", function() {
expect(p.parse("1. ሳሙኤል 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ሳሙኤል 1:1'");
expect(p.parse("1 ሳሙኤል 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ሳሙኤል 1:1'");
expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
p.include_apocrypha(false);
expect(p.parse("1. ሳሙኤል 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ሳሙኤል 1:1'");
expect(p.parse("1 ሳሙኤል 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ሳሙኤል 1:1'");
expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
});
});
describe("Localized book 2Kgs (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 2Kgs (am)", function() {
expect(p.parse("2. ነገሥት 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. ነገሥት 1:1'");
expect(p.parse("2 ነገሥት 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 ነገሥት 1:1'");
expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
p.include_apocrypha(false);
expect(p.parse("2. ነገሥት 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. ነገሥት 1:1'");
expect(p.parse("2 ነገሥት 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 ነገሥት 1:1'");
expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
});
});
describe("Localized book 1Kgs (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 1Kgs (am)", function() {
expect(p.parse("1. ነገሥት 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. ነገሥት 1:1'");
expect(p.parse("1 ነገሥት 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 ነገሥት 1:1'");
expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
p.include_apocrypha(false);
expect(p.parse("1. ነገሥት 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. ነገሥት 1:1'");
expect(p.parse("1 ነገሥት 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 ነገሥት 1:1'");
expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
});
});
describe("Localized book 2Chr (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 2Chr (am)", function() {
expect(p.parse("2. ዜና መዋዕል 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. ዜና መዋዕል 1:1'");
expect(p.parse("2 ዜና መዋዕል 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 ዜና መዋዕል 1:1'");
expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
p.include_apocrypha(false);
expect(p.parse("2. ዜና መዋዕል 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. ዜና መዋዕል 1:1'");
expect(p.parse("2 ዜና መዋዕል 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 ዜና መዋዕል 1:1'");
expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
});
});
describe("Localized book 1Chr (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 1Chr (am)", function() {
expect(p.parse("1. ዜና መዋዕል 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. ዜና መዋዕል 1:1'");
expect(p.parse("1 ዜና መዋዕል 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 ዜና መዋዕል 1:1'");
expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
p.include_apocrypha(false);
expect(p.parse("1. ዜና መዋዕል 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. ዜና መዋዕል 1:1'");
expect(p.parse("1 ዜና መዋዕል 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 ዜና መዋዕል 1:1'");
expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
});
});
describe("Localized book Ezra (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Ezra (am)", function() {
expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
expect(p.parse("ዕዝራ 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'ዕዝራ 1:1'");
p.include_apocrypha(false);
expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
expect(p.parse("ዕዝራ 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'ዕዝራ 1:1'");
});
});
describe("Localized book Neh (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Neh (am)", function() {
expect(p.parse("ነህምያ 1:1").osis()).toEqual("Neh.1.1", "parsing: 'ነህምያ 1:1'");
expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
p.include_apocrypha(false);
expect(p.parse("ነህምያ 1:1").osis()).toEqual("Neh.1.1", "parsing: 'ነህምያ 1:1'");
expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
});
});
describe("Localized book GkEsth (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: GkEsth (am)", function() {
expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1", "parsing: 'GkEsth 1:1'");
});
});
describe("Localized book Esth (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Esth (am)", function() {
expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
expect(p.parse("አስቴር 1:1").osis()).toEqual("Esth.1.1", "parsing: 'አስቴር 1:1'");
p.include_apocrypha(false);
expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
expect(p.parse("አስቴር 1:1").osis()).toEqual("Esth.1.1", "parsing: 'አስቴር 1:1'");
});
});
describe("Localized book Job (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Job (am)", function() {
expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
expect(p.parse("ኢዮብ 1:1").osis()).toEqual("Job.1.1", "parsing: 'ኢዮብ 1:1'");
p.include_apocrypha(false);
expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
expect(p.parse("ኢዮብ 1:1").osis()).toEqual("Job.1.1", "parsing: 'ኢዮብ 1:1'");
});
});
describe("Localized book Ps (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Ps (am)", function() {
expect(p.parse("መዝሙር 1:1").osis()).toEqual("Ps.1.1", "parsing: 'መዝሙር 1:1'");
expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
p.include_apocrypha(false);
expect(p.parse("መዝሙር 1:1").osis()).toEqual("Ps.1.1", "parsing: 'መዝሙር 1:1'");
expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
});
});
describe("Localized book PrAzar (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: PrAzar (am)", function() {
expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1", "parsing: 'PrAzar 1:1'");
});
});
describe("Localized book Prov (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Prov (am)", function() {
expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
expect(p.parse("ምሳሌ 1:1").osis()).toEqual("Prov.1.1", "parsing: 'ምሳሌ 1:1'");
p.include_apocrypha(false);
expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
expect(p.parse("ምሳሌ 1:1").osis()).toEqual("Prov.1.1", "parsing: 'ምሳሌ 1:1'");
});
});
describe("Localized book Eccl (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Eccl (am)", function() {
expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
expect(p.parse("መክብብ 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'መክብብ 1:1'");
p.include_apocrypha(false);
expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
expect(p.parse("መክብብ 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'መክብብ 1:1'");
});
});
describe("Localized book SgThree (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: SgThree (am)", function() {
expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1", "parsing: 'SgThree 1:1'");
});
});
describe("Localized book Song (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Song (am)", function() {
expect(p.parse("ማሕልየ መሓልይ 1:1").osis()).toEqual("Song.1.1", "parsing: 'ማሕልየ መሓልይ 1:1'");
expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
p.include_apocrypha(false);
expect(p.parse("ማሕልየ መሓልይ 1:1").osis()).toEqual("Song.1.1", "parsing: 'ማሕልየ መሓልይ 1:1'");
expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
});
});
describe("Localized book Jer (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Jer (am)", function() {
expect(p.parse("ኤርምያስ 1:1").osis()).toEqual("Jer.1.1", "parsing: 'ኤርምያስ 1:1'");
expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
p.include_apocrypha(false);
expect(p.parse("ኤርምያስ 1:1").osis()).toEqual("Jer.1.1", "parsing: 'ኤርምያስ 1:1'");
expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
});
});
describe("Localized book Ezek (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Ezek (am)", function() {
expect(p.parse("ሕዝቅኤል 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'ሕዝቅኤል 1:1'");
expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሕዝቅኤል 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'ሕዝቅኤል 1:1'");
expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
});
});
describe("Localized book Dan (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Dan (am)", function() {
expect(p.parse("ዳንኤል 1:1").osis()).toEqual("Dan.1.1", "parsing: 'ዳንኤል 1:1'");
expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዳንኤል 1:1").osis()).toEqual("Dan.1.1", "parsing: 'ዳንኤል 1:1'");
expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
});
});
describe("Localized book Hos (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Hos (am)", function() {
expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
expect(p.parse("ሆሴዕ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'ሆሴዕ 1:1'");
p.include_apocrypha(false);
expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
expect(p.parse("ሆሴዕ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'ሆሴዕ 1:1'");
});
});
describe("Localized book Joel (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Joel (am)", function() {
expect(p.parse("ዘፍጥረት 1:1").osis()).toEqual("Joel.1.1", "parsing: 'ዘፍጥረት 1:1'");
expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዘፍጥረት 1:1").osis()).toEqual("Joel.1.1", "parsing: 'ዘፍጥረት 1:1'");
expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
});
});
describe("Localized book Amos (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Amos (am)", function() {
expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
expect(p.parse("አሞጽ 1:1").osis()).toEqual("Amos.1.1", "parsing: 'አሞጽ 1:1'");
p.include_apocrypha(false);
expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
expect(p.parse("አሞጽ 1:1").osis()).toEqual("Amos.1.1", "parsing: 'አሞጽ 1:1'");
});
});
describe("Localized book Obad (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Obad (am)", function() {
expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
expect(p.parse("አብድዩ 1:1").osis()).toEqual("Obad.1.1", "parsing: 'አብድዩ 1:1'");
p.include_apocrypha(false);
expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
expect(p.parse("አብድዩ 1:1").osis()).toEqual("Obad.1.1", "parsing: 'አብድዩ 1:1'");
});
});
describe("Localized book Jonah (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Jonah (am)", function() {
expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
expect(p.parse("ዮናስ 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'ዮናስ 1:1'");
p.include_apocrypha(false);
expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
expect(p.parse("ዮናስ 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'ዮናስ 1:1'");
});
});
describe("Localized book Mic (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Mic (am)", function() {
expect(p.parse("ሚክያስ 1:1").osis()).toEqual("Mic.1.1", "parsing: 'ሚክያስ 1:1'");
expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሚክያስ 1:1").osis()).toEqual("Mic.1.1", "parsing: 'ሚክያስ 1:1'");
expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
});
});
describe("Localized book Nah (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Nah (am)", function() {
expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
expect(p.parse("ናሆም 1:1").osis()).toEqual("Nah.1.1", "parsing: 'ናሆም 1:1'");
p.include_apocrypha(false);
expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
expect(p.parse("ናሆም 1:1").osis()).toEqual("Nah.1.1", "parsing: 'ናሆም 1:1'");
});
});
describe("Localized book Hab (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Hab (am)", function() {
expect(p.parse("ዕንባቆም 1:1").osis()).toEqual("Hab.1.1", "parsing: 'ዕንባቆም 1:1'");
expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዕንባቆም 1:1").osis()).toEqual("Hab.1.1", "parsing: 'ዕንባቆም 1:1'");
expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
});
});
describe("Localized book Zeph (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Zeph (am)", function() {
expect(p.parse("ሶፎንያስ 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ሶፎንያስ 1:1'");
expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሶፎንያስ 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ሶፎንያስ 1:1'");
expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
});
});
describe("Localized book Hag (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Hag (am)", function() {
expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
expect(p.parse("ሐጌ 1:1").osis()).toEqual("Hag.1.1", "parsing: 'ሐጌ 1:1'");
p.include_apocrypha(false);
expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
expect(p.parse("ሐጌ 1:1").osis()).toEqual("Hag.1.1", "parsing: 'ሐጌ 1:1'");
});
});
describe("Localized book Zech (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Zech (am)", function() {
expect(p.parse("ዘካርያስ 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ዘካርያስ 1:1'");
expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
p.include_apocrypha(false);
expect(p.parse("ዘካርያስ 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ዘካርያስ 1:1'");
expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
});
});
describe("Localized book Mal (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Mal (am)", function() {
expect(p.parse("ሚልክያስ 1:1").osis()).toEqual("Mal.1.1", "parsing: 'ሚልክያስ 1:1'");
expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሚልክያስ 1:1").osis()).toEqual("Mal.1.1", "parsing: 'ሚልክያስ 1:1'");
expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
});
});
describe("Localized book Matt (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Matt (am)", function() {
expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
expect(p.parse("ማቴዎስ 1:1").osis()).toEqual("Matt.1.1", "parsing: 'ማቴዎስ 1:1'");
p.include_apocrypha(false);
expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
expect(p.parse("ማቴዎስ 1:1").osis()).toEqual("Matt.1.1", "parsing: 'ማቴዎስ 1:1'");
});
});
describe("Localized book Mark (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Mark (am)", function() {
expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
expect(p.parse("ማርቆስ 1:1").osis()).toEqual("Mark.1.1", "parsing: 'ማርቆስ 1:1'");
p.include_apocrypha(false);
expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
expect(p.parse("ማርቆስ 1:1").osis()).toEqual("Mark.1.1", "parsing: 'ማርቆስ 1:1'");
});
});
describe("Localized book Luke (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Luke (am)", function() {
expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
expect(p.parse("ሉቃስ 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ሉቃስ 1:1'");
p.include_apocrypha(false);
expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
expect(p.parse("ሉቃስ 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ሉቃስ 1:1'");
});
});
describe("Localized book 1John (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 1John (am)", function() {
expect(p.parse("1. ዮሐንስ 1:1").osis()).toEqual("1John.1.1", "parsing: '1. ዮሐንስ 1:1'");
expect(p.parse("1 ዮሐንስ 1:1").osis()).toEqual("1John.1.1", "parsing: '1 ዮሐንስ 1:1'");
expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
p.include_apocrypha(false);
expect(p.parse("1. ዮሐንስ 1:1").osis()).toEqual("1John.1.1", "parsing: '1. ዮሐንስ 1:1'");
expect(p.parse("1 ዮሐንስ 1:1").osis()).toEqual("1John.1.1", "parsing: '1 ዮሐንስ 1:1'");
expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
});
});
describe("Localized book 2John (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 2John (am)", function() {
expect(p.parse("2. ዮሐንስ 1:1").osis()).toEqual("2John.1.1", "parsing: '2. ዮሐንስ 1:1'");
expect(p.parse("2 ዮሐንስ 1:1").osis()).toEqual("2John.1.1", "parsing: '2 ዮሐንስ 1:1'");
expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
p.include_apocrypha(false);
expect(p.parse("2. ዮሐንስ 1:1").osis()).toEqual("2John.1.1", "parsing: '2. ዮሐንስ 1:1'");
expect(p.parse("2 ዮሐንስ 1:1").osis()).toEqual("2John.1.1", "parsing: '2 ዮሐንስ 1:1'");
expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
});
});
describe("Localized book 3John (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: 3John (am)", function() {
expect(p.parse("3. ዮሐንስ 1:1").osis()).toEqual("3John.1.1", "parsing: '3. ዮሐንስ 1:1'");
expect(p.parse("3 ዮሐንስ 1:1").osis()).toEqual("3John.1.1", "parsing: '3 ዮሐንስ 1:1'");
expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
p.include_apocrypha(false);
expect(p.parse("3. ዮሐንስ 1:1").osis()).toEqual("3John.1.1", "parsing: '3. ዮሐንስ 1:1'");
expect(p.parse("3 ዮሐንስ 1:1").osis()).toEqual("3John.1.1", "parsing: '3 ዮሐንስ 1:1'");
expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
});
});
describe("Localized book John (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: John (am)", function() {
expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
expect(p.parse("ዮሐንስ 1:1").osis()).toEqual("John.1.1", "parsing: 'ዮሐንስ 1:1'");
p.include_apocrypha(false);
expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
expect(p.parse("ዮሐንስ 1:1").osis()).toEqual("John.1.1", "parsing: 'ዮሐንስ 1:1'");
});
});
describe("Localized book Acts (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Acts (am)", function() {
expect(p.parse("ሐዋርያት ሥራ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ሐዋርያት ሥራ 1:1'");
expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
p.include_apocrypha(false);
expect(p.parse("ሐዋርያት ሥራ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ሐዋርያት ሥራ 1:1'");
expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
});
});
describe("Localized book Rom (am)", 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"
});
p.include_apocrypha(true);
});
it("should handle book: Rom (am)", function() {
expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
expect(p.parse("ሮሜ 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ሮሜ 1:1'");
p.include_apocrypha(false);
expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
expect(p.parse("ሮሜ 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ሮሜ 1:1'");
});
});
describe("Localized book 2Cor (am)", 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"