bible-ref-parse 3.0.14 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/am-bcv-parser.js +7218 -0
  2. package/dist/am-bcv-parser.min.js +1 -0
  3. package/dist/bb-bcv-parser.js +7247 -0
  4. package/dist/bb-bcv-parser.min.js +1 -0
  5. package/dist/bn-bcv-parser.js +7229 -0
  6. package/dist/bn-bcv-parser.min.js +1 -0
  7. package/dist/ee-bcv-parser.js +7127 -0
  8. package/dist/ee-bcv-parser.min.js +1 -0
  9. package/dist/hl-bcv-parser.js +7127 -0
  10. package/dist/hl-bcv-parser.min.js +1 -0
  11. package/dist/id-bcv-parser.js +7116 -0
  12. package/dist/id-bcv-parser.min.js +1 -0
  13. package/dist/lu-bcv-parser.js +7203 -0
  14. package/dist/lu-bcv-parser.min.js +1 -0
  15. package/dist/mg-bcv-parser.js +7116 -0
  16. package/dist/mg-bcv-parser.min.js +1 -0
  17. package/dist/mq-bcv-parser.js +7114 -0
  18. package/dist/mq-bcv-parser.min.js +1 -0
  19. package/dist/nd-bcv-parser.js +7116 -0
  20. package/dist/nd-bcv-parser.min.js +1 -0
  21. package/dist/ny-bcv-parser.js +7125 -0
  22. package/dist/ny-bcv-parser.min.js +1 -0
  23. package/dist/si-bcv-parser.js +7171 -0
  24. package/dist/si-bcv-parser.min.js +1 -0
  25. package/dist/test/am.spec.js +1939 -0
  26. package/dist/test/bb.spec.js +2083 -0
  27. package/dist/test/bn.spec.js +2340 -0
  28. package/dist/test/ee.spec.js +1781 -0
  29. package/dist/test/hl.spec.js +1771 -0
  30. package/dist/test/id.spec.js +1757 -0
  31. package/dist/test/lu.spec.js +1759 -0
  32. package/dist/test/mg.spec.js +1783 -0
  33. package/dist/test/mq.spec.js +1745 -0
  34. package/dist/test/nd.spec.js +1781 -0
  35. package/dist/test/ny.spec.js +1791 -0
  36. package/dist/test/si.spec.js +1797 -0
  37. package/dist/test/zu.spec.js +2075 -0
  38. package/dist/zu-bcv-parser.js +7236 -0
  39. package/dist/zu-bcv-parser.min.js +1 -0
  40. package/package.json +1 -1
