UNPKG

bible-ref-parse

Version:

Identifies and parses Bible references (like John 3:16) in over 40 languages.

1,798 lines 88.9 kB
(function() {
  var bcv_parser;

  bcv_parser = require("../../dist/si-bcv-parser.js").bcv_parser;

  describe("Parsing (si)", 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 (si)", 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 (si)", 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'");
      expect(p.parse("උත් 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත් 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'");
      expect(p.parse("උත් 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත් 1:1'");
    });
  });

  describe("Localized book Exod (si)", 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 (si)", function() {
      expect(p.parse("නිකුත්ති 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකුත්ති 1:1'");
      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("නිකුත්ති 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකුත්ති 1:1'");
      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 Lev (si)", 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 (si)", 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'");
      expect(p.parse("ලෙව 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙව 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'");
      expect(p.parse("ලෙව 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙව 1:1'");
    });
  });

  describe("Localized book Num (si)", 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 (si)", function() {
      expect(p.parse("සංඛ්‍යානය 1:1").osis()).toEqual("Num.1.1", "parsing: 'සංඛ්‍යානය 1:1'");
      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("සංඛ් 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 Lam (si)", 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 (si)", function() {
      expect(p.parse("විලාප ගීත 1:1").osis()).toEqual("Lam.1.1", "parsing: 'විලාප ගීත 1:1'");
      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("විලාප 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 Rev (si)", 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 (si)", function() {
      expect(p.parse("ප්‍රකාශන 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශන 1:1'");
      expect(p.parse("ප්‍රකාශ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශ 1:1'");
      expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Rev 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("ප්‍රකාශන 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශන 1:1'");
      expect(p.parse("ප්‍රකාශ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශ 1:1'");
      expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1", "parsing: 'REV 1:1'");
    });
  });

  describe("Localized book Deut (si)", 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 (si)", function() {
      expect(p.parse("ද්විතියෝපාදේශය 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විතියෝපාදේශය 1:1'");
      expect(p.parse("ද්විති 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විති 1:1'");
      expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("ද්විතියෝපාදේශය 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විතියෝපාදේශය 1:1'");
      expect(p.parse("ද්විති 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විති 1:1'");
      expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
    });
  });

  describe("Localized book Josh (si)", 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 (si)", function() {
      expect(p.parse("යෝෂුවා 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂුවා 1:1'");
      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("යෝෂුවා 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂුවා 1:1'");
      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 (si)", 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 (si)", 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'");
      expect(p.parse("විනි 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනි 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'");
      expect(p.parse("විනි 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනි 1:1'");
    });
  });

  describe("Localized book Ruth (si)", 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 (si)", 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 Isa (si)", 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 (si)", function() {
      expect(p.parse("යෙශායා 1:1").osis()).toEqual("Isa.1.1", "parsing: 'යෙශායා 1:1'");
      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("යෙශා 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 (si)", 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 (si)", 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("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("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 (si)", 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 (si)", function() {
      expect(p.parse("පළමු ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූවෙල් 1:1'");
      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("පළමු ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූ 1:1'");
      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").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූවෙල් 1:1'");
      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("පළමු ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූ 1:1'");
      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 (si)", 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 (si)", 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("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("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 (si)", 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 (si)", function() {
      expect(p.parse("පළමු රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජාවරු 1:1'");
      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("පළමු රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජා 1:1'");
      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").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජාවරු 1:1'");
      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("පළමු රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජා 1:1'");
      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 (si)", 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 (si)", 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("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("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 (si)", 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 (si)", function() {
      expect(p.parse("පළමු දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවීනාවංශය 1:1'");
      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("පළමු දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවී 1:1'");
      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").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවීනාවංශය 1:1'");
      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("පළමු දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවී 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("එස්රා 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'එස්රා 1:1'");
      expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("එස්රා 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'එස්රා 1:1'");
      expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
    });
  });

  describe("Localized book Neh (si)", 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 (si)", function() {
      expect(p.parse("නෙහෙමියා 1:1").osis()).toEqual("Neh.1.1", "parsing: 'නෙහෙමියා 1:1'");
      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("නෙහෙ 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 Esth (si)", 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 (si)", function() {
      expect(p.parse("එස්තා 1:1").osis()).toEqual("Esth.1.1", "parsing: 'එස්තා 1:1'");
      expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("එස්තා 1:1").osis()).toEqual("Esth.1.1", "parsing: 'එස්තා 1:1'");
      expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
    });
  });

  describe("Localized book Job (si)", 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 (si)", function() {
      expect(p.parse("යෝබ් 1:1").osis()).toEqual("Job.1.1", "parsing: 'යෝබ් 1:1'");
      expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("යෝබ් 1:1").osis()).toEqual("Job.1.1", "parsing: 'යෝබ් 1:1'");
      expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
    });
  });

  describe("Localized book Ps (si)", 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 (si)", function() {
      expect(p.parse("සංගීත 1:1").osis()).toEqual("Ps.1.1", "parsing: 'සංගීත 1:1'");
      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("සංගී 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 Prov (si)", 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 (si)", function() {
      expect(p.parse("සංඥාවන් 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥාවන් 1:1'");
      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("සංඥාවන් 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥාවන් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("ප්‍රකාශකයා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකාශකයා 1:1'");
      expect(p.parse("ප්‍රකා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකා 1:1'");
      expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("ප්‍රකාශකයා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකාශකයා 1:1'");
      expect(p.parse("ප්‍රකා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකා 1:1'");
      expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
    });
  });

  describe("Localized book Song (si)", 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 (si)", 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'");
      expect(p.parse("ගීතා 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතා 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'");
      expect(p.parse("ගීතා 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතා 1:1'");
    });
  });

  describe("Localized book Jer (si)", 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 (si)", function() {
      expect(p.parse("යෙරෙමියා 1:1").osis()).toEqual("Jer.1.1", "parsing: 'යෙරෙමියා 1:1'");
      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("යෙරෙ 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 (si)", 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 (si)", 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'");
      expect(p.parse("යෙහෙ 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙ 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'");
      expect(p.parse("යෙහෙ 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙ 1:1'");
    });
  });

  describe("Localized book Dan (si)", 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 (si)", function() {
      expect(p.parse("දානියෙල් 1:1").osis()).toEqual("Dan.1.1", "parsing: 'දානියෙල් 1:1'");
      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("දානියෙ 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 (si)", 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 (si)", function() {
      expect(p.parse("හෝශෙයා 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙයා 1:1'");
      expect(p.parse("හෝශෙ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙ 1:1'");
      expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("හෝශෙයා 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙයා 1:1'");
      expect(p.parse("හෝශෙ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙ 1:1'");
      expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
    });
  });

  describe("Localized book Joel (si)", 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 (si)", 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'");
      expect(p.parse("යෝව 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝව 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'");
      expect(p.parse("යෝව 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝව 1:1'");
    });
  });

  describe("Localized book Amos (si)", 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 (si)", function() {
      expect(p.parse("ඇමෝස් 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝස් 1:1'");
      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("ඇමෝස් 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝස් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("ඕබදියා 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබදියා 1:1'");
      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("ඕබදියා 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබදියා 1:1'");
      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 (si)", 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 (si)", 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 (si)", 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 (si)", 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 (si)", 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 (si)", function() {
      expect(p.parse("නාහුම් 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහුම් 1:1'");
      expect(p.parse("නාහු 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහු 1:1'");
      expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("නාහුම් 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහුම් 1:1'");
      expect(p.parse("නාහු 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහු 1:1'");
      expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
    });
  });

  describe("Localized book Hab (si)", 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 (si)", function() {
      expect(p.parse("හබකුක් 1:1").osis()).toEqual("Hab.1.1", "parsing: 'හබකුක් 1:1'");
      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("හබකු 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 (si)", 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 (si)", 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'");
      expect(p.parse("සෙෆන 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆන 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'");
      expect(p.parse("සෙෆන 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆන 1:1'");
    });
  });

  describe("Localized book Hag (si)", 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 (si)", function() {
      expect(p.parse("හග්ගායී 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගායී 1:1'");
      expect(p.parse("හග්ගා 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගා 1:1'");
      expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("හග්ගායී 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගායී 1:1'");
      expect(p.parse("හග්ගා 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගා 1:1'");
      expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
    });
  });

  describe("Localized book Zech (si)", 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 (si)", 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 (si)", 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 (si)", 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'");
      expect(p.parse("මලා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලා 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'");
      expect(p.parse("මලා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලා 1:1'");
    });
  });

  describe("Localized book Matt (si)", 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 (si)", function() {
      expect(p.parse("මතෙව් 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙව් 1:1'");
      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("මතෙව් 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙව් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("මාර்க்கුස් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර்க்கුස් 1:1'");
      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("මාර்க்கුස් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර்க்கුස් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("ලූක්කුස් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක්කුස් 1:1'");
      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("ලූක්කුස් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක්කුස් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("පළමු යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහාන් 1:1'");
      expect(p.parse("1. යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහාන් 1:1'");
      expect(p.parse("පළමු යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහා 1:1'");
      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("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").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහාන් 1:1'");
      expect(p.parse("1. යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහාන් 1:1'");
      expect(p.parse("පළමු යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහා 1:1'");
      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("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 (si)", 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 (si)", 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("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("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 (si)", 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 (si)", 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("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("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 (si)", 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 (si)", function() {
      expect(p.parse("යෝහාන් 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහාන් 1:1'");
      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("යෝහාන් 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහාන් 1:1'");
      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 (si)", 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 (si)", function() {
      expect(p.parse("ප්‍රේක්ෂකයන්ගේ කතෘ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ප්‍රේක්ෂකයන්ගේ කතෘ 1:1'");
      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("ප්‍රේක්ෂ 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 (si)", 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 (si)", function() {
      expect(p.parse("රෝමා 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝමා 1:1'");
      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("රෝමා 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝමා 1:1'");
      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 (si)", 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: 2Cor (si)", function() {
      expect(p.parse("2. කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරින්ති 1:1'");
      expect(p.parse("2 කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරින්ති 1:1'");
      expect(p.parse("2. කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරි 1:1'");
      expect(p.parse("2 කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරි 1:1'");
      expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("2. කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරින්ති 1:1'");
      expect(p.parse("2 කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරින්ති 1:1'");
      expect(p.parse("2. කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරි 1:1'");
      expect(p.parse("2 කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරි 1:1'");
      expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
    });
  });

  describe("Localized book 1Cor (si)", 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: 1Cor (si)", function() {
      expect(p.parse("පළමු කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරින්ති 1:1'");
      expect(p.parse("1. කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරින්ති 1:1'");
      expect(p.parse("1 කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරින්ති 1:1'");
      expect(p.parse("පළමු කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරි 1:1'");
      expect(p.parse("1. කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරි 1:1'");
      expect(p.parse("1 කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරි 1:1'");
      expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පළමු කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරින්ති 1:1'");
      expect(p.parse("1. කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරින්ති 1:1'");
      expect(p.parse("1 කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරින්ති 1:1'");
      expect(p.parse("පළමු කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරි 1:1'");
      expect(p.parse("1. කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරි 1:1'");
      expect(p.parse("1 කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරි 1:1'");
      expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
    });
  });

  describe("Localized book Gal (si)", 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: Gal (si)", function() {
      expect(p.parse("ගලාතිය 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලාතිය 1:1'");
      expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
      expect(p.parse("ගලා 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලා 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("ගලාතිය 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලාතිය 1:1'");
      expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
      expect(p.parse("ගලා 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලා 1:1'");
    });
  });

  describe("Localized book Eph (si)", 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: Eph (si)", function() {
      expect(p.parse("එෆෙසියන් 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසියන් 1:1'");
      expect(p.parse("එෆෙසි 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසි 1:1'");
      expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("එෆෙසියන් 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසියන් 1:1'");
      expect(p.parse("එෆෙසි 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසි 1:1'");
      expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
    });
  });

  describe("Localized book Phil (si)", 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: Phil (si)", function() {
      expect(p.parse("පිලිප්පයි 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප්පයි 1:1'");
      expect(p.parse("පිලිප් 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප් 1:1'");
      expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පිලිප්පයි 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප්පයි 1:1'");
      expect(p.parse("පිලිප් 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප් 1:1'");
      expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
    });
  });

  describe("Localized book Col (si)", 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: Col (si)", function() {
      expect(p.parse("කොලෝසිය 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝසිය 1:1'");
      expect(p.parse("කොලෝ 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝ 1:1'");
      expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("කොලෝසිය 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝසිය 1:1'");
      expect(p.parse("කොලෝ 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝ 1:1'");
      expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
    });
  });

  describe("Localized book 2Thess (si)", 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: 2Thess (si)", function() {
      expect(p.parse("2. තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙසලොනික 1:1'");
      expect(p.parse("2 තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙසලොනික 1:1'");
      expect(p.parse("2. තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙස 1:1'");
      expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
      expect(p.parse("2 තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙස 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("2. තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙසලොනික 1:1'");
      expect(p.parse("2 තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙසලොනික 1:1'");
      expect(p.parse("2. තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙස 1:1'");
      expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
      expect(p.parse("2 තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙස 1:1'");
    });
  });

  describe("Localized book 1Thess (si)", 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: 1Thess (si)", function() {
      expect(p.parse("පළමු තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙසලොනික 1:1'");
      expect(p.parse("1. තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙසලොනික 1:1'");
      expect(p.parse("1 තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙසලොනික 1:1'");
      expect(p.parse("පළමු තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙස 1:1'");
      expect(p.parse("1. තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙස 1:1'");
      expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
      expect(p.parse("1 තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙස 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පළමු තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙසලොනික 1:1'");
      expect(p.parse("1. තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙසලොනික 1:1'");
      expect(p.parse("1 තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙසලොනික 1:1'");
      expect(p.parse("පළමු තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙස 1:1'");
      expect(p.parse("1. තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙස 1:1'");
      expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
      expect(p.parse("1 තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙස 1:1'");
    });
  });

  describe("Localized book 2Tim (si)", 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: 2Tim (si)", function() {
      expect(p.parse("2. තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝති 1:1'");
      expect(p.parse("2 තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝති 1:1'");
      expect(p.parse("2. තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝ 1:1'");
      expect(p.parse("2 තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝ 1:1'");
      expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("2. තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝති 1:1'");
      expect(p.parse("2 තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝති 1:1'");
      expect(p.parse("2. තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝ 1:1'");
      expect(p.parse("2 තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝ 1:1'");
      expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
    });
  });

  describe("Localized book 1Tim (si)", 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: 1Tim (si)", function() {
      expect(p.parse("පළමු තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝති 1:1'");
      expect(p.parse("1. තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝති 1:1'");
      expect(p.parse("පළමු තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝ 1:1'");
      expect(p.parse("1 තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝති 1:1'");
      expect(p.parse("1. තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝ 1:1'");
      expect(p.parse("1 තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝ 1:1'");
      expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පළමු තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝති 1:1'");
      expect(p.parse("1. තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝති 1:1'");
      expect(p.parse("පළමු තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝ 1:1'");
      expect(p.parse("1 තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝති 1:1'");
      expect(p.parse("1. තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝ 1:1'");
      expect(p.parse("1 තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝ 1:1'");
      expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
    });
  });

  describe("Localized book Titus (si)", 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: Titus (si)", function() {
      expect(p.parse("තීතොස් 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතොස් 1:1'");
      expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
      expect(p.parse("තීතො 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතො 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("තීතොස් 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතොස් 1:1'");
      expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
      expect(p.parse("තීතො 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතො 1:1'");
    });
  });

  describe("Localized book Phlm (si)", 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: Phlm (si)", function() {
      expect(p.parse("පිලෙමොන් 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමොන් 1:1'");
      expect(p.parse("පිලෙමො 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමො 1:1'");
      expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පිලෙමොන් 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමොන් 1:1'");
      expect(p.parse("පිලෙමො 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමො 1:1'");
      expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
    });
  });

  describe("Localized book Heb (si)", 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: Heb (si)", function() {
      expect(p.parse("හෙබ්රෙව් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ්රෙව් 1:1'");
      expect(p.parse("හෙබ් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ් 1:1'");
      expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("හෙබ්රෙව් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ්රෙව් 1:1'");
      expect(p.parse("හෙබ් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ් 1:1'");
      expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
    });
  });

  describe("Localized book Jas (si)", 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: Jas (si)", function() {
      expect(p.parse("යාකොබ් 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකොබ් 1:1'");
      expect(p.parse("යාකො 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකො 1:1'");
      expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("යාකොබ් 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකොබ් 1:1'");
      expect(p.parse("යාකො 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකො 1:1'");
      expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
    });
  });

  describe("Localized book 2Pet (si)", 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: 2Pet (si)", function() {
      expect(p.parse("2. පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේදුරු 1:1'");
      expect(p.parse("2 පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේදුරු 1:1'");
      expect(p.parse("2. පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේද 1:1'");
      expect(p.parse("2 පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේද 1:1'");
      expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("2. පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේදුරු 1:1'");
      expect(p.parse("2 පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේදුරු 1:1'");
      expect(p.parse("2. පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේද 1:1'");
      expect(p.parse("2 පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේද 1:1'");
      expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
    });
  });

  describe("Localized book 1Pet (si)", 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: 1Pet (si)", function() {
      expect(p.parse("පළමු පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේදුරු 1:1'");
      expect(p.parse("1. පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේදුරු 1:1'");
      expect(p.parse("1 පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේදුරු 1:1'");
      expect(p.parse("පළමු පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේද 1:1'");
      expect(p.parse("1. පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේද 1:1'");
      expect(p.parse("1 පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේද 1:1'");
      expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("පළමු පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේදුරු 1:1'");
      expect(p.parse("1. පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේදුරු 1:1'");
      expect(p.parse("1 පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේදුරු 1:1'");
      expect(p.parse("පළමු පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේද 1:1'");
      expect(p.parse("1. පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේද 1:1'");
      expect(p.parse("1 පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේද 1:1'");
      expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
    });
  });

  describe("Localized book Jude (si)", 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: Jude (si)", function() {
      expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
      expect(p.parse("යූද 1:1").osis()).toEqual("Jude.1.1", "parsing: 'යූද 1:1'");
      p.include_apocrypha(false);
      expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
      expect(p.parse("යූද 1:1").osis()).toEqual("Jude.1.1", "parsing: 'යූද 1:1'");
    });
  });

  describe("Miscellaneous tests", 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 return the expected language", function() {
      expect(p.languages).toEqual(["si"]);
    });
    it("should handle ranges (si)", function() {
      expect(p.parse("Titus 1:1 සිට 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 සිට 2'");
      expect(p.parse("Matt 1සිට2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1සිට2'");
      expect(p.parse("Phlm 2 සිට 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 සිට 3'");
    });
    it("should handle chapters (si)", function() {
      expect(p.parse("Titus 1:1, වන පරිච්ඡේදය 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, වන පරිච්ඡේදය 2'");
      expect(p.parse("Matt 3:4 වන පරිච්ඡේදය 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 වන පරිච්ඡේදය 6'");
    });
    it("should handle verses (si)", function() {
      expect(p.parse("Exod 1:1 වන පදයට 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 වන පදයට 3'");
      expect(p.parse("Phlm වන පදයට 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm වන පදයට 6'");
    });
    it("should handle 'and' (si)", function() {
      expect(p.parse("Exod 1:1 සහ 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 සහ 3'");
      expect(p.parse("Phlm 2 සහ 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 සහ 6'");
    });
    it("should handle titles (si)", function() {
      expect(p.parse("Ps 3 මාතෘකාව, 4:2, 5:මාතෘකාව").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 මාතෘකාව, 4:2, 5:මාතෘකාව'");
      expect(p.parse("PS 3 මාතෘකාව, 4:2, 5:මාතෘකාව").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 මාතෘකාව, 4:2, 5:මාතෘකාව'");
    });
    it("should handle 'ff' (si)", function() {
      expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
      expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'REV 3 FF, 4:2 FF'");
    });
    it("should handle translations (si)", function() {
      expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
      expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
    });
    it("should handle book ranges (si)", function() {
      p.set_options({
        book_alone_strategy: "full",
        book_range_strategy: "include"
      });
      expect(p.parse("1 සිට 3  යෝහා").osis()).toEqual("1John.1-3John.1", "parsing: '1 සිට 3  යෝහා'");
    });
    return it("should handle boundaries (si)", function() {
      p.set_options({
        book_alone_strategy: "full"
      });
      expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
      expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
    });
  });

}).call(this);