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