@@ -0,0 +1,1797 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/si-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (si)", function() {
7
+ var p;
8
+ p = {};
9
+ beforeEach(function() {
10
+ p = new bcv_parser();
11
+ p.options.osis_compaction_strategy = "b";
12
+ p.options.sequence_combination_strategy = "combine";
13
+ });
14
+ it("should round-trip OSIS references", function() {
15
+ var bc, bcv, bcv_range, book, books, i, len;
16
+ p.set_options({
17
+ osis_compaction_strategy: "bc"
18
+ });
19
+ 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"];
20
+ for (i = 0, len = books.length; i < len; i++) {
21
+ book = books[i];
22
+ bc = book + ".1";
23
+ bcv = bc + ".1";
24
+ bcv_range = bcv + "-" + bc + ".2";
25
+ expect(p.parse(bc).osis()).toEqual(bc);
26
+ expect(p.parse(bcv).osis()).toEqual(bcv);
27
+ expect(p.parse(bcv_range).osis()).toEqual(bcv_range);
28
+ }
29
+ });
30
+ it("should round-trip OSIS Apocrypha references", function() {
31
+ var bc, bcv, bcv_range, book, books, i, j, len, len1;
32
+ p.set_options({
33
+ osis_compaction_strategy: "bc",
34
+ ps151_strategy: "b"
35
+ });
36
+ p.include_apocrypha(true);
37
+ books = ["Tob", "Jdt", "GkEsth", "Wis", "Sir", "Bar", "PrAzar", "Sus", "Bel", "SgThree", "EpJer", "1Macc", "2Macc", "3Macc", "4Macc", "1Esd", "2Esd", "PrMan", "Ps151"];
38
+ for (i = 0, len = books.length; i < len; i++) {
39
+ book = books[i];
40
+ bc = book + ".1";
41
+ bcv = bc + ".1";
42
+ bcv_range = bcv + "-" + bc + ".2";
43
+ expect(p.parse(bc).osis()).toEqual(bc);
44
+ expect(p.parse(bcv).osis()).toEqual(bcv);
45
+ expect(p.parse(bcv_range).osis()).toEqual(bcv_range);
46
+ }
47
+ p.set_options({
48
+ ps151_strategy: "bc"
49
+ });
50
+ expect(p.parse("Ps151.1").osis()).toEqual("Ps.151");
51
+ expect(p.parse("Ps151.1.1").osis()).toEqual("Ps.151.1");
52
+ expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual("Ps.151.1-Ps.151.2");
53
+ p.include_apocrypha(false);
54
+ for (j = 0, len1 = books.length; j < len1; j++) {
55
+ book = books[j];
56
+ bc = book + ".1";
57
+ expect(p.parse(bc).osis()).toEqual("");
58
+ }
59
+ });
60
+ it("should handle a preceding character", function() {
61
+ expect(p.parse(" Gen 1").osis()).toEqual("Gen.1");
62
+ expect(p.parse("Matt5John3").osis()).toEqual("Matt.5,John.3");
63
+ expect(p.parse("1Ps 1").osis()).toEqual("");
64
+ expect(p.parse("11Sam 1").osis()).toEqual("");
65
+ });
66
+ });
67
+
68
+ describe("Localized book Gen (si)", function() {
69
+ var p;
70
+ p = {};
71
+ beforeEach(function() {
72
+ p = new bcv_parser();
73
+ p.set_options({
74
+ book_alone_strategy: "ignore",
75
+ book_sequence_strategy: "ignore",
76
+ osis_compaction_strategy: "bc",
77
+ captive_end_digits_strategy: "delete"
78
+ });
79
+ p.include_apocrypha(true);
80
+ });
81
+ it("should handle book: Gen (si)", function() {
82
+ expect(p.parse("උත්පත්ති 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත්පත්ති 1:1'");
83
+ expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Gen 1:1'");
84
+ expect(p.parse("උත් 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත් 1:1'");
85
+ p.include_apocrypha(false);
86
+ expect(p.parse("උත්පත්ති 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත්පත්ති 1:1'");
87
+ expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GEN 1:1'");
88
+ expect(p.parse("උත් 1:1").osis()).toEqual("Gen.1.1", "parsing: 'උත් 1:1'");
89
+ });
90
+ });
91
+
92
+ describe("Localized book Exod (si)", function() {
93
+ var p;
94
+ p = {};
95
+ beforeEach(function() {
96
+ p = new bcv_parser();
97
+ p.set_options({
98
+ book_alone_strategy: "ignore",
99
+ book_sequence_strategy: "ignore",
100
+ osis_compaction_strategy: "bc",
101
+ captive_end_digits_strategy: "delete"
102
+ });
103
+ p.include_apocrypha(true);
104
+ });
105
+ it("should handle book: Exod (si)", function() {
106
+ expect(p.parse("නිකුත්ති 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකුත්ති 1:1'");
107
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
108
+ expect(p.parse("නිකු 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකු 1:1'");
109
+ p.include_apocrypha(false);
110
+ expect(p.parse("නිකුත්ති 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකුත්ති 1:1'");
111
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
112
+ expect(p.parse("නිකු 1:1").osis()).toEqual("Exod.1.1", "parsing: 'නිකු 1:1'");
113
+ });
114
+ });
115
+
116
+ describe("Localized book Lev (si)", function() {
117
+ var p;
118
+ p = {};
119
+ beforeEach(function() {
120
+ p = new bcv_parser();
121
+ p.set_options({
122
+ book_alone_strategy: "ignore",
123
+ book_sequence_strategy: "ignore",
124
+ osis_compaction_strategy: "bc",
125
+ captive_end_digits_strategy: "delete"
126
+ });
127
+ p.include_apocrypha(true);
128
+ });
129
+ it("should handle book: Lev (si)", function() {
130
+ expect(p.parse("ලෙවියකරු 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙවියකරු 1:1'");
131
+ expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lev 1:1'");
132
+ expect(p.parse("ලෙව 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙව 1:1'");
133
+ p.include_apocrypha(false);
134
+ expect(p.parse("ලෙවියකරු 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙවියකරු 1:1'");
135
+ expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEV 1:1'");
136
+ expect(p.parse("ලෙව 1:1").osis()).toEqual("Lev.1.1", "parsing: 'ලෙව 1:1'");
137
+ });
138
+ });
139
+
140
+ describe("Localized book Num (si)", function() {
141
+ var p;
142
+ p = {};
143
+ beforeEach(function() {
144
+ p = new bcv_parser();
145
+ p.set_options({
146
+ book_alone_strategy: "ignore",
147
+ book_sequence_strategy: "ignore",
148
+ osis_compaction_strategy: "bc",
149
+ captive_end_digits_strategy: "delete"
150
+ });
151
+ p.include_apocrypha(true);
152
+ });
153
+ it("should handle book: Num (si)", function() {
154
+ expect(p.parse("සංඛ්‍යානය 1:1").osis()).toEqual("Num.1.1", "parsing: 'සංඛ්‍යානය 1:1'");
155
+ expect(p.parse("සංඛ් 1:1").osis()).toEqual("Num.1.1", "parsing: 'සංඛ් 1:1'");
156
+ expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
157
+ p.include_apocrypha(false);
158
+ expect(p.parse("සංඛ්‍යානය 1:1").osis()).toEqual("Num.1.1", "parsing: 'සංඛ්‍යානය 1:1'");
159
+ expect(p.parse("සංඛ් 1:1").osis()).toEqual("Num.1.1", "parsing: 'සංඛ් 1:1'");
160
+ expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
161
+ });
162
+ });
163
+
164
+ describe("Localized book Lam (si)", function() {
165
+ var p;
166
+ p = {};
167
+ beforeEach(function() {
168
+ p = new bcv_parser();
169
+ p.set_options({
170
+ book_alone_strategy: "ignore",
171
+ book_sequence_strategy: "ignore",
172
+ osis_compaction_strategy: "bc",
173
+ captive_end_digits_strategy: "delete"
174
+ });
175
+ p.include_apocrypha(true);
176
+ });
177
+ it("should handle book: Lam (si)", function() {
178
+ expect(p.parse("විලාප ගීත 1:1").osis()).toEqual("Lam.1.1", "parsing: 'විලාප ගීත 1:1'");
179
+ expect(p.parse("විලාප 1:1").osis()).toEqual("Lam.1.1", "parsing: 'විලාප 1:1'");
180
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
181
+ p.include_apocrypha(false);
182
+ expect(p.parse("විලාප ගීත 1:1").osis()).toEqual("Lam.1.1", "parsing: 'විලාප ගීත 1:1'");
183
+ expect(p.parse("විලාප 1:1").osis()).toEqual("Lam.1.1", "parsing: 'විලාප 1:1'");
184
+ expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
185
+ });
186
+ });
187
+
188
+ describe("Localized book Rev (si)", function() {
189
+ var p;
190
+ p = {};
191
+ beforeEach(function() {
192
+ p = new bcv_parser();
193
+ p.set_options({
194
+ book_alone_strategy: "ignore",
195
+ book_sequence_strategy: "ignore",
196
+ osis_compaction_strategy: "bc",
197
+ captive_end_digits_strategy: "delete"
198
+ });
199
+ p.include_apocrypha(true);
200
+ });
201
+ it("should handle book: Rev (si)", function() {
202
+ expect(p.parse("ප්‍රකාශන 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශන 1:1'");
203
+ expect(p.parse("ප්‍රකාශ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශ 1:1'");
204
+ expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Rev 1:1'");
205
+ p.include_apocrypha(false);
206
+ expect(p.parse("ප්‍රකාශන 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශන 1:1'");
207
+ expect(p.parse("ප්‍රකාශ 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ප්‍රකාශ 1:1'");
208
+ expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1", "parsing: 'REV 1:1'");
209
+ });
210
+ });
211
+
212
+ describe("Localized book Deut (si)", function() {
213
+ var p;
214
+ p = {};
215
+ beforeEach(function() {
216
+ p = new bcv_parser();
217
+ p.set_options({
218
+ book_alone_strategy: "ignore",
219
+ book_sequence_strategy: "ignore",
220
+ osis_compaction_strategy: "bc",
221
+ captive_end_digits_strategy: "delete"
222
+ });
223
+ p.include_apocrypha(true);
224
+ });
225
+ it("should handle book: Deut (si)", function() {
226
+ expect(p.parse("ද්විතියෝපාදේශය 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විතියෝපාදේශය 1:1'");
227
+ expect(p.parse("ද්විති 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විති 1:1'");
228
+ expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
229
+ p.include_apocrypha(false);
230
+ expect(p.parse("ද්විතියෝපාදේශය 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විතියෝපාදේශය 1:1'");
231
+ expect(p.parse("ද්විති 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ද්විති 1:1'");
232
+ expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
233
+ });
234
+ });
235
+
236
+ describe("Localized book Josh (si)", function() {
237
+ var p;
238
+ p = {};
239
+ beforeEach(function() {
240
+ p = new bcv_parser();
241
+ p.set_options({
242
+ book_alone_strategy: "ignore",
243
+ book_sequence_strategy: "ignore",
244
+ osis_compaction_strategy: "bc",
245
+ captive_end_digits_strategy: "delete"
246
+ });
247
+ p.include_apocrypha(true);
248
+ });
249
+ it("should handle book: Josh (si)", function() {
250
+ expect(p.parse("යෝෂුවා 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂුවා 1:1'");
251
+ expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josh 1:1'");
252
+ expect(p.parse("යෝෂු 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂු 1:1'");
253
+ p.include_apocrypha(false);
254
+ expect(p.parse("යෝෂුවා 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂුවා 1:1'");
255
+ expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSH 1:1'");
256
+ expect(p.parse("යෝෂු 1:1").osis()).toEqual("Josh.1.1", "parsing: 'යෝෂු 1:1'");
257
+ });
258
+ });
259
+
260
+ describe("Localized book Judg (si)", function() {
261
+ var p;
262
+ p = {};
263
+ beforeEach(function() {
264
+ p = new bcv_parser();
265
+ p.set_options({
266
+ book_alone_strategy: "ignore",
267
+ book_sequence_strategy: "ignore",
268
+ osis_compaction_strategy: "bc",
269
+ captive_end_digits_strategy: "delete"
270
+ });
271
+ p.include_apocrypha(true);
272
+ });
273
+ it("should handle book: Judg (si)", function() {
274
+ expect(p.parse("විනිශ්චයකාරවරු 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනිශ්චයකාරවරු 1:1'");
275
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
276
+ expect(p.parse("විනි 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනි 1:1'");
277
+ p.include_apocrypha(false);
278
+ expect(p.parse("විනිශ්චයකාරවරු 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනිශ්චයකාරවරු 1:1'");
279
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
280
+ expect(p.parse("විනි 1:1").osis()).toEqual("Judg.1.1", "parsing: 'විනි 1:1'");
281
+ });
282
+ });
283
+
284
+ describe("Localized book Ruth (si)", function() {
285
+ var p;
286
+ p = {};
287
+ beforeEach(function() {
288
+ p = new bcv_parser();
289
+ p.set_options({
290
+ book_alone_strategy: "ignore",
291
+ book_sequence_strategy: "ignore",
292
+ osis_compaction_strategy: "bc",
293
+ captive_end_digits_strategy: "delete"
294
+ });
295
+ p.include_apocrypha(true);
296
+ });
297
+ it("should handle book: Ruth (si)", function() {
298
+ expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
299
+ expect(p.parse("රුත් 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'රුත් 1:1'");
300
+ p.include_apocrypha(false);
301
+ expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
302
+ expect(p.parse("රුත් 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'රුත් 1:1'");
303
+ });
304
+ });
305
+
306
+ describe("Localized book Isa (si)", function() {
307
+ var p;
308
+ p = {};
309
+ beforeEach(function() {
310
+ p = new bcv_parser();
311
+ p.set_options({
312
+ book_alone_strategy: "ignore",
313
+ book_sequence_strategy: "ignore",
314
+ osis_compaction_strategy: "bc",
315
+ captive_end_digits_strategy: "delete"
316
+ });
317
+ p.include_apocrypha(true);
318
+ });
319
+ it("should handle book: Isa (si)", function() {
320
+ expect(p.parse("යෙශායා 1:1").osis()).toEqual("Isa.1.1", "parsing: 'යෙශායා 1:1'");
321
+ expect(p.parse("යෙශා 1:1").osis()).toEqual("Isa.1.1", "parsing: 'යෙශා 1:1'");
322
+ expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
323
+ p.include_apocrypha(false);
324
+ expect(p.parse("යෙශායා 1:1").osis()).toEqual("Isa.1.1", "parsing: 'යෙශායා 1:1'");
325
+ expect(p.parse("යෙශා 1:1").osis()).toEqual("Isa.1.1", "parsing: 'යෙශා 1:1'");
326
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
327
+ });
328
+ });
329
+
330
+ describe("Localized book 2Sam (si)", function() {
331
+ var p;
332
+ p = {};
333
+ beforeEach(function() {
334
+ p = new bcv_parser();
335
+ p.set_options({
336
+ book_alone_strategy: "ignore",
337
+ book_sequence_strategy: "ignore",
338
+ osis_compaction_strategy: "bc",
339
+ captive_end_digits_strategy: "delete"
340
+ });
341
+ p.include_apocrypha(true);
342
+ });
343
+ it("should handle book: 2Sam (si)", function() {
344
+ expect(p.parse("2. ශමූවෙල් 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ශමූවෙල් 1:1'");
345
+ expect(p.parse("2 ශමූවෙල් 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ශමූවෙල් 1:1'");
346
+ expect(p.parse("2. ශමූ 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ශමූ 1:1'");
347
+ expect(p.parse("2 ශමූ 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ශමූ 1:1'");
348
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
349
+ p.include_apocrypha(false);
350
+ expect(p.parse("2. ශමූවෙල් 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ශමූවෙල් 1:1'");
351
+ expect(p.parse("2 ශමූවෙල් 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ශමූවෙල් 1:1'");
352
+ expect(p.parse("2. ශමූ 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. ශමූ 1:1'");
353
+ expect(p.parse("2 ශමූ 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 ශමූ 1:1'");
354
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
355
+ });
356
+ });
357
+
358
+ describe("Localized book 1Sam (si)", function() {
359
+ var p;
360
+ p = {};
361
+ beforeEach(function() {
362
+ p = new bcv_parser();
363
+ p.set_options({
364
+ book_alone_strategy: "ignore",
365
+ book_sequence_strategy: "ignore",
366
+ osis_compaction_strategy: "bc",
367
+ captive_end_digits_strategy: "delete"
368
+ });
369
+ p.include_apocrypha(true);
370
+ });
371
+ it("should handle book: 1Sam (si)", function() {
372
+ expect(p.parse("පළමු ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූවෙල් 1:1'");
373
+ expect(p.parse("1. ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ශමූවෙල් 1:1'");
374
+ expect(p.parse("1 ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ශමූවෙල් 1:1'");
375
+ expect(p.parse("පළමු ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූ 1:1'");
376
+ expect(p.parse("1. ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ශමූ 1:1'");
377
+ expect(p.parse("1 ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ශමූ 1:1'");
378
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
379
+ p.include_apocrypha(false);
380
+ expect(p.parse("පළමු ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූවෙල් 1:1'");
381
+ expect(p.parse("1. ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ශමූවෙල් 1:1'");
382
+ expect(p.parse("1 ශමූවෙල් 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ශමූවෙල් 1:1'");
383
+ expect(p.parse("පළමු ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'පළමු ශමූ 1:1'");
384
+ expect(p.parse("1. ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. ශමූ 1:1'");
385
+ expect(p.parse("1 ශමූ 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 ශමූ 1:1'");
386
+ expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
387
+ });
388
+ });
389
+
390
+ describe("Localized book 2Kgs (si)", function() {
391
+ var p;
392
+ p = {};
393
+ beforeEach(function() {
394
+ p = new bcv_parser();
395
+ p.set_options({
396
+ book_alone_strategy: "ignore",
397
+ book_sequence_strategy: "ignore",
398
+ osis_compaction_strategy: "bc",
399
+ captive_end_digits_strategy: "delete"
400
+ });
401
+ p.include_apocrypha(true);
402
+ });
403
+ it("should handle book: 2Kgs (si)", function() {
404
+ expect(p.parse("2. රාජාවරු 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. රාජාවරු 1:1'");
405
+ expect(p.parse("2 රාජාවරු 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 රාජාවරු 1:1'");
406
+ expect(p.parse("2. රාජා 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. රාජා 1:1'");
407
+ expect(p.parse("2 රාජා 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 රාජා 1:1'");
408
+ expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
409
+ p.include_apocrypha(false);
410
+ expect(p.parse("2. රාජාවරු 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. රාජාවරු 1:1'");
411
+ expect(p.parse("2 රාජාවරු 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 රාජාවරු 1:1'");
412
+ expect(p.parse("2. රාජා 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. රාජා 1:1'");
413
+ expect(p.parse("2 රාජා 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 රාජා 1:1'");
414
+ expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
415
+ });
416
+ });
417
+
418
+ describe("Localized book 1Kgs (si)", function() {
419
+ var p;
420
+ p = {};
421
+ beforeEach(function() {
422
+ p = new bcv_parser();
423
+ p.set_options({
424
+ book_alone_strategy: "ignore",
425
+ book_sequence_strategy: "ignore",
426
+ osis_compaction_strategy: "bc",
427
+ captive_end_digits_strategy: "delete"
428
+ });
429
+ p.include_apocrypha(true);
430
+ });
431
+ it("should handle book: 1Kgs (si)", function() {
432
+ expect(p.parse("පළමු රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජාවරු 1:1'");
433
+ expect(p.parse("1. රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. රාජාවරු 1:1'");
434
+ expect(p.parse("1 රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 රාජාවරු 1:1'");
435
+ expect(p.parse("පළමු රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජා 1:1'");
436
+ expect(p.parse("1. රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. රාජා 1:1'");
437
+ expect(p.parse("1 රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 රාජා 1:1'");
438
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
439
+ p.include_apocrypha(false);
440
+ expect(p.parse("පළමු රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජාවරු 1:1'");
441
+ expect(p.parse("1. රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. රාජාවරු 1:1'");
442
+ expect(p.parse("1 රාජාවරු 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 රාජාවරු 1:1'");
443
+ expect(p.parse("පළමු රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'පළමු රාජා 1:1'");
444
+ expect(p.parse("1. රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. රාජා 1:1'");
445
+ expect(p.parse("1 රාජා 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 රාජා 1:1'");
446
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
447
+ });
448
+ });
449
+
450
+ describe("Localized book 2Chr (si)", function() {
451
+ var p;
452
+ p = {};
453
+ beforeEach(function() {
454
+ p = new bcv_parser();
455
+ p.set_options({
456
+ book_alone_strategy: "ignore",
457
+ book_sequence_strategy: "ignore",
458
+ osis_compaction_strategy: "bc",
459
+ captive_end_digits_strategy: "delete"
460
+ });
461
+ p.include_apocrypha(true);
462
+ });
463
+ it("should handle book: 2Chr (si)", function() {
464
+ expect(p.parse("2. දිවීනාවංශය 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. දිවීනාවංශය 1:1'");
465
+ expect(p.parse("2 දිවීනාවංශය 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 දිවීනාවංශය 1:1'");
466
+ expect(p.parse("2. දිවී 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. දිවී 1:1'");
467
+ expect(p.parse("2 දිවී 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 දිවී 1:1'");
468
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
469
+ p.include_apocrypha(false);
470
+ expect(p.parse("2. දිවීනාවංශය 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. දිවීනාවංශය 1:1'");
471
+ expect(p.parse("2 දිවීනාවංශය 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 දිවීනාවංශය 1:1'");
472
+ expect(p.parse("2. දිවී 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. දිවී 1:1'");
473
+ expect(p.parse("2 දිවී 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 දිවී 1:1'");
474
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
475
+ });
476
+ });
477
+
478
+ describe("Localized book 1Chr (si)", function() {
479
+ var p;
480
+ p = {};
481
+ beforeEach(function() {
482
+ p = new bcv_parser();
483
+ p.set_options({
484
+ book_alone_strategy: "ignore",
485
+ book_sequence_strategy: "ignore",
486
+ osis_compaction_strategy: "bc",
487
+ captive_end_digits_strategy: "delete"
488
+ });
489
+ p.include_apocrypha(true);
490
+ });
491
+ it("should handle book: 1Chr (si)", function() {
492
+ expect(p.parse("පළමු දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවීනාවංශය 1:1'");
493
+ expect(p.parse("1. දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. දිවීනාවංශය 1:1'");
494
+ expect(p.parse("1 දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 දිවීනාවංශය 1:1'");
495
+ expect(p.parse("පළමු දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවී 1:1'");
496
+ expect(p.parse("1. දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. දිවී 1:1'");
497
+ expect(p.parse("1 දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 දිවී 1:1'");
498
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
499
+ p.include_apocrypha(false);
500
+ expect(p.parse("පළමු දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවීනාවංශය 1:1'");
501
+ expect(p.parse("1. දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. දිවීනාවංශය 1:1'");
502
+ expect(p.parse("1 දිවීනාවංශය 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 දිවීනාවංශය 1:1'");
503
+ expect(p.parse("පළමු දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'පළමු දිවී 1:1'");
504
+ expect(p.parse("1. දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. දිවී 1:1'");
505
+ expect(p.parse("1 දිවී 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 දිවී 1:1'");
506
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
507
+ });
508
+ });
509
+
510
+ describe("Localized book Ezra (si)", function() {
511
+ var p;
512
+ p = {};
513
+ beforeEach(function() {
514
+ p = new bcv_parser();
515
+ p.set_options({
516
+ book_alone_strategy: "ignore",
517
+ book_sequence_strategy: "ignore",
518
+ osis_compaction_strategy: "bc",
519
+ captive_end_digits_strategy: "delete"
520
+ });
521
+ p.include_apocrypha(true);
522
+ });
523
+ it("should handle book: Ezra (si)", function() {
524
+ expect(p.parse("එස්රා 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'එස්රා 1:1'");
525
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
526
+ p.include_apocrypha(false);
527
+ expect(p.parse("එස්රා 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'එස්රා 1:1'");
528
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
529
+ });
530
+ });
531
+
532
+ describe("Localized book Neh (si)", function() {
533
+ var p;
534
+ p = {};
535
+ beforeEach(function() {
536
+ p = new bcv_parser();
537
+ p.set_options({
538
+ book_alone_strategy: "ignore",
539
+ book_sequence_strategy: "ignore",
540
+ osis_compaction_strategy: "bc",
541
+ captive_end_digits_strategy: "delete"
542
+ });
543
+ p.include_apocrypha(true);
544
+ });
545
+ it("should handle book: Neh (si)", function() {
546
+ expect(p.parse("නෙහෙමියා 1:1").osis()).toEqual("Neh.1.1", "parsing: 'නෙහෙමියා 1:1'");
547
+ expect(p.parse("නෙහෙ 1:1").osis()).toEqual("Neh.1.1", "parsing: 'නෙහෙ 1:1'");
548
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
549
+ p.include_apocrypha(false);
550
+ expect(p.parse("නෙහෙමියා 1:1").osis()).toEqual("Neh.1.1", "parsing: 'නෙහෙමියා 1:1'");
551
+ expect(p.parse("නෙහෙ 1:1").osis()).toEqual("Neh.1.1", "parsing: 'නෙහෙ 1:1'");
552
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
553
+ });
554
+ });
555
+
556
+ describe("Localized book Esth (si)", function() {
557
+ var p;
558
+ p = {};
559
+ beforeEach(function() {
560
+ p = new bcv_parser();
561
+ p.set_options({
562
+ book_alone_strategy: "ignore",
563
+ book_sequence_strategy: "ignore",
564
+ osis_compaction_strategy: "bc",
565
+ captive_end_digits_strategy: "delete"
566
+ });
567
+ p.include_apocrypha(true);
568
+ });
569
+ it("should handle book: Esth (si)", function() {
570
+ expect(p.parse("එස්තා 1:1").osis()).toEqual("Esth.1.1", "parsing: 'එස්තා 1:1'");
571
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
572
+ p.include_apocrypha(false);
573
+ expect(p.parse("එස්තා 1:1").osis()).toEqual("Esth.1.1", "parsing: 'එස්තා 1:1'");
574
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
575
+ });
576
+ });
577
+
578
+ describe("Localized book Job (si)", function() {
579
+ var p;
580
+ p = {};
581
+ beforeEach(function() {
582
+ p = new bcv_parser();
583
+ p.set_options({
584
+ book_alone_strategy: "ignore",
585
+ book_sequence_strategy: "ignore",
586
+ osis_compaction_strategy: "bc",
587
+ captive_end_digits_strategy: "delete"
588
+ });
589
+ p.include_apocrypha(true);
590
+ });
591
+ it("should handle book: Job (si)", function() {
592
+ expect(p.parse("යෝබ් 1:1").osis()).toEqual("Job.1.1", "parsing: 'යෝබ් 1:1'");
593
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
594
+ p.include_apocrypha(false);
595
+ expect(p.parse("යෝබ් 1:1").osis()).toEqual("Job.1.1", "parsing: 'යෝබ් 1:1'");
596
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
597
+ });
598
+ });
599
+
600
+ describe("Localized book Ps (si)", function() {
601
+ var p;
602
+ p = {};
603
+ beforeEach(function() {
604
+ p = new bcv_parser();
605
+ p.set_options({
606
+ book_alone_strategy: "ignore",
607
+ book_sequence_strategy: "ignore",
608
+ osis_compaction_strategy: "bc",
609
+ captive_end_digits_strategy: "delete"
610
+ });
611
+ p.include_apocrypha(true);
612
+ });
613
+ it("should handle book: Ps (si)", function() {
614
+ expect(p.parse("සංගීත 1:1").osis()).toEqual("Ps.1.1", "parsing: 'සංගීත 1:1'");
615
+ expect(p.parse("සංගී 1:1").osis()).toEqual("Ps.1.1", "parsing: 'සංගී 1:1'");
616
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
617
+ p.include_apocrypha(false);
618
+ expect(p.parse("සංගීත 1:1").osis()).toEqual("Ps.1.1", "parsing: 'සංගීත 1:1'");
619
+ expect(p.parse("සංගී 1:1").osis()).toEqual("Ps.1.1", "parsing: 'සංගී 1:1'");
620
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
621
+ });
622
+ });
623
+
624
+ describe("Localized book Prov (si)", function() {
625
+ var p;
626
+ p = {};
627
+ beforeEach(function() {
628
+ p = new bcv_parser();
629
+ p.set_options({
630
+ book_alone_strategy: "ignore",
631
+ book_sequence_strategy: "ignore",
632
+ osis_compaction_strategy: "bc",
633
+ captive_end_digits_strategy: "delete"
634
+ });
635
+ p.include_apocrypha(true);
636
+ });
637
+ it("should handle book: Prov (si)", function() {
638
+ expect(p.parse("සංඥාවන් 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥාවන් 1:1'");
639
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
640
+ expect(p.parse("සංඥා 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥා 1:1'");
641
+ p.include_apocrypha(false);
642
+ expect(p.parse("සංඥාවන් 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥාවන් 1:1'");
643
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
644
+ expect(p.parse("සංඥා 1:1").osis()).toEqual("Prov.1.1", "parsing: 'සංඥා 1:1'");
645
+ });
646
+ });
647
+
648
+ describe("Localized book Eccl (si)", function() {
649
+ var p;
650
+ p = {};
651
+ beforeEach(function() {
652
+ p = new bcv_parser();
653
+ p.set_options({
654
+ book_alone_strategy: "ignore",
655
+ book_sequence_strategy: "ignore",
656
+ osis_compaction_strategy: "bc",
657
+ captive_end_digits_strategy: "delete"
658
+ });
659
+ p.include_apocrypha(true);
660
+ });
661
+ it("should handle book: Eccl (si)", function() {
662
+ expect(p.parse("ප්‍රකාශකයා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකාශකයා 1:1'");
663
+ expect(p.parse("ප්‍රකා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකා 1:1'");
664
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
665
+ p.include_apocrypha(false);
666
+ expect(p.parse("ප්‍රකාශකයා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකාශකයා 1:1'");
667
+ expect(p.parse("ප්‍රකා 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ප්‍රකා 1:1'");
668
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
669
+ });
670
+ });
671
+
672
+ describe("Localized book Song (si)", function() {
673
+ var p;
674
+ p = {};
675
+ beforeEach(function() {
676
+ p = new bcv_parser();
677
+ p.set_options({
678
+ book_alone_strategy: "ignore",
679
+ book_sequence_strategy: "ignore",
680
+ osis_compaction_strategy: "bc",
681
+ captive_end_digits_strategy: "delete"
682
+ });
683
+ p.include_apocrypha(true);
684
+ });
685
+ it("should handle book: Song (si)", function() {
686
+ expect(p.parse("ගීතාමය 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතාමය 1:1'");
687
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
688
+ expect(p.parse("ගීතා 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතා 1:1'");
689
+ p.include_apocrypha(false);
690
+ expect(p.parse("ගීතාමය 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතාමය 1:1'");
691
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
692
+ expect(p.parse("ගීතා 1:1").osis()).toEqual("Song.1.1", "parsing: 'ගීතා 1:1'");
693
+ });
694
+ });
695
+
696
+ describe("Localized book Jer (si)", function() {
697
+ var p;
698
+ p = {};
699
+ beforeEach(function() {
700
+ p = new bcv_parser();
701
+ p.set_options({
702
+ book_alone_strategy: "ignore",
703
+ book_sequence_strategy: "ignore",
704
+ osis_compaction_strategy: "bc",
705
+ captive_end_digits_strategy: "delete"
706
+ });
707
+ p.include_apocrypha(true);
708
+ });
709
+ it("should handle book: Jer (si)", function() {
710
+ expect(p.parse("යෙරෙමියා 1:1").osis()).toEqual("Jer.1.1", "parsing: 'යෙරෙමියා 1:1'");
711
+ expect(p.parse("යෙරෙ 1:1").osis()).toEqual("Jer.1.1", "parsing: 'යෙරෙ 1:1'");
712
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
713
+ p.include_apocrypha(false);
714
+ expect(p.parse("යෙරෙමියා 1:1").osis()).toEqual("Jer.1.1", "parsing: 'යෙරෙමියා 1:1'");
715
+ expect(p.parse("යෙරෙ 1:1").osis()).toEqual("Jer.1.1", "parsing: 'යෙරෙ 1:1'");
716
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
717
+ });
718
+ });
719
+
720
+ describe("Localized book Ezek (si)", function() {
721
+ var p;
722
+ p = {};
723
+ beforeEach(function() {
724
+ p = new bcv_parser();
725
+ p.set_options({
726
+ book_alone_strategy: "ignore",
727
+ book_sequence_strategy: "ignore",
728
+ osis_compaction_strategy: "bc",
729
+ captive_end_digits_strategy: "delete"
730
+ });
731
+ p.include_apocrypha(true);
732
+ });
733
+ it("should handle book: Ezek (si)", function() {
734
+ expect(p.parse("යෙහෙසෙකියෙල් 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙසෙකියෙල් 1:1'");
735
+ expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
736
+ expect(p.parse("යෙහෙ 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙ 1:1'");
737
+ p.include_apocrypha(false);
738
+ expect(p.parse("යෙහෙසෙකියෙල් 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙසෙකියෙල් 1:1'");
739
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
740
+ expect(p.parse("යෙහෙ 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'යෙහෙ 1:1'");
741
+ });
742
+ });
743
+
744
+ describe("Localized book Dan (si)", function() {
745
+ var p;
746
+ p = {};
747
+ beforeEach(function() {
748
+ p = new bcv_parser();
749
+ p.set_options({
750
+ book_alone_strategy: "ignore",
751
+ book_sequence_strategy: "ignore",
752
+ osis_compaction_strategy: "bc",
753
+ captive_end_digits_strategy: "delete"
754
+ });
755
+ p.include_apocrypha(true);
756
+ });
757
+ it("should handle book: Dan (si)", function() {
758
+ expect(p.parse("දානියෙල් 1:1").osis()).toEqual("Dan.1.1", "parsing: 'දානියෙල් 1:1'");
759
+ expect(p.parse("දානියෙ 1:1").osis()).toEqual("Dan.1.1", "parsing: 'දානියෙ 1:1'");
760
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
761
+ p.include_apocrypha(false);
762
+ expect(p.parse("දානියෙල් 1:1").osis()).toEqual("Dan.1.1", "parsing: 'දානියෙල් 1:1'");
763
+ expect(p.parse("දානියෙ 1:1").osis()).toEqual("Dan.1.1", "parsing: 'දානියෙ 1:1'");
764
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
765
+ });
766
+ });
767
+
768
+ describe("Localized book Hos (si)", function() {
769
+ var p;
770
+ p = {};
771
+ beforeEach(function() {
772
+ p = new bcv_parser();
773
+ p.set_options({
774
+ book_alone_strategy: "ignore",
775
+ book_sequence_strategy: "ignore",
776
+ osis_compaction_strategy: "bc",
777
+ captive_end_digits_strategy: "delete"
778
+ });
779
+ p.include_apocrypha(true);
780
+ });
781
+ it("should handle book: Hos (si)", function() {
782
+ expect(p.parse("හෝශෙයා 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙයා 1:1'");
783
+ expect(p.parse("හෝශෙ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙ 1:1'");
784
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
785
+ p.include_apocrypha(false);
786
+ expect(p.parse("හෝශෙයා 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙයා 1:1'");
787
+ expect(p.parse("හෝශෙ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'හෝශෙ 1:1'");
788
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
789
+ });
790
+ });
791
+
792
+ describe("Localized book Joel (si)", function() {
793
+ var p;
794
+ p = {};
795
+ beforeEach(function() {
796
+ p = new bcv_parser();
797
+ p.set_options({
798
+ book_alone_strategy: "ignore",
799
+ book_sequence_strategy: "ignore",
800
+ osis_compaction_strategy: "bc",
801
+ captive_end_digits_strategy: "delete"
802
+ });
803
+ p.include_apocrypha(true);
804
+ });
805
+ it("should handle book: Joel (si)", function() {
806
+ expect(p.parse("යෝවාල් 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝවාල් 1:1'");
807
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
808
+ expect(p.parse("යෝව 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝව 1:1'");
809
+ p.include_apocrypha(false);
810
+ expect(p.parse("යෝවාල් 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝවාල් 1:1'");
811
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
812
+ expect(p.parse("යෝව 1:1").osis()).toEqual("Joel.1.1", "parsing: 'යෝව 1:1'");
813
+ });
814
+ });
815
+
816
+ describe("Localized book Amos (si)", function() {
817
+ var p;
818
+ p = {};
819
+ beforeEach(function() {
820
+ p = new bcv_parser();
821
+ p.set_options({
822
+ book_alone_strategy: "ignore",
823
+ book_sequence_strategy: "ignore",
824
+ osis_compaction_strategy: "bc",
825
+ captive_end_digits_strategy: "delete"
826
+ });
827
+ p.include_apocrypha(true);
828
+ });
829
+ it("should handle book: Amos (si)", function() {
830
+ expect(p.parse("ඇමෝස් 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝස් 1:1'");
831
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
832
+ expect(p.parse("ඇමෝ 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝ 1:1'");
833
+ p.include_apocrypha(false);
834
+ expect(p.parse("ඇමෝස් 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝස් 1:1'");
835
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
836
+ expect(p.parse("ඇමෝ 1:1").osis()).toEqual("Amos.1.1", "parsing: 'ඇමෝ 1:1'");
837
+ });
838
+ });
839
+
840
+ describe("Localized book Obad (si)", function() {
841
+ var p;
842
+ p = {};
843
+ beforeEach(function() {
844
+ p = new bcv_parser();
845
+ p.set_options({
846
+ book_alone_strategy: "ignore",
847
+ book_sequence_strategy: "ignore",
848
+ osis_compaction_strategy: "bc",
849
+ captive_end_digits_strategy: "delete"
850
+ });
851
+ p.include_apocrypha(true);
852
+ });
853
+ it("should handle book: Obad (si)", function() {
854
+ expect(p.parse("ඕබදියා 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබදියා 1:1'");
855
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
856
+ expect(p.parse("ඕබද 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබද 1:1'");
857
+ p.include_apocrypha(false);
858
+ expect(p.parse("ඕබදියා 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබදියා 1:1'");
859
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
860
+ expect(p.parse("ඕබද 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ඕබද 1:1'");
861
+ });
862
+ });
863
+
864
+ describe("Localized book Jonah (si)", function() {
865
+ var p;
866
+ p = {};
867
+ beforeEach(function() {
868
+ p = new bcv_parser();
869
+ p.set_options({
870
+ book_alone_strategy: "ignore",
871
+ book_sequence_strategy: "ignore",
872
+ osis_compaction_strategy: "bc",
873
+ captive_end_digits_strategy: "delete"
874
+ });
875
+ p.include_apocrypha(true);
876
+ });
877
+ it("should handle book: Jonah (si)", function() {
878
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
879
+ expect(p.parse("යෝනා 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'යෝනා 1:1'");
880
+ p.include_apocrypha(false);
881
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
882
+ expect(p.parse("යෝනා 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'යෝනා 1:1'");
883
+ });
884
+ });
885
+
886
+ describe("Localized book Mic (si)", function() {
887
+ var p;
888
+ p = {};
889
+ beforeEach(function() {
890
+ p = new bcv_parser();
891
+ p.set_options({
892
+ book_alone_strategy: "ignore",
893
+ book_sequence_strategy: "ignore",
894
+ osis_compaction_strategy: "bc",
895
+ captive_end_digits_strategy: "delete"
896
+ });
897
+ p.include_apocrypha(true);
898
+ });
899
+ it("should handle book: Mic (si)", function() {
900
+ expect(p.parse("මීකා 1:1").osis()).toEqual("Mic.1.1", "parsing: 'මීකා 1:1'");
901
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
902
+ p.include_apocrypha(false);
903
+ expect(p.parse("මීකා 1:1").osis()).toEqual("Mic.1.1", "parsing: 'මීකා 1:1'");
904
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
905
+ });
906
+ });
907
+
908
+ describe("Localized book Nah (si)", function() {
909
+ var p;
910
+ p = {};
911
+ beforeEach(function() {
912
+ p = new bcv_parser();
913
+ p.set_options({
914
+ book_alone_strategy: "ignore",
915
+ book_sequence_strategy: "ignore",
916
+ osis_compaction_strategy: "bc",
917
+ captive_end_digits_strategy: "delete"
918
+ });
919
+ p.include_apocrypha(true);
920
+ });
921
+ it("should handle book: Nah (si)", function() {
922
+ expect(p.parse("නාහුම් 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහුම් 1:1'");
923
+ expect(p.parse("නාහු 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහු 1:1'");
924
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
925
+ p.include_apocrypha(false);
926
+ expect(p.parse("නාහුම් 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහුම් 1:1'");
927
+ expect(p.parse("නාහු 1:1").osis()).toEqual("Nah.1.1", "parsing: 'නාහු 1:1'");
928
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
929
+ });
930
+ });
931
+
932
+ describe("Localized book Hab (si)", function() {
933
+ var p;
934
+ p = {};
935
+ beforeEach(function() {
936
+ p = new bcv_parser();
937
+ p.set_options({
938
+ book_alone_strategy: "ignore",
939
+ book_sequence_strategy: "ignore",
940
+ osis_compaction_strategy: "bc",
941
+ captive_end_digits_strategy: "delete"
942
+ });
943
+ p.include_apocrypha(true);
944
+ });
945
+ it("should handle book: Hab (si)", function() {
946
+ expect(p.parse("හබකුක් 1:1").osis()).toEqual("Hab.1.1", "parsing: 'හබකුක් 1:1'");
947
+ expect(p.parse("හබකු 1:1").osis()).toEqual("Hab.1.1", "parsing: 'හබකු 1:1'");
948
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
949
+ p.include_apocrypha(false);
950
+ expect(p.parse("හබකුක් 1:1").osis()).toEqual("Hab.1.1", "parsing: 'හබකුක් 1:1'");
951
+ expect(p.parse("හබකු 1:1").osis()).toEqual("Hab.1.1", "parsing: 'හබකු 1:1'");
952
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
953
+ });
954
+ });
955
+
956
+ describe("Localized book Zeph (si)", function() {
957
+ var p;
958
+ p = {};
959
+ beforeEach(function() {
960
+ p = new bcv_parser();
961
+ p.set_options({
962
+ book_alone_strategy: "ignore",
963
+ book_sequence_strategy: "ignore",
964
+ osis_compaction_strategy: "bc",
965
+ captive_end_digits_strategy: "delete"
966
+ });
967
+ p.include_apocrypha(true);
968
+ });
969
+ it("should handle book: Zeph (si)", function() {
970
+ expect(p.parse("සෙෆනියා 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆනියා 1:1'");
971
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
972
+ expect(p.parse("සෙෆන 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆන 1:1'");
973
+ p.include_apocrypha(false);
974
+ expect(p.parse("සෙෆනියා 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆනියා 1:1'");
975
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
976
+ expect(p.parse("සෙෆන 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'සෙෆන 1:1'");
977
+ });
978
+ });
979
+
980
+ describe("Localized book Hag (si)", function() {
981
+ var p;
982
+ p = {};
983
+ beforeEach(function() {
984
+ p = new bcv_parser();
985
+ p.set_options({
986
+ book_alone_strategy: "ignore",
987
+ book_sequence_strategy: "ignore",
988
+ osis_compaction_strategy: "bc",
989
+ captive_end_digits_strategy: "delete"
990
+ });
991
+ p.include_apocrypha(true);
992
+ });
993
+ it("should handle book: Hag (si)", function() {
994
+ expect(p.parse("හග්ගායී 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගායී 1:1'");
995
+ expect(p.parse("හග්ගා 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගා 1:1'");
996
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
997
+ p.include_apocrypha(false);
998
+ expect(p.parse("හග්ගායී 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගායී 1:1'");
999
+ expect(p.parse("හග්ගා 1:1").osis()).toEqual("Hag.1.1", "parsing: 'හග්ගා 1:1'");
1000
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
1001
+ });
1002
+ });
1003
+
1004
+ describe("Localized book Zech (si)", function() {
1005
+ var p;
1006
+ p = {};
1007
+ beforeEach(function() {
1008
+ p = new bcv_parser();
1009
+ p.set_options({
1010
+ book_alone_strategy: "ignore",
1011
+ book_sequence_strategy: "ignore",
1012
+ osis_compaction_strategy: "bc",
1013
+ captive_end_digits_strategy: "delete"
1014
+ });
1015
+ p.include_apocrypha(true);
1016
+ });
1017
+ it("should handle book: Zech (si)", function() {
1018
+ expect(p.parse("සකරියා 1:1").osis()).toEqual("Zech.1.1", "parsing: 'සකරියා 1:1'");
1019
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
1020
+ p.include_apocrypha(false);
1021
+ expect(p.parse("සකරියා 1:1").osis()).toEqual("Zech.1.1", "parsing: 'සකරියා 1:1'");
1022
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1023
+ });
1024
+ });
1025
+
1026
+ describe("Localized book Mal (si)", function() {
1027
+ var p;
1028
+ p = {};
1029
+ beforeEach(function() {
1030
+ p = new bcv_parser();
1031
+ p.set_options({
1032
+ book_alone_strategy: "ignore",
1033
+ book_sequence_strategy: "ignore",
1034
+ osis_compaction_strategy: "bc",
1035
+ captive_end_digits_strategy: "delete"
1036
+ });
1037
+ p.include_apocrypha(true);
1038
+ });
1039
+ it("should handle book: Mal (si)", function() {
1040
+ expect(p.parse("මලාකියා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලාකියා 1:1'");
1041
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1042
+ expect(p.parse("මලා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලා 1:1'");
1043
+ p.include_apocrypha(false);
1044
+ expect(p.parse("මලාකියා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලාකියා 1:1'");
1045
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1046
+ expect(p.parse("මලා 1:1").osis()).toEqual("Mal.1.1", "parsing: 'මලා 1:1'");
1047
+ });
1048
+ });
1049
+
1050
+ describe("Localized book Matt (si)", function() {
1051
+ var p;
1052
+ p = {};
1053
+ beforeEach(function() {
1054
+ p = new bcv_parser();
1055
+ p.set_options({
1056
+ book_alone_strategy: "ignore",
1057
+ book_sequence_strategy: "ignore",
1058
+ osis_compaction_strategy: "bc",
1059
+ captive_end_digits_strategy: "delete"
1060
+ });
1061
+ p.include_apocrypha(true);
1062
+ });
1063
+ it("should handle book: Matt (si)", function() {
1064
+ expect(p.parse("මතෙව් 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙව් 1:1'");
1065
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1066
+ expect(p.parse("මතෙ 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙ 1:1'");
1067
+ p.include_apocrypha(false);
1068
+ expect(p.parse("මතෙව් 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙව් 1:1'");
1069
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1070
+ expect(p.parse("මතෙ 1:1").osis()).toEqual("Matt.1.1", "parsing: 'මතෙ 1:1'");
1071
+ });
1072
+ });
1073
+
1074
+ describe("Localized book Mark (si)", function() {
1075
+ var p;
1076
+ p = {};
1077
+ beforeEach(function() {
1078
+ p = new bcv_parser();
1079
+ p.set_options({
1080
+ book_alone_strategy: "ignore",
1081
+ book_sequence_strategy: "ignore",
1082
+ osis_compaction_strategy: "bc",
1083
+ captive_end_digits_strategy: "delete"
1084
+ });
1085
+ p.include_apocrypha(true);
1086
+ });
1087
+ it("should handle book: Mark (si)", function() {
1088
+ expect(p.parse("මාර்க்கුස් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර்க்கුස් 1:1'");
1089
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1090
+ expect(p.parse("මාර් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර් 1:1'");
1091
+ p.include_apocrypha(false);
1092
+ expect(p.parse("මාර்க்கුස් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර்க்கුස් 1:1'");
1093
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1094
+ expect(p.parse("මාර් 1:1").osis()).toEqual("Mark.1.1", "parsing: 'මාර් 1:1'");
1095
+ });
1096
+ });
1097
+
1098
+ describe("Localized book Luke (si)", function() {
1099
+ var p;
1100
+ p = {};
1101
+ beforeEach(function() {
1102
+ p = new bcv_parser();
1103
+ p.set_options({
1104
+ book_alone_strategy: "ignore",
1105
+ book_sequence_strategy: "ignore",
1106
+ osis_compaction_strategy: "bc",
1107
+ captive_end_digits_strategy: "delete"
1108
+ });
1109
+ p.include_apocrypha(true);
1110
+ });
1111
+ it("should handle book: Luke (si)", function() {
1112
+ expect(p.parse("ලූක්කුස් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක්කුස් 1:1'");
1113
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1114
+ expect(p.parse("ලූක් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක් 1:1'");
1115
+ p.include_apocrypha(false);
1116
+ expect(p.parse("ලූක්කුස් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක්කුස් 1:1'");
1117
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1118
+ expect(p.parse("ලූක් 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ලූක් 1:1'");
1119
+ });
1120
+ });
1121
+
1122
+ describe("Localized book 1John (si)", function() {
1123
+ var p;
1124
+ p = {};
1125
+ beforeEach(function() {
1126
+ p = new bcv_parser();
1127
+ p.set_options({
1128
+ book_alone_strategy: "ignore",
1129
+ book_sequence_strategy: "ignore",
1130
+ osis_compaction_strategy: "bc",
1131
+ captive_end_digits_strategy: "delete"
1132
+ });
1133
+ p.include_apocrypha(true);
1134
+ });
1135
+ it("should handle book: 1John (si)", function() {
1136
+ expect(p.parse("පළමු යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහාන් 1:1'");
1137
+ expect(p.parse("1. යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහාන් 1:1'");
1138
+ expect(p.parse("පළමු යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහා 1:1'");
1139
+ expect(p.parse("1 යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1 යෝහාන් 1:1'");
1140
+ expect(p.parse("1. යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහා 1:1'");
1141
+ expect(p.parse("1 යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: '1 යෝහා 1:1'");
1142
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1143
+ p.include_apocrypha(false);
1144
+ expect(p.parse("පළමු යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහාන් 1:1'");
1145
+ expect(p.parse("1. යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහාන් 1:1'");
1146
+ expect(p.parse("පළමු යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: 'පළමු යෝහා 1:1'");
1147
+ expect(p.parse("1 යෝහාන් 1:1").osis()).toEqual("1John.1.1", "parsing: '1 යෝහාන් 1:1'");
1148
+ expect(p.parse("1. යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: '1. යෝහා 1:1'");
1149
+ expect(p.parse("1 යෝහා 1:1").osis()).toEqual("1John.1.1", "parsing: '1 යෝහා 1:1'");
1150
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1151
+ });
1152
+ });
1153
+
1154
+ describe("Localized book 2John (si)", function() {
1155
+ var p;
1156
+ p = {};
1157
+ beforeEach(function() {
1158
+ p = new bcv_parser();
1159
+ p.set_options({
1160
+ book_alone_strategy: "ignore",
1161
+ book_sequence_strategy: "ignore",
1162
+ osis_compaction_strategy: "bc",
1163
+ captive_end_digits_strategy: "delete"
1164
+ });
1165
+ p.include_apocrypha(true);
1166
+ });
1167
+ it("should handle book: 2John (si)", function() {
1168
+ expect(p.parse("2. යෝහාන් 1:1").osis()).toEqual("2John.1.1", "parsing: '2. යෝහාන් 1:1'");
1169
+ expect(p.parse("2 යෝහාන් 1:1").osis()).toEqual("2John.1.1", "parsing: '2 යෝහාන් 1:1'");
1170
+ expect(p.parse("2. යෝහා 1:1").osis()).toEqual("2John.1.1", "parsing: '2. යෝහා 1:1'");
1171
+ expect(p.parse("2 යෝහා 1:1").osis()).toEqual("2John.1.1", "parsing: '2 යෝහා 1:1'");
1172
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1173
+ p.include_apocrypha(false);
1174
+ expect(p.parse("2. යෝහාන් 1:1").osis()).toEqual("2John.1.1", "parsing: '2. යෝහාන් 1:1'");
1175
+ expect(p.parse("2 යෝහාන් 1:1").osis()).toEqual("2John.1.1", "parsing: '2 යෝහාන් 1:1'");
1176
+ expect(p.parse("2. යෝහා 1:1").osis()).toEqual("2John.1.1", "parsing: '2. යෝහා 1:1'");
1177
+ expect(p.parse("2 යෝහා 1:1").osis()).toEqual("2John.1.1", "parsing: '2 යෝහා 1:1'");
1178
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1179
+ });
1180
+ });
1181
+
1182
+ describe("Localized book 3John (si)", function() {
1183
+ var p;
1184
+ p = {};
1185
+ beforeEach(function() {
1186
+ p = new bcv_parser();
1187
+ p.set_options({
1188
+ book_alone_strategy: "ignore",
1189
+ book_sequence_strategy: "ignore",
1190
+ osis_compaction_strategy: "bc",
1191
+ captive_end_digits_strategy: "delete"
1192
+ });
1193
+ p.include_apocrypha(true);
1194
+ });
1195
+ it("should handle book: 3John (si)", function() {
1196
+ expect(p.parse("3. යෝහාන් 1:1").osis()).toEqual("3John.1.1", "parsing: '3. යෝහාන් 1:1'");
1197
+ expect(p.parse("3 යෝහාන් 1:1").osis()).toEqual("3John.1.1", "parsing: '3 යෝහාන් 1:1'");
1198
+ expect(p.parse("3. යෝහා 1:1").osis()).toEqual("3John.1.1", "parsing: '3. යෝහා 1:1'");
1199
+ expect(p.parse("3 යෝහා 1:1").osis()).toEqual("3John.1.1", "parsing: '3 යෝහා 1:1'");
1200
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1201
+ p.include_apocrypha(false);
1202
+ expect(p.parse("3. යෝහාන් 1:1").osis()).toEqual("3John.1.1", "parsing: '3. යෝහාන් 1:1'");
1203
+ expect(p.parse("3 යෝහාන් 1:1").osis()).toEqual("3John.1.1", "parsing: '3 යෝහාන් 1:1'");
1204
+ expect(p.parse("3. යෝහා 1:1").osis()).toEqual("3John.1.1", "parsing: '3. යෝහා 1:1'");
1205
+ expect(p.parse("3 යෝහා 1:1").osis()).toEqual("3John.1.1", "parsing: '3 යෝහා 1:1'");
1206
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1207
+ });
1208
+ });
1209
+
1210
+ describe("Localized book John (si)", function() {
1211
+ var p;
1212
+ p = {};
1213
+ beforeEach(function() {
1214
+ p = new bcv_parser();
1215
+ p.set_options({
1216
+ book_alone_strategy: "ignore",
1217
+ book_sequence_strategy: "ignore",
1218
+ osis_compaction_strategy: "bc",
1219
+ captive_end_digits_strategy: "delete"
1220
+ });
1221
+ p.include_apocrypha(true);
1222
+ });
1223
+ it("should handle book: John (si)", function() {
1224
+ expect(p.parse("යෝහාන් 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහාන් 1:1'");
1225
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1226
+ expect(p.parse("යෝහා 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහා 1:1'");
1227
+ p.include_apocrypha(false);
1228
+ expect(p.parse("යෝහාන් 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහාන් 1:1'");
1229
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1230
+ expect(p.parse("යෝහා 1:1").osis()).toEqual("John.1.1", "parsing: 'යෝහා 1:1'");
1231
+ });
1232
+ });
1233
+
1234
+ describe("Localized book Acts (si)", function() {
1235
+ var p;
1236
+ p = {};
1237
+ beforeEach(function() {
1238
+ p = new bcv_parser();
1239
+ p.set_options({
1240
+ book_alone_strategy: "ignore",
1241
+ book_sequence_strategy: "ignore",
1242
+ osis_compaction_strategy: "bc",
1243
+ captive_end_digits_strategy: "delete"
1244
+ });
1245
+ p.include_apocrypha(true);
1246
+ });
1247
+ it("should handle book: Acts (si)", function() {
1248
+ expect(p.parse("ප්‍රේක්ෂකයන්ගේ කතෘ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ප්‍රේක්ෂකයන්ගේ කතෘ 1:1'");
1249
+ expect(p.parse("ප්‍රේක්ෂ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ප්‍රේක්ෂ 1:1'");
1250
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1251
+ p.include_apocrypha(false);
1252
+ expect(p.parse("ප්‍රේක්ෂකයන්ගේ කතෘ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ප්‍රේක්ෂකයන්ගේ කතෘ 1:1'");
1253
+ expect(p.parse("ප්‍රේක්ෂ 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ප්‍රේක්ෂ 1:1'");
1254
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1255
+ });
1256
+ });
1257
+
1258
+ describe("Localized book Rom (si)", function() {
1259
+ var p;
1260
+ p = {};
1261
+ beforeEach(function() {
1262
+ p = new bcv_parser();
1263
+ p.set_options({
1264
+ book_alone_strategy: "ignore",
1265
+ book_sequence_strategy: "ignore",
1266
+ osis_compaction_strategy: "bc",
1267
+ captive_end_digits_strategy: "delete"
1268
+ });
1269
+ p.include_apocrypha(true);
1270
+ });
1271
+ it("should handle book: Rom (si)", function() {
1272
+ expect(p.parse("රෝමා 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝමා 1:1'");
1273
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1274
+ expect(p.parse("රෝම 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝම 1:1'");
1275
+ p.include_apocrypha(false);
1276
+ expect(p.parse("රෝමා 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝමා 1:1'");
1277
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1278
+ expect(p.parse("රෝම 1:1").osis()).toEqual("Rom.1.1", "parsing: 'රෝම 1:1'");
1279
+ });
1280
+ });
1281
+
1282
+ describe("Localized book 2Cor (si)", function() {
1283
+ var p;
1284
+ p = {};
1285
+ beforeEach(function() {
1286
+ p = new bcv_parser();
1287
+ p.set_options({
1288
+ book_alone_strategy: "ignore",
1289
+ book_sequence_strategy: "ignore",
1290
+ osis_compaction_strategy: "bc",
1291
+ captive_end_digits_strategy: "delete"
1292
+ });
1293
+ p.include_apocrypha(true);
1294
+ });
1295
+ it("should handle book: 2Cor (si)", function() {
1296
+ expect(p.parse("2. කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරින්ති 1:1'");
1297
+ expect(p.parse("2 කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරින්ති 1:1'");
1298
+ expect(p.parse("2. කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරි 1:1'");
1299
+ expect(p.parse("2 කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරි 1:1'");
1300
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1301
+ p.include_apocrypha(false);
1302
+ expect(p.parse("2. කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරින්ති 1:1'");
1303
+ expect(p.parse("2 කොරින්ති 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරින්ති 1:1'");
1304
+ expect(p.parse("2. කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. කොරි 1:1'");
1305
+ expect(p.parse("2 කොරි 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 කොරි 1:1'");
1306
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1307
+ });
1308
+ });
1309
+
1310
+ describe("Localized book 1Cor (si)", function() {
1311
+ var p;
1312
+ p = {};
1313
+ beforeEach(function() {
1314
+ p = new bcv_parser();
1315
+ p.set_options({
1316
+ book_alone_strategy: "ignore",
1317
+ book_sequence_strategy: "ignore",
1318
+ osis_compaction_strategy: "bc",
1319
+ captive_end_digits_strategy: "delete"
1320
+ });
1321
+ p.include_apocrypha(true);
1322
+ });
1323
+ it("should handle book: 1Cor (si)", function() {
1324
+ expect(p.parse("පළමු කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරින්ති 1:1'");
1325
+ expect(p.parse("1. කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරින්ති 1:1'");
1326
+ expect(p.parse("1 කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරින්ති 1:1'");
1327
+ expect(p.parse("පළමු කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරි 1:1'");
1328
+ expect(p.parse("1. කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරි 1:1'");
1329
+ expect(p.parse("1 කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරි 1:1'");
1330
+ expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
1331
+ p.include_apocrypha(false);
1332
+ expect(p.parse("පළමු කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරින්ති 1:1'");
1333
+ expect(p.parse("1. කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරින්ති 1:1'");
1334
+ expect(p.parse("1 කොරින්ති 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරින්ති 1:1'");
1335
+ expect(p.parse("පළමු කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'පළමු කොරි 1:1'");
1336
+ expect(p.parse("1. කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. කොරි 1:1'");
1337
+ expect(p.parse("1 කොරි 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 කොරි 1:1'");
1338
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1339
+ });
1340
+ });
1341
+
1342
+ describe("Localized book Gal (si)", function() {
1343
+ var p;
1344
+ p = {};
1345
+ beforeEach(function() {
1346
+ p = new bcv_parser();
1347
+ p.set_options({
1348
+ book_alone_strategy: "ignore",
1349
+ book_sequence_strategy: "ignore",
1350
+ osis_compaction_strategy: "bc",
1351
+ captive_end_digits_strategy: "delete"
1352
+ });
1353
+ p.include_apocrypha(true);
1354
+ });
1355
+ it("should handle book: Gal (si)", function() {
1356
+ expect(p.parse("ගලාතිය 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලාතිය 1:1'");
1357
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1358
+ expect(p.parse("ගලා 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලා 1:1'");
1359
+ p.include_apocrypha(false);
1360
+ expect(p.parse("ගලාතිය 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලාතිය 1:1'");
1361
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1362
+ expect(p.parse("ගලා 1:1").osis()).toEqual("Gal.1.1", "parsing: 'ගලා 1:1'");
1363
+ });
1364
+ });
1365
+
1366
+ describe("Localized book Eph (si)", function() {
1367
+ var p;
1368
+ p = {};
1369
+ beforeEach(function() {
1370
+ p = new bcv_parser();
1371
+ p.set_options({
1372
+ book_alone_strategy: "ignore",
1373
+ book_sequence_strategy: "ignore",
1374
+ osis_compaction_strategy: "bc",
1375
+ captive_end_digits_strategy: "delete"
1376
+ });
1377
+ p.include_apocrypha(true);
1378
+ });
1379
+ it("should handle book: Eph (si)", function() {
1380
+ expect(p.parse("එෆෙසියන් 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසියන් 1:1'");
1381
+ expect(p.parse("එෆෙසි 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසි 1:1'");
1382
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1383
+ p.include_apocrypha(false);
1384
+ expect(p.parse("එෆෙසියන් 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසියන් 1:1'");
1385
+ expect(p.parse("එෆෙසි 1:1").osis()).toEqual("Eph.1.1", "parsing: 'එෆෙසි 1:1'");
1386
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1387
+ });
1388
+ });
1389
+
1390
+ describe("Localized book Phil (si)", function() {
1391
+ var p;
1392
+ p = {};
1393
+ beforeEach(function() {
1394
+ p = new bcv_parser();
1395
+ p.set_options({
1396
+ book_alone_strategy: "ignore",
1397
+ book_sequence_strategy: "ignore",
1398
+ osis_compaction_strategy: "bc",
1399
+ captive_end_digits_strategy: "delete"
1400
+ });
1401
+ p.include_apocrypha(true);
1402
+ });
1403
+ it("should handle book: Phil (si)", function() {
1404
+ expect(p.parse("පිලිප්පයි 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප්පයි 1:1'");
1405
+ expect(p.parse("පිලිප් 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප් 1:1'");
1406
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1407
+ p.include_apocrypha(false);
1408
+ expect(p.parse("පිලිප්පයි 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප්පයි 1:1'");
1409
+ expect(p.parse("පිලිප් 1:1").osis()).toEqual("Phil.1.1", "parsing: 'පිලිප් 1:1'");
1410
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1411
+ });
1412
+ });
1413
+
1414
+ describe("Localized book Col (si)", function() {
1415
+ var p;
1416
+ p = {};
1417
+ beforeEach(function() {
1418
+ p = new bcv_parser();
1419
+ p.set_options({
1420
+ book_alone_strategy: "ignore",
1421
+ book_sequence_strategy: "ignore",
1422
+ osis_compaction_strategy: "bc",
1423
+ captive_end_digits_strategy: "delete"
1424
+ });
1425
+ p.include_apocrypha(true);
1426
+ });
1427
+ it("should handle book: Col (si)", function() {
1428
+ expect(p.parse("කොලෝසිය 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝසිය 1:1'");
1429
+ expect(p.parse("කොලෝ 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝ 1:1'");
1430
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1431
+ p.include_apocrypha(false);
1432
+ expect(p.parse("කොලෝසිය 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝසිය 1:1'");
1433
+ expect(p.parse("කොලෝ 1:1").osis()).toEqual("Col.1.1", "parsing: 'කොලෝ 1:1'");
1434
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1435
+ });
1436
+ });
1437
+
1438
+ describe("Localized book 2Thess (si)", function() {
1439
+ var p;
1440
+ p = {};
1441
+ beforeEach(function() {
1442
+ p = new bcv_parser();
1443
+ p.set_options({
1444
+ book_alone_strategy: "ignore",
1445
+ book_sequence_strategy: "ignore",
1446
+ osis_compaction_strategy: "bc",
1447
+ captive_end_digits_strategy: "delete"
1448
+ });
1449
+ p.include_apocrypha(true);
1450
+ });
1451
+ it("should handle book: 2Thess (si)", function() {
1452
+ expect(p.parse("2. තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙසලොනික 1:1'");
1453
+ expect(p.parse("2 තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙසලොනික 1:1'");
1454
+ expect(p.parse("2. තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙස 1:1'");
1455
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1456
+ expect(p.parse("2 තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙස 1:1'");
1457
+ p.include_apocrypha(false);
1458
+ expect(p.parse("2. තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙසලොනික 1:1'");
1459
+ expect(p.parse("2 තෙසලොනික 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙසලොනික 1:1'");
1460
+ expect(p.parse("2. තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. තෙස 1:1'");
1461
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1462
+ expect(p.parse("2 තෙස 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 තෙස 1:1'");
1463
+ });
1464
+ });
1465
+
1466
+ describe("Localized book 1Thess (si)", function() {
1467
+ var p;
1468
+ p = {};
1469
+ beforeEach(function() {
1470
+ p = new bcv_parser();
1471
+ p.set_options({
1472
+ book_alone_strategy: "ignore",
1473
+ book_sequence_strategy: "ignore",
1474
+ osis_compaction_strategy: "bc",
1475
+ captive_end_digits_strategy: "delete"
1476
+ });
1477
+ p.include_apocrypha(true);
1478
+ });
1479
+ it("should handle book: 1Thess (si)", function() {
1480
+ expect(p.parse("පළමු තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙසලොනික 1:1'");
1481
+ expect(p.parse("1. තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙසලොනික 1:1'");
1482
+ expect(p.parse("1 තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙසලොනික 1:1'");
1483
+ expect(p.parse("පළමු තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙස 1:1'");
1484
+ expect(p.parse("1. තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙස 1:1'");
1485
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1486
+ expect(p.parse("1 තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙස 1:1'");
1487
+ p.include_apocrypha(false);
1488
+ expect(p.parse("පළමු තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙසලොනික 1:1'");
1489
+ expect(p.parse("1. තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙසලොනික 1:1'");
1490
+ expect(p.parse("1 තෙසලොනික 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙසලොනික 1:1'");
1491
+ expect(p.parse("පළමු තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'පළමු තෙස 1:1'");
1492
+ expect(p.parse("1. තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. තෙස 1:1'");
1493
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1494
+ expect(p.parse("1 තෙස 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 තෙස 1:1'");
1495
+ });
1496
+ });
1497
+
1498
+ describe("Localized book 2Tim (si)", function() {
1499
+ var p;
1500
+ p = {};
1501
+ beforeEach(function() {
1502
+ p = new bcv_parser();
1503
+ p.set_options({
1504
+ book_alone_strategy: "ignore",
1505
+ book_sequence_strategy: "ignore",
1506
+ osis_compaction_strategy: "bc",
1507
+ captive_end_digits_strategy: "delete"
1508
+ });
1509
+ p.include_apocrypha(true);
1510
+ });
1511
+ it("should handle book: 2Tim (si)", function() {
1512
+ expect(p.parse("2. තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝති 1:1'");
1513
+ expect(p.parse("2 තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝති 1:1'");
1514
+ expect(p.parse("2. තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝ 1:1'");
1515
+ expect(p.parse("2 තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝ 1:1'");
1516
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1517
+ p.include_apocrypha(false);
1518
+ expect(p.parse("2. තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝති 1:1'");
1519
+ expect(p.parse("2 තිමෝති 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝති 1:1'");
1520
+ expect(p.parse("2. තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. තිමෝ 1:1'");
1521
+ expect(p.parse("2 තිමෝ 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 තිමෝ 1:1'");
1522
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1523
+ });
1524
+ });
1525
+
1526
+ describe("Localized book 1Tim (si)", function() {
1527
+ var p;
1528
+ p = {};
1529
+ beforeEach(function() {
1530
+ p = new bcv_parser();
1531
+ p.set_options({
1532
+ book_alone_strategy: "ignore",
1533
+ book_sequence_strategy: "ignore",
1534
+ osis_compaction_strategy: "bc",
1535
+ captive_end_digits_strategy: "delete"
1536
+ });
1537
+ p.include_apocrypha(true);
1538
+ });
1539
+ it("should handle book: 1Tim (si)", function() {
1540
+ expect(p.parse("පළමු තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝති 1:1'");
1541
+ expect(p.parse("1. තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝති 1:1'");
1542
+ expect(p.parse("පළමු තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝ 1:1'");
1543
+ expect(p.parse("1 තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝති 1:1'");
1544
+ expect(p.parse("1. තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝ 1:1'");
1545
+ expect(p.parse("1 තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝ 1:1'");
1546
+ expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
1547
+ p.include_apocrypha(false);
1548
+ expect(p.parse("පළමු තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝති 1:1'");
1549
+ expect(p.parse("1. තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝති 1:1'");
1550
+ expect(p.parse("පළමු තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'පළමු තිමෝ 1:1'");
1551
+ expect(p.parse("1 තිමෝති 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝති 1:1'");
1552
+ expect(p.parse("1. තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. තිමෝ 1:1'");
1553
+ expect(p.parse("1 තිමෝ 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 තිමෝ 1:1'");
1554
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1555
+ });
1556
+ });
1557
+
1558
+ describe("Localized book Titus (si)", function() {
1559
+ var p;
1560
+ p = {};
1561
+ beforeEach(function() {
1562
+ p = new bcv_parser();
1563
+ p.set_options({
1564
+ book_alone_strategy: "ignore",
1565
+ book_sequence_strategy: "ignore",
1566
+ osis_compaction_strategy: "bc",
1567
+ captive_end_digits_strategy: "delete"
1568
+ });
1569
+ p.include_apocrypha(true);
1570
+ });
1571
+ it("should handle book: Titus (si)", function() {
1572
+ expect(p.parse("තීතොස් 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතොස් 1:1'");
1573
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1574
+ expect(p.parse("තීතො 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතො 1:1'");
1575
+ p.include_apocrypha(false);
1576
+ expect(p.parse("තීතොස් 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතොස් 1:1'");
1577
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1578
+ expect(p.parse("තීතො 1:1").osis()).toEqual("Titus.1.1", "parsing: 'තීතො 1:1'");
1579
+ });
1580
+ });
1581
+
1582
+ describe("Localized book Phlm (si)", function() {
1583
+ var p;
1584
+ p = {};
1585
+ beforeEach(function() {
1586
+ p = new bcv_parser();
1587
+ p.set_options({
1588
+ book_alone_strategy: "ignore",
1589
+ book_sequence_strategy: "ignore",
1590
+ osis_compaction_strategy: "bc",
1591
+ captive_end_digits_strategy: "delete"
1592
+ });
1593
+ p.include_apocrypha(true);
1594
+ });
1595
+ it("should handle book: Phlm (si)", function() {
1596
+ expect(p.parse("පිලෙමොන් 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමොන් 1:1'");
1597
+ expect(p.parse("පිලෙමො 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමො 1:1'");
1598
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1599
+ p.include_apocrypha(false);
1600
+ expect(p.parse("පිලෙමොන් 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමොන් 1:1'");
1601
+ expect(p.parse("පිලෙමො 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'පිලෙමො 1:1'");
1602
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1603
+ });
1604
+ });
1605
+
1606
+ describe("Localized book Heb (si)", function() {
1607
+ var p;
1608
+ p = {};
1609
+ beforeEach(function() {
1610
+ p = new bcv_parser();
1611
+ p.set_options({
1612
+ book_alone_strategy: "ignore",
1613
+ book_sequence_strategy: "ignore",
1614
+ osis_compaction_strategy: "bc",
1615
+ captive_end_digits_strategy: "delete"
1616
+ });
1617
+ p.include_apocrypha(true);
1618
+ });
1619
+ it("should handle book: Heb (si)", function() {
1620
+ expect(p.parse("හෙබ්රෙව් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ්රෙව් 1:1'");
1621
+ expect(p.parse("හෙබ් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ් 1:1'");
1622
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1623
+ p.include_apocrypha(false);
1624
+ expect(p.parse("හෙබ්රෙව් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ්රෙව් 1:1'");
1625
+ expect(p.parse("හෙබ් 1:1").osis()).toEqual("Heb.1.1", "parsing: 'හෙබ් 1:1'");
1626
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1627
+ });
1628
+ });
1629
+
1630
+ describe("Localized book Jas (si)", function() {
1631
+ var p;
1632
+ p = {};
1633
+ beforeEach(function() {
1634
+ p = new bcv_parser();
1635
+ p.set_options({
1636
+ book_alone_strategy: "ignore",
1637
+ book_sequence_strategy: "ignore",
1638
+ osis_compaction_strategy: "bc",
1639
+ captive_end_digits_strategy: "delete"
1640
+ });
1641
+ p.include_apocrypha(true);
1642
+ });
1643
+ it("should handle book: Jas (si)", function() {
1644
+ expect(p.parse("යාකොබ් 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකොබ් 1:1'");
1645
+ expect(p.parse("යාකො 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකො 1:1'");
1646
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1647
+ p.include_apocrypha(false);
1648
+ expect(p.parse("යාකොබ් 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකොබ් 1:1'");
1649
+ expect(p.parse("යාකො 1:1").osis()).toEqual("Jas.1.1", "parsing: 'යාකො 1:1'");
1650
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1651
+ });
1652
+ });
1653
+
1654
+ describe("Localized book 2Pet (si)", function() {
1655
+ var p;
1656
+ p = {};
1657
+ beforeEach(function() {
1658
+ p = new bcv_parser();
1659
+ p.set_options({
1660
+ book_alone_strategy: "ignore",
1661
+ book_sequence_strategy: "ignore",
1662
+ osis_compaction_strategy: "bc",
1663
+ captive_end_digits_strategy: "delete"
1664
+ });
1665
+ p.include_apocrypha(true);
1666
+ });
1667
+ it("should handle book: 2Pet (si)", function() {
1668
+ expect(p.parse("2. පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේදුරු 1:1'");
1669
+ expect(p.parse("2 පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේදුරු 1:1'");
1670
+ expect(p.parse("2. පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේද 1:1'");
1671
+ expect(p.parse("2 පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේද 1:1'");
1672
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1673
+ p.include_apocrypha(false);
1674
+ expect(p.parse("2. පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේදුරු 1:1'");
1675
+ expect(p.parse("2 පේදුරු 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේදුරු 1:1'");
1676
+ expect(p.parse("2. පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. පේද 1:1'");
1677
+ expect(p.parse("2 පේද 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 පේද 1:1'");
1678
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1679
+ });
1680
+ });
1681
+
1682
+ describe("Localized book 1Pet (si)", function() {
1683
+ var p;
1684
+ p = {};
1685
+ beforeEach(function() {
1686
+ p = new bcv_parser();
1687
+ p.set_options({
1688
+ book_alone_strategy: "ignore",
1689
+ book_sequence_strategy: "ignore",
1690
+ osis_compaction_strategy: "bc",
1691
+ captive_end_digits_strategy: "delete"
1692
+ });
1693
+ p.include_apocrypha(true);
1694
+ });
1695
+ it("should handle book: 1Pet (si)", function() {
1696
+ expect(p.parse("පළමු පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේදුරු 1:1'");
1697
+ expect(p.parse("1. පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේදුරු 1:1'");
1698
+ expect(p.parse("1 පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේදුරු 1:1'");
1699
+ expect(p.parse("පළමු පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේද 1:1'");
1700
+ expect(p.parse("1. පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේද 1:1'");
1701
+ expect(p.parse("1 පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේද 1:1'");
1702
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1703
+ p.include_apocrypha(false);
1704
+ expect(p.parse("පළමු පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේදුරු 1:1'");
1705
+ expect(p.parse("1. පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේදුරු 1:1'");
1706
+ expect(p.parse("1 පේදුරු 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේදුරු 1:1'");
1707
+ expect(p.parse("පළමු පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'පළමු පේද 1:1'");
1708
+ expect(p.parse("1. පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. පේද 1:1'");
1709
+ expect(p.parse("1 පේද 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 පේද 1:1'");
1710
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1711
+ });
1712
+ });
1713
+
1714
+ describe("Localized book Jude (si)", function() {
1715
+ var p;
1716
+ p = {};
1717
+ beforeEach(function() {
1718
+ p = new bcv_parser();
1719
+ p.set_options({
1720
+ book_alone_strategy: "ignore",
1721
+ book_sequence_strategy: "ignore",
1722
+ osis_compaction_strategy: "bc",
1723
+ captive_end_digits_strategy: "delete"
1724
+ });
1725
+ p.include_apocrypha(true);
1726
+ });
1727
+ it("should handle book: Jude (si)", function() {
1728
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1729
+ expect(p.parse("යූද 1:1").osis()).toEqual("Jude.1.1", "parsing: 'යූද 1:1'");
1730
+ p.include_apocrypha(false);
1731
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1732
+ expect(p.parse("යූද 1:1").osis()).toEqual("Jude.1.1", "parsing: 'යූද 1:1'");
1733
+ });
1734
+ });
1735
+
1736
+ describe("Miscellaneous tests", function() {
1737
+ var p;
1738
+ p = {};
1739
+ beforeEach(function() {
1740
+ p = new bcv_parser();
1741
+ p.set_options({
1742
+ book_alone_strategy: "ignore",
1743
+ book_sequence_strategy: "ignore",
1744
+ osis_compaction_strategy: "bc",
1745
+ captive_end_digits_strategy: "delete"
1746
+ });
1747
+ p.include_apocrypha(true);
1748
+ });
1749
+ it("should return the expected language", function() {
1750
+ expect(p.languages).toEqual(["si"]);
1751
+ });
1752
+ it("should handle ranges (si)", function() {
1753
+ expect(p.parse("Titus 1:1 සිට 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 සිට 2'");
1754
+ expect(p.parse("Matt 1සිට2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1සිට2'");
1755
+ expect(p.parse("Phlm 2 සිට 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 සිට 3'");
1756
+ });
1757
+ it("should handle chapters (si)", function() {
1758
+ expect(p.parse("Titus 1:1, වන පරිච්ඡේදය 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, වන පරිච්ඡේදය 2'");
1759
+ expect(p.parse("Matt 3:4 වන පරිච්ඡේදය 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 වන පරිච්ඡේදය 6'");
1760
+ });
1761
+ it("should handle verses (si)", function() {
1762
+ expect(p.parse("Exod 1:1 වන පදයට 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 වන පදයට 3'");
1763
+ expect(p.parse("Phlm වන පදයට 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm වන පදයට 6'");
1764
+ });
1765
+ it("should handle 'and' (si)", function() {
1766
+ expect(p.parse("Exod 1:1 සහ 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 සහ 3'");
1767
+ expect(p.parse("Phlm 2 සහ 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 සහ 6'");
1768
+ });
1769
+ it("should handle titles (si)", function() {
1770
+ 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:මාතෘකාව'");
1771
+ 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:මාතෘකාව'");
1772
+ });
1773
+ it("should handle 'ff' (si)", function() {
1774
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1775
+ 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'");
1776
+ });
1777
+ it("should handle translations (si)", function() {
1778
+ expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1779
+ expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1780
+ });
1781
+ it("should handle book ranges (si)", function() {
1782
+ p.set_options({
1783
+ book_alone_strategy: "full",
1784
+ book_range_strategy: "include"
1785
+ });
1786
+ expect(p.parse("1 සිට 3 යෝහා").osis()).toEqual("1John.1-3John.1", "parsing: '1 සිට 3 යෝහා'");
1787
+ });
1788
+ return it("should handle boundaries (si)", function() {
1789
+ p.set_options({
1790
+ book_alone_strategy: "full"
1791
+ });
1792
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1793
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1794
+ });
1795
+ });
1796
+
1797
+ }).call(this);