UNPKG

swordjs

Version:

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

1,541 lines (1,428 loc) 82.4 kB
// Generated by CoffeeScript 1.9.1 (function() { var bcv_parser; bcv_parser = require("../../js/th_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 (th)", 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 (th)", function() { expect(p.parse("ปฐมกาล 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("ปฐก 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("ปฐมกาล 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("ปฐก 1:1").osis()).toEqual("Gen.1.1") ; return true; }); }); describe("Localized book Exod (th)", 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 (th)", function() { expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("อพยพ 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("อพย 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("อพยพ 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("อพย 1:1").osis()).toEqual("Exod.1.1") ; return true; }); }); describe("Localized book Bel (th)", 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 (th)", function() { expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ; return true; }); }); describe("Localized book Lev (th)", 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 (th)", function() { expect(p.parse("เลวีนิติ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("ลนต 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("เลวีนิติ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("ลนต 1:1").osis()).toEqual("Lev.1.1") ; return true; }); }); describe("Localized book Num (th)", 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 (th)", function() { expect(p.parse("กันดารวิถี 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") expect(p.parse("กดว 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("กันดารวิถี 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("กดว 1:1").osis()).toEqual("Num.1.1") ; return true; }); }); describe("Localized book Sir (th)", 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 (th)", function() { expect(p.parse("บุตรสิรา 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ; return true; }); }); describe("Localized book Wis (th)", 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 (th)", function() { expect(p.parse("ปรีชาญาณ 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ; return true; }); }); describe("Localized book Lam (th)", 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 (th)", function() { expect(p.parse("บทเพลงคร่ำครวญ 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("เพลงคร่ำครวญ 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("พคค 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("บทเพลงคร่ำครวญ 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("เพลงคร่ำครวญ 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("พคค 1:1").osis()).toEqual("Lam.1.1") ; return true; }); }); describe("Localized book EpJer (th)", 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 (th)", function() { expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ; return true; }); }); describe("Localized book Rev (th)", 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 (th)", function() { expect(p.parse("วิวรณ์ 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("วว 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("วิวรณ์ 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("วว 1:1").osis()).toEqual("Rev.1.1") ; return true; }); }); describe("Localized book PrMan (th)", 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 (th)", function() { expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ; return true; }); }); describe("Localized book Deut (th)", 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 (th)", function() { expect(p.parse("เฉลย​ธรรม​บัญญัติ 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("เฉลยธรรมบัญญัติ 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("ฉธบ 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("เฉลย​ธรรม​บัญญัติ 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("เฉลยธรรมบัญญัติ 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("ฉธบ 1:1").osis()).toEqual("Deut.1.1") ; return true; }); }); describe("Localized book Josh (th)", 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 (th)", function() { expect(p.parse("โยชูวา 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("ยชว 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("โยชูวา 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("ยชว 1:1").osis()).toEqual("Josh.1.1") ; return true; }); }); describe("Localized book Judg (th)", 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 (th)", function() { expect(p.parse("ผู้วินิจฉัย 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("วนฉ 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("ผู้วินิจฉัย 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("วนฉ 1:1").osis()).toEqual("Judg.1.1") ; return true; }); }); describe("Localized book Ruth (th)", 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 (th)", function() { expect(p.parse("นางรูธ 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("นรธ 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("นางรูธ 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("นรธ 1:1").osis()).toEqual("Ruth.1.1") ; return true; }); }); describe("Localized book 1Esd (th)", 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 (th)", function() { expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ; return true; }); }); describe("Localized book 2Esd (th)", 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 (th)", function() { expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ; return true; }); }); describe("Localized book Isa (th)", 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 (th)", function() { expect(p.parse("อิสยาห์ 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("อสย 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("อิสยาห์ 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("อสย 1:1").osis()).toEqual("Isa.1.1") ; return true; }); }); describe("Localized book 2Sam (th)", 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 (th)", function() { expect(p.parse("2. ซามูเอล 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 ซามูเอล 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. ซมอ 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 ซมอ 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("2. ซามูเอล 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 ซามูเอล 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. ซมอ 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 ซมอ 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") ; return true; }); }); describe("Localized book 1Sam (th)", 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 (th)", function() { expect(p.parse("1. ซามูเอล 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 ซามูเอล 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. ซมอ 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 ซมอ 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("1. ซามูเอล 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 ซามูเอล 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. ซมอ 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 ซมอ 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") ; return true; }); }); describe("Localized book 2Kgs (th)", 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 (th)", function() { expect(p.parse("2. พงศ์กษัตริย์ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 พงศ์กษัตริย์ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. พกษ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 พกษ 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("2. พงศ์กษัตริย์ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 พงศ์กษัตริย์ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. พกษ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 พกษ 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") ; return true; }); }); describe("Localized book 1Kgs (th)", 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 (th)", function() { expect(p.parse("1. พงศ์กษัตริย์ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 พงศ์กษัตริย์ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. พกษ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 พกษ 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("1. พงศ์กษัตริย์ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 พงศ์กษัตริย์ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. พกษ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 พกษ 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") ; return true; }); }); describe("Localized book 2Chr (th)", 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 (th)", function() { expect(p.parse("2. พงศาวดาร 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 พงศาวดาร 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. พศด 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 พศด 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("2. พงศาวดาร 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 พงศาวดาร 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. พศด 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 พศด 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ; return true; }); }); describe("Localized book 1Chr (th)", 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 (th)", function() { expect(p.parse("1. พงศาวดาร 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 พงศาวดาร 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. พศด 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 พศด 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("1. พงศาวดาร 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 พงศาวดาร 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. พศด 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 พศด 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ; return true; }); }); describe("Localized book Ezra (th)", 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 (th)", function() { expect(p.parse("เอสรา 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("อสร 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("เอสรา 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("อสร 1:1").osis()).toEqual("Ezra.1.1") ; return true; }); }); describe("Localized book Neh (th)", 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 (th)", function() { expect(p.parse("เนหะมีย์ 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("นหม 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("เนหะมีย์ 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("นหม 1:1").osis()).toEqual("Neh.1.1") ; return true; }); }); describe("Localized book GkEsth (th)", 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 (th)", function() { expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") ; return true; }); }); describe("Localized book Esth (th)", 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 (th)", function() { expect(p.parse("เอสเธอร์ 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("อสธ 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("เอสเธอร์ 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("อสธ 1:1").osis()).toEqual("Esth.1.1") ; return true; }); }); describe("Localized book Job (th)", 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 (th)", function() { expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") expect(p.parse("โยบ 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("โยบ 1:1").osis()).toEqual("Job.1.1") ; return true; }); }); describe("Localized book Ps (th)", 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 (th)", function() { expect(p.parse("เพลงสดุดี 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("สดุดี 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("สดด 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("เพลงสดุดี 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("สดุดี 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("สดด 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ; return true; }); }); describe("Localized book PrAzar (th)", 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 (th)", function() { expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") ; return true; }); }); describe("Localized book Prov (th)", 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 (th)", function() { expect(p.parse("สุภาษิต 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("สภษ 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("สุภาษิต 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("สภษ 1:1").osis()).toEqual("Prov.1.1") ; return true; }); }); describe("Localized book Eccl (th)", 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 (th)", function() { expect(p.parse("ปัญญาจารย์ 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ปญจ 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("ปัญญาจารย์ 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ปญจ 1:1").osis()).toEqual("Eccl.1.1") ; return true; }); }); describe("Localized book SgThree (th)", 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 (th)", function() { expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") ; return true; }); }); describe("Localized book Song (th)", 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 (th)", function() { expect(p.parse("เพลงซาโลมอน 1:1").osis()).toEqual("Song.1.1") expect(p.parse("เพลงโซโลมอน 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("พซม 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("เพลงซาโลมอน 1:1").osis()).toEqual("Song.1.1") expect(p.parse("เพลงโซโลมอน 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("พซม 1:1").osis()).toEqual("Song.1.1") ; return true; }); }); describe("Localized book Jer (th)", 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 (th)", function() { expect(p.parse("เยเรมียาห์ 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("เยเรมีย์ 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("ยรม 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("เยเรมียาห์ 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("เยเรมีย์ 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("ยรม 1:1").osis()).toEqual("Jer.1.1") ; return true; }); }); describe("Localized book Ezek (th)", 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 (th)", function() { expect(p.parse("เอเสเคียล 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("อสค 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("เอเสเคียล 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("อสค 1:1").osis()).toEqual("Ezek.1.1") ; return true; }); }); describe("Localized book Dan (th)", 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 (th)", function() { expect(p.parse("ดาเนียล 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("ดนล 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("ดาเนียล 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("ดนล 1:1").osis()).toEqual("Dan.1.1") ; return true; }); }); describe("Localized book Hos (th)", 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 (th)", function() { expect(p.parse("โฮเชยาห์ 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("โฮเชยา 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("ฮชย 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("โฮเชยาห์ 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("โฮเชยา 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("ฮชย 1:1").osis()).toEqual("Hos.1.1") ; return true; }); }); describe("Localized book Joel (th)", 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 (th)", function() { expect(p.parse("โยเอล 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("ยอล 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("โยเอล 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("ยอล 1:1").osis()).toEqual("Joel.1.1") ; return true; }); }); describe("Localized book Amos (th)", 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 (th)", function() { expect(p.parse("อาโมส 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("อมส 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("อาโมส 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("อมส 1:1").osis()).toEqual("Amos.1.1") ; return true; }); }); describe("Localized book Obad (th)", function() { var p; p = {}; beforeEach(function() { p = new bcv_parser; p.set_options({ book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" }); return p.include_apocrypha(true); }); return it("should handle book: Obad (th)", function() { expect(p.parse("โอบาดีย์ 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("โอบาดีห์ 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("อบด 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("โอบาดีย์ 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("โอบาดีห์ 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("อบด 1:1").osis()).toEqual("Obad.1.1") ; return true; }); }); describe("Localized book Jonah (th)", function() { var p; p = {}; beforeEach(function() { p = new bcv_parser; p.set_options({ book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" }); return p.include_apocrypha(true); }); return it("should handle book: Jonah (th)", function() { expect(p.parse("โยนาห์ 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("ยนา 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("โยนาห์ 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("ยนา 1:1").osis()).toEqual("Jonah.1.1") ; return true; }); }); describe("Localized book Mic (th)", 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: Mic (th)", function() { expect(p.parse("มีคาห์ 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("มคา 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("มีคาห์ 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("มคา 1:1").osis()).toEqual("Mic.1.1") ; return true; }); }); describe("Localized book Nah (th)", 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: Nah (th)", function() { expect(p.parse("นาฮูม 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("นฮม 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("นาฮูม 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("นฮม 1:1").osis()).toEqual("Nah.1.1") ; return true; }); }); describe("Localized book Hab (th)", 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: Hab (th)", function() { expect(p.parse("ฮาบากุก 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("ฮบก 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("ฮาบากุก 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("ฮบก 1:1").osis()).toEqual("Hab.1.1") ; return true; }); }); describe("Localized book Zeph (th)", 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: Zeph (th)", function() { expect(p.parse("เศฟันยาห์ 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ศฟย 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("เศฟันยาห์ 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ศฟย 1:1").osis()).toEqual("Zeph.1.1") ; return true; }); }); describe("Localized book Hag (th)", 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: Hag (th)", function() { expect(p.parse("ฮักกัย 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("ฮกก 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("ฮักกัย 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("ฮกก 1:1").osis()).toEqual("Hag.1.1") ; return true; }); }); describe("Localized book Zech (th)", 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: Zech (th)", function() { expect(p.parse("เศคาริยาห์ 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ศคย 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("เศคาริยาห์ 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ศคย 1:1").osis()).toEqual("Zech.1.1") ; return true; }); }); describe("Localized book Mal (th)", 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: Mal (th)", function() { expect(p.parse("มาลาคี 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("มลค 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("มาลาคี 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("มลค 1:1").osis()).toEqual("Mal.1.1") ; return true; }); }); describe("Localized book Matt (th)", 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: Matt (th)", function() { expect(p.parse("พระวรสารนักบุญแม็ทธิว 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("มัทธิว 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("มธ 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("พระวรสารนักบุญแม็ทธิว 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("มัทธิว 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("มธ 1:1").osis()).toEqual("Matt.1.1") ; return true; }); }); describe("Localized book Mark (th)", 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: Mark (th)", function() { expect(p.parse("พระวรสารนักบุญมาร์ค 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("มาระโก 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("มก 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("พระวรสารนักบุญมาร์ค 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("มาระโก 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("มก 1:1").osis()).toEqual("Mark.1.1") ; return true; }); }); describe("Localized book Luke (th)", 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: Luke (th)", function() { expect(p.parse("พระวรสารนักบุญลูค 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ลูกา 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ลก 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("พระวรสารนักบุญลูค 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ลูกา 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ลก 1:1").osis()).toEqual("Luke.1.1") ; return true; }); }); describe("Localized book 1John (th)", 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: 1John (th)", function() { expect(p.parse("1. ยอห์น 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 ยอห์น 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 ยน 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("1. ยอห์น 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 ยอห์น 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 ยน 1:1").osis()).toEqual("1John.1.1") ; return true; }); }); describe("Localized book 2John (th)", 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: 2John (th)", function() { expect(p.parse("2. ยอห์น 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 ยอห์น 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 ยน 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("2. ยอห์น 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 ยอห์น 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 ยน 1:1").osis()).toEqual("2John.1.1")