bible-ref-parse 3.0.14 → 3.0.16

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/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/zh.spec.js +3184 -3440
  38. package/dist/test/zu.spec.js +2075 -0
  39. package/dist/zh-bcv-parser.js +2658 -2989
  40. package/dist/zh-bcv-parser.min.js +1 -1
  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,1759 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/lu-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (lu)", 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 (lu)", 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 (lu)", function() {
82
+ expect(p.parse("Genesisi 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Genesisi 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("GENESISI 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GENESISI 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 (lu)", 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 (lu)", function() {
104
+ expect(p.parse("Exodusi 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exodusi 1:1'");
105
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
106
+ expect(p.parse("Exo 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exo 1:1'");
107
+ p.include_apocrypha(false);
108
+ expect(p.parse("EXODUSI 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXODUSI 1:1'");
109
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
110
+ expect(p.parse("EXO 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXO 1:1'");
111
+ });
112
+ });
113
+
114
+ describe("Localized book Lev (lu)", function() {
115
+ var p;
116
+ p = {};
117
+ beforeEach(function() {
118
+ p = new bcv_parser();
119
+ p.set_options({
120
+ book_alone_strategy: "ignore",
121
+ book_sequence_strategy: "ignore",
122
+ osis_compaction_strategy: "bc",
123
+ captive_end_digits_strategy: "delete"
124
+ });
125
+ p.include_apocrypha(true);
126
+ });
127
+ it("should handle book: Lev (lu)", function() {
128
+ expect(p.parse("Lewitike 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lewitike 1:1'");
129
+ expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lev 1:1'");
130
+ p.include_apocrypha(false);
131
+ expect(p.parse("LEWITIKE 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEWITIKE 1:1'");
132
+ expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEV 1:1'");
133
+ });
134
+ });
135
+
136
+ describe("Localized book Num (lu)", function() {
137
+ var p;
138
+ p = {};
139
+ beforeEach(function() {
140
+ p = new bcv_parser();
141
+ p.set_options({
142
+ book_alone_strategy: "ignore",
143
+ book_sequence_strategy: "ignore",
144
+ osis_compaction_strategy: "bc",
145
+ captive_end_digits_strategy: "delete"
146
+ });
147
+ p.include_apocrypha(true);
148
+ });
149
+ it("should handle book: Num (lu)", function() {
150
+ expect(p.parse("Numeri 1:1").osis()).toEqual("Num.1.1", "parsing: 'Numeri 1:1'");
151
+ expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
152
+ p.include_apocrypha(false);
153
+ expect(p.parse("NUMERI 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUMERI 1:1'");
154
+ expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
155
+ });
156
+ });
157
+
158
+ describe("Localized book Lam (lu)", function() {
159
+ var p;
160
+ p = {};
161
+ beforeEach(function() {
162
+ p = new bcv_parser();
163
+ p.set_options({
164
+ book_alone_strategy: "ignore",
165
+ book_sequence_strategy: "ignore",
166
+ osis_compaction_strategy: "bc",
167
+ captive_end_digits_strategy: "delete"
168
+ });
169
+ p.include_apocrypha(true);
170
+ });
171
+ it("should handle book: Lam (lu)", function() {
172
+ expect(p.parse("Kulumbayi 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Kulumbayi 1:1'");
173
+ expect(p.parse("Kul 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Kul 1:1'");
174
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
175
+ p.include_apocrypha(false);
176
+ expect(p.parse("KULUMBAYI 1:1").osis()).toEqual("Lam.1.1", "parsing: 'KULUMBAYI 1:1'");
177
+ expect(p.parse("KUL 1:1").osis()).toEqual("Lam.1.1", "parsing: 'KUL 1:1'");
178
+ expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
179
+ });
180
+ });
181
+
182
+ describe("Localized book Rev (lu)", function() {
183
+ var p;
184
+ p = {};
185
+ beforeEach(function() {
186
+ p = new bcv_parser();
187
+ p.set_options({
188
+ book_alone_strategy: "ignore",
189
+ book_sequence_strategy: "ignore",
190
+ osis_compaction_strategy: "bc",
191
+ captive_end_digits_strategy: "delete"
192
+ });
193
+ p.include_apocrypha(true);
194
+ });
195
+ it("should handle book: Rev (lu)", function() {
196
+ expect(p.parse("Bikatu 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Bikatu 1:1'");
197
+ expect(p.parse("Bik 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Bik 1:1'");
198
+ expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Rev 1:1'");
199
+ p.include_apocrypha(false);
200
+ expect(p.parse("BIKATU 1:1").osis()).toEqual("Rev.1.1", "parsing: 'BIKATU 1:1'");
201
+ expect(p.parse("BIK 1:1").osis()).toEqual("Rev.1.1", "parsing: 'BIK 1:1'");
202
+ expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1", "parsing: 'REV 1:1'");
203
+ });
204
+ });
205
+
206
+ describe("Localized book Deut (lu)", function() {
207
+ var p;
208
+ p = {};
209
+ beforeEach(function() {
210
+ p = new bcv_parser();
211
+ p.set_options({
212
+ book_alone_strategy: "ignore",
213
+ book_sequence_strategy: "ignore",
214
+ osis_compaction_strategy: "bc",
215
+ captive_end_digits_strategy: "delete"
216
+ });
217
+ p.include_apocrypha(true);
218
+ });
219
+ it("should handle book: Deut (lu)", function() {
220
+ expect(p.parse("Deuteronome 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deuteronome 1:1'");
221
+ expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
222
+ expect(p.parse("Deu 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deu 1:1'");
223
+ p.include_apocrypha(false);
224
+ expect(p.parse("DEUTERONOME 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUTERONOME 1:1'");
225
+ expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
226
+ expect(p.parse("DEU 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEU 1:1'");
227
+ });
228
+ });
229
+
230
+ describe("Localized book Josh (lu)", function() {
231
+ var p;
232
+ p = {};
233
+ beforeEach(function() {
234
+ p = new bcv_parser();
235
+ p.set_options({
236
+ book_alone_strategy: "ignore",
237
+ book_sequence_strategy: "ignore",
238
+ osis_compaction_strategy: "bc",
239
+ captive_end_digits_strategy: "delete"
240
+ });
241
+ p.include_apocrypha(true);
242
+ });
243
+ it("should handle book: Josh (lu)", function() {
244
+ expect(p.parse("Yosua 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Yosua 1:1'");
245
+ expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josh 1:1'");
246
+ expect(p.parse("Jos 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Jos 1:1'");
247
+ p.include_apocrypha(false);
248
+ expect(p.parse("YOSUA 1:1").osis()).toEqual("Josh.1.1", "parsing: 'YOSUA 1:1'");
249
+ expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSH 1:1'");
250
+ expect(p.parse("JOS 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOS 1:1'");
251
+ });
252
+ });
253
+
254
+ describe("Localized book Judg (lu)", function() {
255
+ var p;
256
+ p = {};
257
+ beforeEach(function() {
258
+ p = new bcv_parser();
259
+ p.set_options({
260
+ book_alone_strategy: "ignore",
261
+ book_sequence_strategy: "ignore",
262
+ osis_compaction_strategy: "bc",
263
+ captive_end_digits_strategy: "delete"
264
+ });
265
+ p.include_apocrypha(true);
266
+ });
267
+ it("should handle book: Judg (lu)", function() {
268
+ expect(p.parse("Bamisambu 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Bamisambu 1:1'");
269
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
270
+ expect(p.parse("Bam 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Bam 1:1'");
271
+ p.include_apocrypha(false);
272
+ expect(p.parse("BAMISAMBU 1:1").osis()).toEqual("Judg.1.1", "parsing: 'BAMISAMBU 1:1'");
273
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
274
+ expect(p.parse("BAM 1:1").osis()).toEqual("Judg.1.1", "parsing: 'BAM 1:1'");
275
+ });
276
+ });
277
+
278
+ describe("Localized book Ruth (lu)", function() {
279
+ var p;
280
+ p = {};
281
+ beforeEach(function() {
282
+ p = new bcv_parser();
283
+ p.set_options({
284
+ book_alone_strategy: "ignore",
285
+ book_sequence_strategy: "ignore",
286
+ osis_compaction_strategy: "bc",
287
+ captive_end_digits_strategy: "delete"
288
+ });
289
+ p.include_apocrypha(true);
290
+ });
291
+ it("should handle book: Ruth (lu)", function() {
292
+ expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
293
+ expect(p.parse("Ruti 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruti 1:1'");
294
+ expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Rut 1:1'");
295
+ p.include_apocrypha(false);
296
+ expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
297
+ expect(p.parse("RUTI 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTI 1:1'");
298
+ expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUT 1:1'");
299
+ });
300
+ });
301
+
302
+ describe("Localized book Isa (lu)", function() {
303
+ var p;
304
+ p = {};
305
+ beforeEach(function() {
306
+ p = new bcv_parser();
307
+ p.set_options({
308
+ book_alone_strategy: "ignore",
309
+ book_sequence_strategy: "ignore",
310
+ osis_compaction_strategy: "bc",
311
+ captive_end_digits_strategy: "delete"
312
+ });
313
+ p.include_apocrypha(true);
314
+ });
315
+ it("should handle book: Isa (lu)", function() {
316
+ expect(p.parse("Yisaya 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Yisaya 1:1'");
317
+ expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
318
+ expect(p.parse("Yis 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Yis 1:1'");
319
+ p.include_apocrypha(false);
320
+ expect(p.parse("YISAYA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YISAYA 1:1'");
321
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
322
+ expect(p.parse("YIS 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YIS 1:1'");
323
+ });
324
+ });
325
+
326
+ describe("Localized book 2Sam (lu)", function() {
327
+ var p;
328
+ p = {};
329
+ beforeEach(function() {
330
+ p = new bcv_parser();
331
+ p.set_options({
332
+ book_alone_strategy: "ignore",
333
+ book_sequence_strategy: "ignore",
334
+ osis_compaction_strategy: "bc",
335
+ captive_end_digits_strategy: "delete"
336
+ });
337
+ p.include_apocrypha(true);
338
+ });
339
+ it("should handle book: 2Sam (lu)", function() {
340
+ expect(p.parse("2. Samuele 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Samuele 1:1'");
341
+ expect(p.parse("2 Samuele 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Samuele 1:1'");
342
+ expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Sa 1:1'");
343
+ expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Sa 1:1'");
344
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
345
+ p.include_apocrypha(false);
346
+ expect(p.parse("2. SAMUELE 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SAMUELE 1:1'");
347
+ expect(p.parse("2 SAMUELE 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SAMUELE 1:1'");
348
+ expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SA 1:1'");
349
+ expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SA 1:1'");
350
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
351
+ });
352
+ });
353
+
354
+ describe("Localized book 1Sam (lu)", function() {
355
+ var p;
356
+ p = {};
357
+ beforeEach(function() {
358
+ p = new bcv_parser();
359
+ p.set_options({
360
+ book_alone_strategy: "ignore",
361
+ book_sequence_strategy: "ignore",
362
+ osis_compaction_strategy: "bc",
363
+ captive_end_digits_strategy: "delete"
364
+ });
365
+ p.include_apocrypha(true);
366
+ });
367
+ it("should handle book: 1Sam (lu)", function() {
368
+ expect(p.parse("1. Samuele 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Samuele 1:1'");
369
+ expect(p.parse("1 Samuele 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Samuele 1:1'");
370
+ expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Sa 1:1'");
371
+ expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Sa 1:1'");
372
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
373
+ p.include_apocrypha(false);
374
+ expect(p.parse("1. SAMUELE 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAMUELE 1:1'");
375
+ expect(p.parse("1 SAMUELE 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAMUELE 1:1'");
376
+ expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SA 1:1'");
377
+ expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SA 1:1'");
378
+ expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
379
+ });
380
+ });
381
+
382
+ describe("Localized book 2Kgs (lu)", function() {
383
+ var p;
384
+ p = {};
385
+ beforeEach(function() {
386
+ p = new bcv_parser();
387
+ p.set_options({
388
+ book_alone_strategy: "ignore",
389
+ book_sequence_strategy: "ignore",
390
+ osis_compaction_strategy: "bc",
391
+ captive_end_digits_strategy: "delete"
392
+ });
393
+ p.include_apocrypha(true);
394
+ });
395
+ it("should handle book: 2Kgs (lu)", function() {
396
+ expect(p.parse("2. Bakonzi 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Bakonzi 1:1'");
397
+ expect(p.parse("2 Bakonzi 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Bakonzi 1:1'");
398
+ expect(p.parse("2. Ba 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Ba 1:1'");
399
+ expect(p.parse("2 Ba 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Ba 1:1'");
400
+ expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
401
+ p.include_apocrypha(false);
402
+ expect(p.parse("2. BAKONZI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. BAKONZI 1:1'");
403
+ expect(p.parse("2 BAKONZI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 BAKONZI 1:1'");
404
+ expect(p.parse("2. BA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. BA 1:1'");
405
+ expect(p.parse("2 BA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 BA 1:1'");
406
+ expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
407
+ });
408
+ });
409
+
410
+ describe("Localized book 1Kgs (lu)", function() {
411
+ var p;
412
+ p = {};
413
+ beforeEach(function() {
414
+ p = new bcv_parser();
415
+ p.set_options({
416
+ book_alone_strategy: "ignore",
417
+ book_sequence_strategy: "ignore",
418
+ osis_compaction_strategy: "bc",
419
+ captive_end_digits_strategy: "delete"
420
+ });
421
+ p.include_apocrypha(true);
422
+ });
423
+ it("should handle book: 1Kgs (lu)", function() {
424
+ expect(p.parse("1. Bakonzi 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Bakonzi 1:1'");
425
+ expect(p.parse("1 Bakonzi 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Bakonzi 1:1'");
426
+ expect(p.parse("1. Ba 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Ba 1:1'");
427
+ expect(p.parse("1 Ba 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Ba 1:1'");
428
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
429
+ p.include_apocrypha(false);
430
+ expect(p.parse("1. BAKONZI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. BAKONZI 1:1'");
431
+ expect(p.parse("1 BAKONZI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 BAKONZI 1:1'");
432
+ expect(p.parse("1. BA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. BA 1:1'");
433
+ expect(p.parse("1 BA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 BA 1:1'");
434
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
435
+ });
436
+ });
437
+
438
+ describe("Localized book 2Chr (lu)", function() {
439
+ var p;
440
+ p = {};
441
+ beforeEach(function() {
442
+ p = new bcv_parser();
443
+ p.set_options({
444
+ book_alone_strategy: "ignore",
445
+ book_sequence_strategy: "ignore",
446
+ osis_compaction_strategy: "bc",
447
+ captive_end_digits_strategy: "delete"
448
+ });
449
+ p.include_apocrypha(true);
450
+ });
451
+ it("should handle book: 2Chr (lu)", function() {
452
+ expect(p.parse("2. Binayi 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Binayi 1:1'");
453
+ expect(p.parse("2 Binayi 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Binayi 1:1'");
454
+ expect(p.parse("2. Bi 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Bi 1:1'");
455
+ expect(p.parse("2 Bi 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Bi 1:1'");
456
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
457
+ p.include_apocrypha(false);
458
+ expect(p.parse("2. BINAYI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. BINAYI 1:1'");
459
+ expect(p.parse("2 BINAYI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 BINAYI 1:1'");
460
+ expect(p.parse("2. BI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. BI 1:1'");
461
+ expect(p.parse("2 BI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 BI 1:1'");
462
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
463
+ });
464
+ });
465
+
466
+ describe("Localized book 1Chr (lu)", function() {
467
+ var p;
468
+ p = {};
469
+ beforeEach(function() {
470
+ p = new bcv_parser();
471
+ p.set_options({
472
+ book_alone_strategy: "ignore",
473
+ book_sequence_strategy: "ignore",
474
+ osis_compaction_strategy: "bc",
475
+ captive_end_digits_strategy: "delete"
476
+ });
477
+ p.include_apocrypha(true);
478
+ });
479
+ it("should handle book: 1Chr (lu)", function() {
480
+ expect(p.parse("1. Binayi 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Binayi 1:1'");
481
+ expect(p.parse("1 Binayi 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Binayi 1:1'");
482
+ expect(p.parse("1. Bi 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Bi 1:1'");
483
+ expect(p.parse("1 Bi 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Bi 1:1'");
484
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
485
+ p.include_apocrypha(false);
486
+ expect(p.parse("1. BINAYI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. BINAYI 1:1'");
487
+ expect(p.parse("1 BINAYI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 BINAYI 1:1'");
488
+ expect(p.parse("1. BI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. BI 1:1'");
489
+ expect(p.parse("1 BI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 BI 1:1'");
490
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
491
+ });
492
+ });
493
+
494
+ describe("Localized book Ezra (lu)", function() {
495
+ var p;
496
+ p = {};
497
+ beforeEach(function() {
498
+ p = new bcv_parser();
499
+ p.set_options({
500
+ book_alone_strategy: "ignore",
501
+ book_sequence_strategy: "ignore",
502
+ osis_compaction_strategy: "bc",
503
+ captive_end_digits_strategy: "delete"
504
+ });
505
+ p.include_apocrypha(true);
506
+ });
507
+ it("should handle book: Ezra (lu)", function() {
508
+ expect(p.parse("Ezira 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezira 1:1'");
509
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
510
+ expect(p.parse("Ezi 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezi 1:1'");
511
+ p.include_apocrypha(false);
512
+ expect(p.parse("EZIRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZIRA 1:1'");
513
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
514
+ expect(p.parse("EZI 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZI 1:1'");
515
+ });
516
+ });
517
+
518
+ describe("Localized book Neh (lu)", function() {
519
+ var p;
520
+ p = {};
521
+ beforeEach(function() {
522
+ p = new bcv_parser();
523
+ p.set_options({
524
+ book_alone_strategy: "ignore",
525
+ book_sequence_strategy: "ignore",
526
+ osis_compaction_strategy: "bc",
527
+ captive_end_digits_strategy: "delete"
528
+ });
529
+ p.include_apocrypha(true);
530
+ });
531
+ it("should handle book: Neh (lu)", function() {
532
+ expect(p.parse("Nehemiya 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehemiya 1:1'");
533
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
534
+ p.include_apocrypha(false);
535
+ expect(p.parse("NEHEMIYA 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEMIYA 1:1'");
536
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
537
+ });
538
+ });
539
+
540
+ describe("Localized book Esth (lu)", function() {
541
+ var p;
542
+ p = {};
543
+ beforeEach(function() {
544
+ p = new bcv_parser();
545
+ p.set_options({
546
+ book_alone_strategy: "ignore",
547
+ book_sequence_strategy: "ignore",
548
+ osis_compaction_strategy: "bc",
549
+ captive_end_digits_strategy: "delete"
550
+ });
551
+ p.include_apocrypha(true);
552
+ });
553
+ it("should handle book: Esth (lu)", function() {
554
+ expect(p.parse("Estere 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Estere 1:1'");
555
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
556
+ expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Est 1:1'");
557
+ p.include_apocrypha(false);
558
+ expect(p.parse("ESTERE 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTERE 1:1'");
559
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
560
+ expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1", "parsing: 'EST 1:1'");
561
+ });
562
+ });
563
+
564
+ describe("Localized book Job (lu)", function() {
565
+ var p;
566
+ p = {};
567
+ beforeEach(function() {
568
+ p = new bcv_parser();
569
+ p.set_options({
570
+ book_alone_strategy: "ignore",
571
+ book_sequence_strategy: "ignore",
572
+ osis_compaction_strategy: "bc",
573
+ captive_end_digits_strategy: "delete"
574
+ });
575
+ p.include_apocrypha(true);
576
+ });
577
+ it("should handle book: Job (lu)", function() {
578
+ expect(p.parse("Yobo 1:1").osis()).toEqual("Job.1.1", "parsing: 'Yobo 1:1'");
579
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
580
+ expect(p.parse("Yob 1:1").osis()).toEqual("Job.1.1", "parsing: 'Yob 1:1'");
581
+ p.include_apocrypha(false);
582
+ expect(p.parse("YOBO 1:1").osis()).toEqual("Job.1.1", "parsing: 'YOBO 1:1'");
583
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
584
+ expect(p.parse("YOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'YOB 1:1'");
585
+ });
586
+ });
587
+
588
+ describe("Localized book Ps (lu)", function() {
589
+ var p;
590
+ p = {};
591
+ beforeEach(function() {
592
+ p = new bcv_parser();
593
+ p.set_options({
594
+ book_alone_strategy: "ignore",
595
+ book_sequence_strategy: "ignore",
596
+ osis_compaction_strategy: "bc",
597
+ captive_end_digits_strategy: "delete"
598
+ });
599
+ p.include_apocrypha(true);
600
+ });
601
+ it("should handle book: Ps (lu)", function() {
602
+ expect(p.parse("Mizii 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Mizii 1:1'");
603
+ expect(p.parse("Miz 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Miz 1:1'");
604
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
605
+ p.include_apocrypha(false);
606
+ expect(p.parse("MIZII 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MIZII 1:1'");
607
+ expect(p.parse("MIZ 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MIZ 1:1'");
608
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
609
+ });
610
+ });
611
+
612
+ describe("Localized book Prov (lu)", function() {
613
+ var p;
614
+ p = {};
615
+ beforeEach(function() {
616
+ p = new bcv_parser();
617
+ p.set_options({
618
+ book_alone_strategy: "ignore",
619
+ book_sequence_strategy: "ignore",
620
+ osis_compaction_strategy: "bc",
621
+ captive_end_digits_strategy: "delete"
622
+ });
623
+ p.include_apocrypha(true);
624
+ });
625
+ it("should handle book: Prov (lu)", function() {
626
+ expect(p.parse("Imisangu 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Imisangu 1:1'");
627
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
628
+ expect(p.parse("Imi 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Imi 1:1'");
629
+ p.include_apocrypha(false);
630
+ expect(p.parse("IMISANGU 1:1").osis()).toEqual("Prov.1.1", "parsing: 'IMISANGU 1:1'");
631
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
632
+ expect(p.parse("IMI 1:1").osis()).toEqual("Prov.1.1", "parsing: 'IMI 1:1'");
633
+ });
634
+ });
635
+
636
+ describe("Localized book Eccl (lu)", function() {
637
+ var p;
638
+ p = {};
639
+ beforeEach(function() {
640
+ p = new bcv_parser();
641
+ p.set_options({
642
+ book_alone_strategy: "ignore",
643
+ book_sequence_strategy: "ignore",
644
+ osis_compaction_strategy: "bc",
645
+ captive_end_digits_strategy: "delete"
646
+ });
647
+ p.include_apocrypha(true);
648
+ });
649
+ it("should handle book: Eccl (lu)", function() {
650
+ expect(p.parse("Mubikila 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Mubikila 1:1'");
651
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
652
+ expect(p.parse("Mub 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Mub 1:1'");
653
+ p.include_apocrypha(false);
654
+ expect(p.parse("MUBIKILA 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'MUBIKILA 1:1'");
655
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
656
+ expect(p.parse("MUB 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'MUB 1:1'");
657
+ });
658
+ });
659
+
660
+ describe("Localized book Song (lu)", function() {
661
+ var p;
662
+ p = {};
663
+ beforeEach(function() {
664
+ p = new bcv_parser();
665
+ p.set_options({
666
+ book_alone_strategy: "ignore",
667
+ book_sequence_strategy: "ignore",
668
+ osis_compaction_strategy: "bc",
669
+ captive_end_digits_strategy: "delete"
670
+ });
671
+ p.include_apocrypha(true);
672
+ });
673
+ it("should handle book: Song (lu)", function() {
674
+ expect(p.parse("Mulunge wa malunge 1:1").osis()).toEqual("Song.1.1", "parsing: 'Mulunge wa malunge 1:1'");
675
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
676
+ expect(p.parse("Mul 1:1").osis()).toEqual("Song.1.1", "parsing: 'Mul 1:1'");
677
+ p.include_apocrypha(false);
678
+ expect(p.parse("MULUNGE WA MALUNGE 1:1").osis()).toEqual("Song.1.1", "parsing: 'MULUNGE WA MALUNGE 1:1'");
679
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
680
+ expect(p.parse("MUL 1:1").osis()).toEqual("Song.1.1", "parsing: 'MUL 1:1'");
681
+ });
682
+ });
683
+
684
+ describe("Localized book Jer (lu)", function() {
685
+ var p;
686
+ p = {};
687
+ beforeEach(function() {
688
+ p = new bcv_parser();
689
+ p.set_options({
690
+ book_alone_strategy: "ignore",
691
+ book_sequence_strategy: "ignore",
692
+ osis_compaction_strategy: "bc",
693
+ captive_end_digits_strategy: "delete"
694
+ });
695
+ p.include_apocrypha(true);
696
+ });
697
+ it("should handle book: Jer (lu)", function() {
698
+ expect(p.parse("Yeremiya 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yeremiya 1:1'");
699
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
700
+ expect(p.parse("Yer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yer 1:1'");
701
+ p.include_apocrypha(false);
702
+ expect(p.parse("YEREMIYA 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YEREMIYA 1:1'");
703
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
704
+ expect(p.parse("YER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YER 1:1'");
705
+ });
706
+ });
707
+
708
+ describe("Localized book Ezek (lu)", 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: Ezek (lu)", function() {
722
+ expect(p.parse("Ezekiele 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezekiele 1:1'");
723
+ expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
724
+ expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Eze 1:1'");
725
+ p.include_apocrypha(false);
726
+ expect(p.parse("EZEKIELE 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEKIELE 1:1'");
727
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
728
+ expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZE 1:1'");
729
+ });
730
+ });
731
+
732
+ describe("Localized book Dan (lu)", function() {
733
+ var p;
734
+ p = {};
735
+ beforeEach(function() {
736
+ p = new bcv_parser();
737
+ p.set_options({
738
+ book_alone_strategy: "ignore",
739
+ book_sequence_strategy: "ignore",
740
+ osis_compaction_strategy: "bc",
741
+ captive_end_digits_strategy: "delete"
742
+ });
743
+ p.include_apocrypha(true);
744
+ });
745
+ it("should handle book: Dan (lu)", function() {
746
+ expect(p.parse("Danyele 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Danyele 1:1'");
747
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
748
+ p.include_apocrypha(false);
749
+ expect(p.parse("DANYELE 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DANYELE 1:1'");
750
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
751
+ });
752
+ });
753
+
754
+ describe("Localized book Hos (lu)", function() {
755
+ var p;
756
+ p = {};
757
+ beforeEach(function() {
758
+ p = new bcv_parser();
759
+ p.set_options({
760
+ book_alone_strategy: "ignore",
761
+ book_sequence_strategy: "ignore",
762
+ osis_compaction_strategy: "bc",
763
+ captive_end_digits_strategy: "delete"
764
+ });
765
+ p.include_apocrypha(true);
766
+ });
767
+ it("should handle book: Hos (lu)", function() {
768
+ expect(p.parse("Oseya 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Oseya 1:1'");
769
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
770
+ expect(p.parse("Ose 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Ose 1:1'");
771
+ p.include_apocrypha(false);
772
+ expect(p.parse("OSEYA 1:1").osis()).toEqual("Hos.1.1", "parsing: 'OSEYA 1:1'");
773
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
774
+ expect(p.parse("OSE 1:1").osis()).toEqual("Hos.1.1", "parsing: 'OSE 1:1'");
775
+ });
776
+ });
777
+
778
+ describe("Localized book Joel (lu)", function() {
779
+ var p;
780
+ p = {};
781
+ beforeEach(function() {
782
+ p = new bcv_parser();
783
+ p.set_options({
784
+ book_alone_strategy: "ignore",
785
+ book_sequence_strategy: "ignore",
786
+ osis_compaction_strategy: "bc",
787
+ captive_end_digits_strategy: "delete"
788
+ });
789
+ p.include_apocrypha(true);
790
+ });
791
+ it("should handle book: Joel (lu)", function() {
792
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
793
+ expect(p.parse("Yole 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Yole 1:1'");
794
+ expect(p.parse("Yol 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Yol 1:1'");
795
+ p.include_apocrypha(false);
796
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
797
+ expect(p.parse("YOLE 1:1").osis()).toEqual("Joel.1.1", "parsing: 'YOLE 1:1'");
798
+ expect(p.parse("YOL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'YOL 1:1'");
799
+ });
800
+ });
801
+
802
+ describe("Localized book Amos (lu)", function() {
803
+ var p;
804
+ p = {};
805
+ beforeEach(function() {
806
+ p = new bcv_parser();
807
+ p.set_options({
808
+ book_alone_strategy: "ignore",
809
+ book_sequence_strategy: "ignore",
810
+ osis_compaction_strategy: "bc",
811
+ captive_end_digits_strategy: "delete"
812
+ });
813
+ p.include_apocrypha(true);
814
+ });
815
+ it("should handle book: Amos (lu)", function() {
816
+ expect(p.parse("Amosi 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amosi 1:1'");
817
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
818
+ expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amo 1:1'");
819
+ p.include_apocrypha(false);
820
+ expect(p.parse("AMOSI 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOSI 1:1'");
821
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
822
+ expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMO 1:1'");
823
+ });
824
+ });
825
+
826
+ describe("Localized book Obad (lu)", function() {
827
+ var p;
828
+ p = {};
829
+ beforeEach(function() {
830
+ p = new bcv_parser();
831
+ p.set_options({
832
+ book_alone_strategy: "ignore",
833
+ book_sequence_strategy: "ignore",
834
+ osis_compaction_strategy: "bc",
835
+ captive_end_digits_strategy: "delete"
836
+ });
837
+ p.include_apocrypha(true);
838
+ });
839
+ it("should handle book: Obad (lu)", function() {
840
+ expect(p.parse("Obadiya 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obadiya 1:1'");
841
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
842
+ expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Oba 1:1'");
843
+ p.include_apocrypha(false);
844
+ expect(p.parse("OBADIYA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBADIYA 1:1'");
845
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
846
+ expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBA 1:1'");
847
+ });
848
+ });
849
+
850
+ describe("Localized book Jonah (lu)", function() {
851
+ var p;
852
+ p = {};
853
+ beforeEach(function() {
854
+ p = new bcv_parser();
855
+ p.set_options({
856
+ book_alone_strategy: "ignore",
857
+ book_sequence_strategy: "ignore",
858
+ osis_compaction_strategy: "bc",
859
+ captive_end_digits_strategy: "delete"
860
+ });
861
+ p.include_apocrypha(true);
862
+ });
863
+ it("should handle book: Jonah (lu)", function() {
864
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
865
+ expect(p.parse("Yona 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yona 1:1'");
866
+ expect(p.parse("Yon 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yon 1:1'");
867
+ p.include_apocrypha(false);
868
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
869
+ expect(p.parse("YONA 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YONA 1:1'");
870
+ expect(p.parse("YON 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YON 1:1'");
871
+ });
872
+ });
873
+
874
+ describe("Localized book Mic (lu)", function() {
875
+ var p;
876
+ p = {};
877
+ beforeEach(function() {
878
+ p = new bcv_parser();
879
+ p.set_options({
880
+ book_alone_strategy: "ignore",
881
+ book_sequence_strategy: "ignore",
882
+ osis_compaction_strategy: "bc",
883
+ captive_end_digits_strategy: "delete"
884
+ });
885
+ p.include_apocrypha(true);
886
+ });
887
+ it("should handle book: Mic (lu)", function() {
888
+ expect(p.parse("Mikaya 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mikaya 1:1'");
889
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
890
+ expect(p.parse("Mik 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mik 1:1'");
891
+ p.include_apocrypha(false);
892
+ expect(p.parse("MIKAYA 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIKAYA 1:1'");
893
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
894
+ expect(p.parse("MIK 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIK 1:1'");
895
+ });
896
+ });
897
+
898
+ describe("Localized book Nah (lu)", 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: Nah (lu)", function() {
912
+ expect(p.parse("Nahumi 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nahumi 1:1'");
913
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
914
+ p.include_apocrypha(false);
915
+ expect(p.parse("NAHUMI 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAHUMI 1:1'");
916
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
917
+ });
918
+ });
919
+
920
+ describe("Localized book Hab (lu)", 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: Hab (lu)", function() {
934
+ expect(p.parse("Habakuki 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Habakuki 1:1'");
935
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
936
+ p.include_apocrypha(false);
937
+ expect(p.parse("HABAKUKI 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HABAKUKI 1:1'");
938
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
939
+ });
940
+ });
941
+
942
+ describe("Localized book Zeph (lu)", 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: Zeph (lu)", function() {
956
+ expect(p.parse("Sefaniya 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Sefaniya 1:1'");
957
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
958
+ expect(p.parse("Sef 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Sef 1:1'");
959
+ p.include_apocrypha(false);
960
+ expect(p.parse("SEFANIYA 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'SEFANIYA 1:1'");
961
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
962
+ expect(p.parse("SEF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'SEF 1:1'");
963
+ });
964
+ });
965
+
966
+ describe("Localized book Hag (lu)", function() {
967
+ var p;
968
+ p = {};
969
+ beforeEach(function() {
970
+ p = new bcv_parser();
971
+ p.set_options({
972
+ book_alone_strategy: "ignore",
973
+ book_sequence_strategy: "ignore",
974
+ osis_compaction_strategy: "bc",
975
+ captive_end_digits_strategy: "delete"
976
+ });
977
+ p.include_apocrypha(true);
978
+ });
979
+ it("should handle book: Hag (lu)", function() {
980
+ expect(p.parse("Hagayi 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hagayi 1:1'");
981
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
982
+ p.include_apocrypha(false);
983
+ expect(p.parse("HAGAYI 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAGAYI 1:1'");
984
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
985
+ });
986
+ });
987
+
988
+ describe("Localized book Zech (lu)", function() {
989
+ var p;
990
+ p = {};
991
+ beforeEach(function() {
992
+ p = new bcv_parser();
993
+ p.set_options({
994
+ book_alone_strategy: "ignore",
995
+ book_sequence_strategy: "ignore",
996
+ osis_compaction_strategy: "bc",
997
+ captive_end_digits_strategy: "delete"
998
+ });
999
+ p.include_apocrypha(true);
1000
+ });
1001
+ it("should handle book: Zech (lu)", function() {
1002
+ expect(p.parse("Zakariya 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zakariya 1:1'");
1003
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
1004
+ expect(p.parse("Zak 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zak 1:1'");
1005
+ p.include_apocrypha(false);
1006
+ expect(p.parse("ZAKARIYA 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZAKARIYA 1:1'");
1007
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1008
+ expect(p.parse("ZAK 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZAK 1:1'");
1009
+ });
1010
+ });
1011
+
1012
+ describe("Localized book Mal (lu)", function() {
1013
+ var p;
1014
+ p = {};
1015
+ beforeEach(function() {
1016
+ p = new bcv_parser();
1017
+ p.set_options({
1018
+ book_alone_strategy: "ignore",
1019
+ book_sequence_strategy: "ignore",
1020
+ osis_compaction_strategy: "bc",
1021
+ captive_end_digits_strategy: "delete"
1022
+ });
1023
+ p.include_apocrypha(true);
1024
+ });
1025
+ it("should handle book: Mal (lu)", function() {
1026
+ expect(p.parse("Malakiya 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Malakiya 1:1'");
1027
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1028
+ p.include_apocrypha(false);
1029
+ expect(p.parse("MALAKIYA 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MALAKIYA 1:1'");
1030
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1031
+ });
1032
+ });
1033
+
1034
+ describe("Localized book Matt (lu)", function() {
1035
+ var p;
1036
+ p = {};
1037
+ beforeEach(function() {
1038
+ p = new bcv_parser();
1039
+ p.set_options({
1040
+ book_alone_strategy: "ignore",
1041
+ book_sequence_strategy: "ignore",
1042
+ osis_compaction_strategy: "bc",
1043
+ captive_end_digits_strategy: "delete"
1044
+ });
1045
+ p.include_apocrypha(true);
1046
+ });
1047
+ it("should handle book: Matt (lu)", function() {
1048
+ expect(p.parse("Mateyu 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mateyu 1:1'");
1049
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1050
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1051
+ p.include_apocrypha(false);
1052
+ expect(p.parse("MATEYU 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATEYU 1:1'");
1053
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1054
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1055
+ });
1056
+ });
1057
+
1058
+ describe("Localized book Mark (lu)", function() {
1059
+ var p;
1060
+ p = {};
1061
+ beforeEach(function() {
1062
+ p = new bcv_parser();
1063
+ p.set_options({
1064
+ book_alone_strategy: "ignore",
1065
+ book_sequence_strategy: "ignore",
1066
+ osis_compaction_strategy: "bc",
1067
+ captive_end_digits_strategy: "delete"
1068
+ });
1069
+ p.include_apocrypha(true);
1070
+ });
1071
+ it("should handle book: Mark (lu)", function() {
1072
+ expect(p.parse("Malako 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Malako 1:1'");
1073
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1074
+ expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mar 1:1'");
1075
+ p.include_apocrypha(false);
1076
+ expect(p.parse("MALAKO 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MALAKO 1:1'");
1077
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1078
+ expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MAR 1:1'");
1079
+ });
1080
+ });
1081
+
1082
+ describe("Localized book Luke (lu)", function() {
1083
+ var p;
1084
+ p = {};
1085
+ beforeEach(function() {
1086
+ p = new bcv_parser();
1087
+ p.set_options({
1088
+ book_alone_strategy: "ignore",
1089
+ book_sequence_strategy: "ignore",
1090
+ osis_compaction_strategy: "bc",
1091
+ captive_end_digits_strategy: "delete"
1092
+ });
1093
+ p.include_apocrypha(true);
1094
+ });
1095
+ it("should handle book: Luke (lu)", function() {
1096
+ expect(p.parse("Luka 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luka 1:1'");
1097
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1098
+ expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luk 1:1'");
1099
+ p.include_apocrypha(false);
1100
+ expect(p.parse("LUKA 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKA 1:1'");
1101
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1102
+ expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUK 1:1'");
1103
+ });
1104
+ });
1105
+
1106
+ describe("Localized book 1John (lu)", function() {
1107
+ var p;
1108
+ p = {};
1109
+ beforeEach(function() {
1110
+ p = new bcv_parser();
1111
+ p.set_options({
1112
+ book_alone_strategy: "ignore",
1113
+ book_sequence_strategy: "ignore",
1114
+ osis_compaction_strategy: "bc",
1115
+ captive_end_digits_strategy: "delete"
1116
+ });
1117
+ p.include_apocrypha(true);
1118
+ });
1119
+ it("should handle book: 1John (lu)", function() {
1120
+ expect(p.parse("1. Yohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yohane 1:1'");
1121
+ expect(p.parse("1 Yohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yohane 1:1'");
1122
+ expect(p.parse("1. Yo 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yo 1:1'");
1123
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1124
+ expect(p.parse("1 Yo 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yo 1:1'");
1125
+ p.include_apocrypha(false);
1126
+ expect(p.parse("1. YOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YOHANE 1:1'");
1127
+ expect(p.parse("1 YOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YOHANE 1:1'");
1128
+ expect(p.parse("1. YO 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YO 1:1'");
1129
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1130
+ expect(p.parse("1 YO 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YO 1:1'");
1131
+ });
1132
+ });
1133
+
1134
+ describe("Localized book 2John (lu)", function() {
1135
+ var p;
1136
+ p = {};
1137
+ beforeEach(function() {
1138
+ p = new bcv_parser();
1139
+ p.set_options({
1140
+ book_alone_strategy: "ignore",
1141
+ book_sequence_strategy: "ignore",
1142
+ osis_compaction_strategy: "bc",
1143
+ captive_end_digits_strategy: "delete"
1144
+ });
1145
+ p.include_apocrypha(true);
1146
+ });
1147
+ it("should handle book: 2John (lu)", function() {
1148
+ expect(p.parse("2. Yohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yohane 1:1'");
1149
+ expect(p.parse("2 Yohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yohane 1:1'");
1150
+ expect(p.parse("2. Yo 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yo 1:1'");
1151
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1152
+ expect(p.parse("2 Yo 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yo 1:1'");
1153
+ p.include_apocrypha(false);
1154
+ expect(p.parse("2. YOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YOHANE 1:1'");
1155
+ expect(p.parse("2 YOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YOHANE 1:1'");
1156
+ expect(p.parse("2. YO 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YO 1:1'");
1157
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1158
+ expect(p.parse("2 YO 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YO 1:1'");
1159
+ });
1160
+ });
1161
+
1162
+ describe("Localized book 3John (lu)", 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: 3John (lu)", function() {
1176
+ expect(p.parse("3. Yohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yohane 1:1'");
1177
+ expect(p.parse("3 Yohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yohane 1:1'");
1178
+ expect(p.parse("3. Yo 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yo 1:1'");
1179
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1180
+ expect(p.parse("3 Yo 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yo 1:1'");
1181
+ p.include_apocrypha(false);
1182
+ expect(p.parse("3. YOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YOHANE 1:1'");
1183
+ expect(p.parse("3 YOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YOHANE 1:1'");
1184
+ expect(p.parse("3. YO 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YO 1:1'");
1185
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1186
+ expect(p.parse("3 YO 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YO 1:1'");
1187
+ });
1188
+ });
1189
+
1190
+ describe("Localized book John (lu)", function() {
1191
+ var p;
1192
+ p = {};
1193
+ beforeEach(function() {
1194
+ p = new bcv_parser();
1195
+ p.set_options({
1196
+ book_alone_strategy: "ignore",
1197
+ book_sequence_strategy: "ignore",
1198
+ osis_compaction_strategy: "bc",
1199
+ captive_end_digits_strategy: "delete"
1200
+ });
1201
+ p.include_apocrypha(true);
1202
+ });
1203
+ it("should handle book: John (lu)", function() {
1204
+ expect(p.parse("Yohane 1:1").osis()).toEqual("John.1.1", "parsing: 'Yohane 1:1'");
1205
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1206
+ expect(p.parse("Yoh 1:1").osis()).toEqual("John.1.1", "parsing: 'Yoh 1:1'");
1207
+ p.include_apocrypha(false);
1208
+ expect(p.parse("YOHANE 1:1").osis()).toEqual("John.1.1", "parsing: 'YOHANE 1:1'");
1209
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1210
+ expect(p.parse("YOH 1:1").osis()).toEqual("John.1.1", "parsing: 'YOH 1:1'");
1211
+ });
1212
+ });
1213
+
1214
+ describe("Localized book Acts (lu)", function() {
1215
+ var p;
1216
+ p = {};
1217
+ beforeEach(function() {
1218
+ p = new bcv_parser();
1219
+ p.set_options({
1220
+ book_alone_strategy: "ignore",
1221
+ book_sequence_strategy: "ignore",
1222
+ osis_compaction_strategy: "bc",
1223
+ captive_end_digits_strategy: "delete"
1224
+ });
1225
+ p.include_apocrypha(true);
1226
+ });
1227
+ it("should handle book: Acts (lu)", function() {
1228
+ expect(p.parse("Misangu 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Misangu 1:1'");
1229
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1230
+ expect(p.parse("Mis 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Mis 1:1'");
1231
+ p.include_apocrypha(false);
1232
+ expect(p.parse("MISANGU 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MISANGU 1:1'");
1233
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1234
+ expect(p.parse("MIS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MIS 1:1'");
1235
+ });
1236
+ });
1237
+
1238
+ describe("Localized book Rom (lu)", function() {
1239
+ var p;
1240
+ p = {};
1241
+ beforeEach(function() {
1242
+ p = new bcv_parser();
1243
+ p.set_options({
1244
+ book_alone_strategy: "ignore",
1245
+ book_sequence_strategy: "ignore",
1246
+ osis_compaction_strategy: "bc",
1247
+ captive_end_digits_strategy: "delete"
1248
+ });
1249
+ p.include_apocrypha(true);
1250
+ });
1251
+ it("should handle book: Rom (lu)", function() {
1252
+ expect(p.parse("Baroma 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Baroma 1:1'");
1253
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1254
+ p.include_apocrypha(false);
1255
+ expect(p.parse("BAROMA 1:1").osis()).toEqual("Rom.1.1", "parsing: 'BAROMA 1:1'");
1256
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1257
+ });
1258
+ });
1259
+
1260
+ describe("Localized book 2Cor (lu)", function() {
1261
+ var p;
1262
+ p = {};
1263
+ beforeEach(function() {
1264
+ p = new bcv_parser();
1265
+ p.set_options({
1266
+ book_alone_strategy: "ignore",
1267
+ book_sequence_strategy: "ignore",
1268
+ osis_compaction_strategy: "bc",
1269
+ captive_end_digits_strategy: "delete"
1270
+ });
1271
+ p.include_apocrypha(true);
1272
+ });
1273
+ it("should handle book: 2Cor (lu)", function() {
1274
+ expect(p.parse("2. Bakolinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Bakolinto 1:1'");
1275
+ expect(p.parse("2 Bakolinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Bakolinto 1:1'");
1276
+ expect(p.parse("2. Bl 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Bl 1:1'");
1277
+ expect(p.parse("2 Bl 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Bl 1:1'");
1278
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1279
+ p.include_apocrypha(false);
1280
+ expect(p.parse("2. BAKOLINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. BAKOLINTO 1:1'");
1281
+ expect(p.parse("2 BAKOLINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 BAKOLINTO 1:1'");
1282
+ expect(p.parse("2. BL 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. BL 1:1'");
1283
+ expect(p.parse("2 BL 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 BL 1:1'");
1284
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1285
+ });
1286
+ });
1287
+
1288
+ describe("Localized book 1Cor (lu)", function() {
1289
+ var p;
1290
+ p = {};
1291
+ beforeEach(function() {
1292
+ p = new bcv_parser();
1293
+ p.set_options({
1294
+ book_alone_strategy: "ignore",
1295
+ book_sequence_strategy: "ignore",
1296
+ osis_compaction_strategy: "bc",
1297
+ captive_end_digits_strategy: "delete"
1298
+ });
1299
+ p.include_apocrypha(true);
1300
+ });
1301
+ it("should handle book: 1Cor (lu)", function() {
1302
+ expect(p.parse("1. Bakolinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Bakolinto 1:1'");
1303
+ expect(p.parse("1 Bakolinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Bakolinto 1:1'");
1304
+ expect(p.parse("1. Bl 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Bl 1:1'");
1305
+ expect(p.parse("1 Bl 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Bl 1:1'");
1306
+ expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
1307
+ p.include_apocrypha(false);
1308
+ expect(p.parse("1. BAKOLINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. BAKOLINTO 1:1'");
1309
+ expect(p.parse("1 BAKOLINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 BAKOLINTO 1:1'");
1310
+ expect(p.parse("1. BL 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. BL 1:1'");
1311
+ expect(p.parse("1 BL 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 BL 1:1'");
1312
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1313
+ });
1314
+ });
1315
+
1316
+ describe("Localized book Gal (lu)", function() {
1317
+ var p;
1318
+ p = {};
1319
+ beforeEach(function() {
1320
+ p = new bcv_parser();
1321
+ p.set_options({
1322
+ book_alone_strategy: "ignore",
1323
+ book_sequence_strategy: "ignore",
1324
+ osis_compaction_strategy: "bc",
1325
+ captive_end_digits_strategy: "delete"
1326
+ });
1327
+ p.include_apocrypha(true);
1328
+ });
1329
+ it("should handle book: Gal (lu)", function() {
1330
+ expect(p.parse("Bagalatiya 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Bagalatiya 1:1'");
1331
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1332
+ p.include_apocrypha(false);
1333
+ expect(p.parse("BAGALATIYA 1:1").osis()).toEqual("Gal.1.1", "parsing: 'BAGALATIYA 1:1'");
1334
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1335
+ });
1336
+ });
1337
+
1338
+ describe("Localized book Eph (lu)", function() {
1339
+ var p;
1340
+ p = {};
1341
+ beforeEach(function() {
1342
+ p = new bcv_parser();
1343
+ p.set_options({
1344
+ book_alone_strategy: "ignore",
1345
+ book_sequence_strategy: "ignore",
1346
+ osis_compaction_strategy: "bc",
1347
+ captive_end_digits_strategy: "delete"
1348
+ });
1349
+ p.include_apocrypha(true);
1350
+ });
1351
+ it("should handle book: Eph (lu)", function() {
1352
+ expect(p.parse("Baefesia 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Baefesia 1:1'");
1353
+ expect(p.parse("Efe 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efe 1:1'");
1354
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1355
+ p.include_apocrypha(false);
1356
+ expect(p.parse("BAEFESIA 1:1").osis()).toEqual("Eph.1.1", "parsing: 'BAEFESIA 1:1'");
1357
+ expect(p.parse("EFE 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFE 1:1'");
1358
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1359
+ });
1360
+ });
1361
+
1362
+ describe("Localized book Phil (lu)", function() {
1363
+ var p;
1364
+ p = {};
1365
+ beforeEach(function() {
1366
+ p = new bcv_parser();
1367
+ p.set_options({
1368
+ book_alone_strategy: "ignore",
1369
+ book_sequence_strategy: "ignore",
1370
+ osis_compaction_strategy: "bc",
1371
+ captive_end_digits_strategy: "delete"
1372
+ });
1373
+ p.include_apocrypha(true);
1374
+ });
1375
+ it("should handle book: Phil (lu)", function() {
1376
+ expect(p.parse("Bafilipi 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Bafilipi 1:1'");
1377
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1378
+ expect(p.parse("Fil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Fil 1:1'");
1379
+ p.include_apocrypha(false);
1380
+ expect(p.parse("BAFILIPI 1:1").osis()).toEqual("Phil.1.1", "parsing: 'BAFILIPI 1:1'");
1381
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1382
+ expect(p.parse("FIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FIL 1:1'");
1383
+ });
1384
+ });
1385
+
1386
+ describe("Localized book Col (lu)", function() {
1387
+ var p;
1388
+ p = {};
1389
+ beforeEach(function() {
1390
+ p = new bcv_parser();
1391
+ p.set_options({
1392
+ book_alone_strategy: "ignore",
1393
+ book_sequence_strategy: "ignore",
1394
+ osis_compaction_strategy: "bc",
1395
+ captive_end_digits_strategy: "delete"
1396
+ });
1397
+ p.include_apocrypha(true);
1398
+ });
1399
+ it("should handle book: Col (lu)", function() {
1400
+ expect(p.parse("Bakolosai 1:1").osis()).toEqual("Col.1.1", "parsing: 'Bakolosai 1:1'");
1401
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1402
+ expect(p.parse("Kol 1:1").osis()).toEqual("Col.1.1", "parsing: 'Kol 1:1'");
1403
+ p.include_apocrypha(false);
1404
+ expect(p.parse("BAKOLOSAI 1:1").osis()).toEqual("Col.1.1", "parsing: 'BAKOLOSAI 1:1'");
1405
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1406
+ expect(p.parse("KOL 1:1").osis()).toEqual("Col.1.1", "parsing: 'KOL 1:1'");
1407
+ });
1408
+ });
1409
+
1410
+ describe("Localized book 2Thess (lu)", function() {
1411
+ var p;
1412
+ p = {};
1413
+ beforeEach(function() {
1414
+ p = new bcv_parser();
1415
+ p.set_options({
1416
+ book_alone_strategy: "ignore",
1417
+ book_sequence_strategy: "ignore",
1418
+ osis_compaction_strategy: "bc",
1419
+ captive_end_digits_strategy: "delete"
1420
+ });
1421
+ p.include_apocrypha(true);
1422
+ });
1423
+ it("should handle book: 2Thess (lu)", function() {
1424
+ expect(p.parse("2. Batesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Batesalonika 1:1'");
1425
+ expect(p.parse("2 Batesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Batesalonika 1:1'");
1426
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1427
+ expect(p.parse("2. Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Te 1:1'");
1428
+ expect(p.parse("2 Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Te 1:1'");
1429
+ p.include_apocrypha(false);
1430
+ expect(p.parse("2. BATESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. BATESALONIKA 1:1'");
1431
+ expect(p.parse("2 BATESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 BATESALONIKA 1:1'");
1432
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1433
+ expect(p.parse("2. TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TE 1:1'");
1434
+ expect(p.parse("2 TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TE 1:1'");
1435
+ });
1436
+ });
1437
+
1438
+ describe("Localized book 1Thess (lu)", 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: 1Thess (lu)", function() {
1452
+ expect(p.parse("1. Batesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Batesalonika 1:1'");
1453
+ expect(p.parse("1 Batesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Batesalonika 1:1'");
1454
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1455
+ expect(p.parse("1. Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Te 1:1'");
1456
+ expect(p.parse("1 Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Te 1:1'");
1457
+ p.include_apocrypha(false);
1458
+ expect(p.parse("1. BATESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. BATESALONIKA 1:1'");
1459
+ expect(p.parse("1 BATESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 BATESALONIKA 1:1'");
1460
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1461
+ expect(p.parse("1. TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TE 1:1'");
1462
+ expect(p.parse("1 TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TE 1:1'");
1463
+ });
1464
+ });
1465
+
1466
+ describe("Localized book 2Tim (lu)", 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: 2Tim (lu)", function() {
1480
+ expect(p.parse("2. Timote 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Timote 1:1'");
1481
+ expect(p.parse("2 Timote 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Timote 1:1'");
1482
+ expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Ti 1:1'");
1483
+ expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Ti 1:1'");
1484
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1485
+ p.include_apocrypha(false);
1486
+ expect(p.parse("2. TIMOTE 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIMOTE 1:1'");
1487
+ expect(p.parse("2 TIMOTE 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIMOTE 1:1'");
1488
+ expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TI 1:1'");
1489
+ expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TI 1:1'");
1490
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1491
+ });
1492
+ });
1493
+
1494
+ describe("Localized book 1Tim (lu)", function() {
1495
+ var p;
1496
+ p = {};
1497
+ beforeEach(function() {
1498
+ p = new bcv_parser();
1499
+ p.set_options({
1500
+ book_alone_strategy: "ignore",
1501
+ book_sequence_strategy: "ignore",
1502
+ osis_compaction_strategy: "bc",
1503
+ captive_end_digits_strategy: "delete"
1504
+ });
1505
+ p.include_apocrypha(true);
1506
+ });
1507
+ it("should handle book: 1Tim (lu)", function() {
1508
+ expect(p.parse("1. Timote 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Timote 1:1'");
1509
+ expect(p.parse("1 Timote 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Timote 1:1'");
1510
+ expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Ti 1:1'");
1511
+ expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Ti 1:1'");
1512
+ expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
1513
+ p.include_apocrypha(false);
1514
+ expect(p.parse("1. TIMOTE 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIMOTE 1:1'");
1515
+ expect(p.parse("1 TIMOTE 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIMOTE 1:1'");
1516
+ expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TI 1:1'");
1517
+ expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TI 1:1'");
1518
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1519
+ });
1520
+ });
1521
+
1522
+ describe("Localized book Titus (lu)", function() {
1523
+ var p;
1524
+ p = {};
1525
+ beforeEach(function() {
1526
+ p = new bcv_parser();
1527
+ p.set_options({
1528
+ book_alone_strategy: "ignore",
1529
+ book_sequence_strategy: "ignore",
1530
+ osis_compaction_strategy: "bc",
1531
+ captive_end_digits_strategy: "delete"
1532
+ });
1533
+ p.include_apocrypha(true);
1534
+ });
1535
+ it("should handle book: Titus (lu)", function() {
1536
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1537
+ expect(p.parse("Tito 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tito 1:1'");
1538
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1539
+ p.include_apocrypha(false);
1540
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1541
+ expect(p.parse("TITO 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITO 1:1'");
1542
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1543
+ });
1544
+ });
1545
+
1546
+ describe("Localized book Phlm (lu)", function() {
1547
+ var p;
1548
+ p = {};
1549
+ beforeEach(function() {
1550
+ p = new bcv_parser();
1551
+ p.set_options({
1552
+ book_alone_strategy: "ignore",
1553
+ book_sequence_strategy: "ignore",
1554
+ osis_compaction_strategy: "bc",
1555
+ captive_end_digits_strategy: "delete"
1556
+ });
1557
+ p.include_apocrypha(true);
1558
+ });
1559
+ it("should handle book: Phlm (lu)", function() {
1560
+ expect(p.parse("Filemoni 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Filemoni 1:1'");
1561
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1562
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1563
+ p.include_apocrypha(false);
1564
+ expect(p.parse("FILEMONI 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FILEMONI 1:1'");
1565
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1566
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1567
+ });
1568
+ });
1569
+
1570
+ describe("Localized book Heb (lu)", function() {
1571
+ var p;
1572
+ p = {};
1573
+ beforeEach(function() {
1574
+ p = new bcv_parser();
1575
+ p.set_options({
1576
+ book_alone_strategy: "ignore",
1577
+ book_sequence_strategy: "ignore",
1578
+ osis_compaction_strategy: "bc",
1579
+ captive_end_digits_strategy: "delete"
1580
+ });
1581
+ p.include_apocrypha(true);
1582
+ });
1583
+ it("should handle book: Heb (lu)", function() {
1584
+ expect(p.parse("Baebre 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Baebre 1:1'");
1585
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1586
+ p.include_apocrypha(false);
1587
+ expect(p.parse("BAEBRE 1:1").osis()).toEqual("Heb.1.1", "parsing: 'BAEBRE 1:1'");
1588
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1589
+ });
1590
+ });
1591
+
1592
+ describe("Localized book Jas (lu)", function() {
1593
+ var p;
1594
+ p = {};
1595
+ beforeEach(function() {
1596
+ p = new bcv_parser();
1597
+ p.set_options({
1598
+ book_alone_strategy: "ignore",
1599
+ book_sequence_strategy: "ignore",
1600
+ osis_compaction_strategy: "bc",
1601
+ captive_end_digits_strategy: "delete"
1602
+ });
1603
+ p.include_apocrypha(true);
1604
+ });
1605
+ it("should handle book: Jas (lu)", function() {
1606
+ expect(p.parse("Yakobo 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yakobo 1:1'");
1607
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1608
+ expect(p.parse("Yak 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yak 1:1'");
1609
+ p.include_apocrypha(false);
1610
+ expect(p.parse("YAKOBO 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAKOBO 1:1'");
1611
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1612
+ expect(p.parse("YAK 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAK 1:1'");
1613
+ });
1614
+ });
1615
+
1616
+ describe("Localized book 2Pet (lu)", function() {
1617
+ var p;
1618
+ p = {};
1619
+ beforeEach(function() {
1620
+ p = new bcv_parser();
1621
+ p.set_options({
1622
+ book_alone_strategy: "ignore",
1623
+ book_sequence_strategy: "ignore",
1624
+ osis_compaction_strategy: "bc",
1625
+ captive_end_digits_strategy: "delete"
1626
+ });
1627
+ p.include_apocrypha(true);
1628
+ });
1629
+ it("should handle book: 2Pet (lu)", function() {
1630
+ expect(p.parse("2. Petero 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Petero 1:1'");
1631
+ expect(p.parse("2 Petero 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Petero 1:1'");
1632
+ expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pe 1:1'");
1633
+ expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pe 1:1'");
1634
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1635
+ p.include_apocrypha(false);
1636
+ expect(p.parse("2. PETERO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PETERO 1:1'");
1637
+ expect(p.parse("2 PETERO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PETERO 1:1'");
1638
+ expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PE 1:1'");
1639
+ expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PE 1:1'");
1640
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1641
+ });
1642
+ });
1643
+
1644
+ describe("Localized book 1Pet (lu)", function() {
1645
+ var p;
1646
+ p = {};
1647
+ beforeEach(function() {
1648
+ p = new bcv_parser();
1649
+ p.set_options({
1650
+ book_alone_strategy: "ignore",
1651
+ book_sequence_strategy: "ignore",
1652
+ osis_compaction_strategy: "bc",
1653
+ captive_end_digits_strategy: "delete"
1654
+ });
1655
+ p.include_apocrypha(true);
1656
+ });
1657
+ it("should handle book: 1Pet (lu)", function() {
1658
+ expect(p.parse("1. Petero 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Petero 1:1'");
1659
+ expect(p.parse("1 Petero 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Petero 1:1'");
1660
+ expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pe 1:1'");
1661
+ expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pe 1:1'");
1662
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1663
+ p.include_apocrypha(false);
1664
+ expect(p.parse("1. PETERO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PETERO 1:1'");
1665
+ expect(p.parse("1 PETERO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PETERO 1:1'");
1666
+ expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PE 1:1'");
1667
+ expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PE 1:1'");
1668
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1669
+ });
1670
+ });
1671
+
1672
+ describe("Localized book Jude (lu)", function() {
1673
+ var p;
1674
+ p = {};
1675
+ beforeEach(function() {
1676
+ p = new bcv_parser();
1677
+ p.set_options({
1678
+ book_alone_strategy: "ignore",
1679
+ book_sequence_strategy: "ignore",
1680
+ osis_compaction_strategy: "bc",
1681
+ captive_end_digits_strategy: "delete"
1682
+ });
1683
+ p.include_apocrypha(true);
1684
+ });
1685
+ it("should handle book: Jude (lu)", function() {
1686
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1687
+ expect(p.parse("Yuda 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yuda 1:1'");
1688
+ expect(p.parse("Yud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yud 1:1'");
1689
+ p.include_apocrypha(false);
1690
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1691
+ expect(p.parse("YUDA 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUDA 1:1'");
1692
+ expect(p.parse("YUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUD 1:1'");
1693
+ });
1694
+ });
1695
+
1696
+ describe("Miscellaneous tests", function() {
1697
+ var p;
1698
+ p = {};
1699
+ beforeEach(function() {
1700
+ p = new bcv_parser();
1701
+ p.set_options({
1702
+ book_alone_strategy: "ignore",
1703
+ book_sequence_strategy: "ignore",
1704
+ osis_compaction_strategy: "bc",
1705
+ captive_end_digits_strategy: "delete"
1706
+ });
1707
+ p.include_apocrypha(true);
1708
+ });
1709
+ it("should return the expected language", function() {
1710
+ expect(p.languages).toEqual(["lu"]);
1711
+ });
1712
+ it("should handle ranges (lu)", function() {
1713
+ expect(p.parse("Titus 1:1 ku 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 ku 2'");
1714
+ expect(p.parse("Matt 1ku2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1ku2'");
1715
+ expect(p.parse("Phlm 2 KU 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 KU 3'");
1716
+ });
1717
+ it("should handle chapters (lu)", function() {
1718
+ expect(p.parse("Titus 1:1, nshapita wa 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, nshapita wa 2'");
1719
+ expect(p.parse("Matt 3:4 NSHAPITA WA 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 NSHAPITA WA 6'");
1720
+ });
1721
+ it("should handle verses (lu)", function() {
1722
+ expect(p.parse("Exod 1:1 mvese wa 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 mvese wa 3'");
1723
+ expect(p.parse("Phlm MVESE WA 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm MVESE WA 6'");
1724
+ expect(p.parse("Exod 1:1 Lumpangu 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 Lumpangu 3'");
1725
+ expect(p.parse("Phlm LUMPANGU 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm LUMPANGU 6'");
1726
+ });
1727
+ it("should handle 'and' (lu)", function() {
1728
+ expect(p.parse("Exod 1:1 ne 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 ne 3'");
1729
+ expect(p.parse("Phlm 2 NE 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 NE 6'");
1730
+ });
1731
+ it("should handle titles (lu)", function() {
1732
+ expect(p.parse("Ps 3 tshiena bualu, 4:2, 5:tshiena bualu").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 tshiena bualu, 4:2, 5:tshiena bualu'");
1733
+ expect(p.parse("PS 3 TSHIENA BUALU, 4:2, 5:TSHIENA BUALU").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 TSHIENA BUALU, 4:2, 5:TSHIENA BUALU'");
1734
+ });
1735
+ it("should handle 'ff' (lu)", function() {
1736
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1737
+ 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'");
1738
+ });
1739
+ it("should handle translations (lu)", function() {
1740
+ expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1741
+ expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1742
+ });
1743
+ it("should handle book ranges (lu)", function() {
1744
+ p.set_options({
1745
+ book_alone_strategy: "full",
1746
+ book_range_strategy: "include"
1747
+ });
1748
+ expect(p.parse("1 ku 3 Yo").osis()).toEqual("1John.1-3John.1", "parsing: '1 ku 3 Yo'");
1749
+ });
1750
+ return it("should handle boundaries (lu)", function() {
1751
+ p.set_options({
1752
+ book_alone_strategy: "full"
1753
+ });
1754
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1755
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1756
+ });
1757
+ });
1758
+
1759
+ }).call(this);