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,1771 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/hl-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (hl)", 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 (hl)", 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 (hl)", function() {
82
+ expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Genesis 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("GENESIS 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GENESIS 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 (hl)", 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 (hl)", function() {
104
+ expect(p.parse("Exodo 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exodo 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("EXODO 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXODO 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 (hl)", 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 (hl)", function() {
128
+ expect(p.parse("Levitico 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Levitico 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("LEVITICO 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEVITICO 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 (hl)", 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 (hl)", function() {
150
+ expect(p.parse("Numeros 1:1").osis()).toEqual("Num.1.1", "parsing: 'Numeros 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("NUMEROS 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUMEROS 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 (hl)", 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 (hl)", function() {
172
+ expect(p.parse("Mga Panaghoy 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Mga Panaghoy 1:1'");
173
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
174
+ expect(p.parse("Pan 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Pan 1:1'");
175
+ p.include_apocrypha(false);
176
+ expect(p.parse("MGA PANAGHOY 1:1").osis()).toEqual("Lam.1.1", "parsing: 'MGA PANAGHOY 1:1'");
177
+ expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
178
+ expect(p.parse("PAN 1:1").osis()).toEqual("Lam.1.1", "parsing: 'PAN 1:1'");
179
+ });
180
+ });
181
+
182
+ describe("Localized book Rev (hl)", 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 (hl)", function() {
196
+ expect(p.parse("Pahayag 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Pahayag 1:1'");
197
+ expect(p.parse("Pah 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Pah 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("PAHAYAG 1:1").osis()).toEqual("Rev.1.1", "parsing: 'PAHAYAG 1:1'");
201
+ expect(p.parse("PAH 1:1").osis()).toEqual("Rev.1.1", "parsing: 'PAH 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 (hl)", 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 (hl)", function() {
220
+ expect(p.parse("Deuteronomio 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deuteronomio 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("DEUTERONOMIO 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUTERONOMIO 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 (hl)", 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 (hl)", function() {
244
+ expect(p.parse("Josue 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josue 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("JOSUE 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSUE 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 (hl)", 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 (hl)", function() {
268
+ expect(p.parse("Hukom 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Hukom 1:1'");
269
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
270
+ expect(p.parse("Huk 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Huk 1:1'");
271
+ p.include_apocrypha(false);
272
+ expect(p.parse("HUKOM 1:1").osis()).toEqual("Judg.1.1", "parsing: 'HUKOM 1:1'");
273
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
274
+ expect(p.parse("HUK 1:1").osis()).toEqual("Judg.1.1", "parsing: 'HUK 1:1'");
275
+ });
276
+ });
277
+
278
+ describe("Localized book Ruth (hl)", 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 (hl)", function() {
292
+ expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
293
+ expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Rut 1:1'");
294
+ p.include_apocrypha(false);
295
+ expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
296
+ expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUT 1:1'");
297
+ });
298
+ });
299
+
300
+ describe("Localized book Isa (hl)", function() {
301
+ var p;
302
+ p = {};
303
+ beforeEach(function() {
304
+ p = new bcv_parser();
305
+ p.set_options({
306
+ book_alone_strategy: "ignore",
307
+ book_sequence_strategy: "ignore",
308
+ osis_compaction_strategy: "bc",
309
+ captive_end_digits_strategy: "delete"
310
+ });
311
+ p.include_apocrypha(true);
312
+ });
313
+ it("should handle book: Isa (hl)", function() {
314
+ expect(p.parse("Isaias 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isaias 1:1'");
315
+ expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
316
+ p.include_apocrypha(false);
317
+ expect(p.parse("ISAIAS 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISAIAS 1:1'");
318
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
319
+ });
320
+ });
321
+
322
+ describe("Localized book 2Sam (hl)", function() {
323
+ var p;
324
+ p = {};
325
+ beforeEach(function() {
326
+ p = new bcv_parser();
327
+ p.set_options({
328
+ book_alone_strategy: "ignore",
329
+ book_sequence_strategy: "ignore",
330
+ osis_compaction_strategy: "bc",
331
+ captive_end_digits_strategy: "delete"
332
+ });
333
+ p.include_apocrypha(true);
334
+ });
335
+ it("should handle book: 2Sam (hl)", function() {
336
+ expect(p.parse("2. Samuel 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Samuel 1:1'");
337
+ expect(p.parse("2 Samuel 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Samuel 1:1'");
338
+ expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Sa 1:1'");
339
+ expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Sa 1:1'");
340
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
341
+ p.include_apocrypha(false);
342
+ expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SAMUEL 1:1'");
343
+ expect(p.parse("2 SAMUEL 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SAMUEL 1:1'");
344
+ expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SA 1:1'");
345
+ expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SA 1:1'");
346
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
347
+ });
348
+ });
349
+
350
+ describe("Localized book 1Sam (hl)", function() {
351
+ var p;
352
+ p = {};
353
+ beforeEach(function() {
354
+ p = new bcv_parser();
355
+ p.set_options({
356
+ book_alone_strategy: "ignore",
357
+ book_sequence_strategy: "ignore",
358
+ osis_compaction_strategy: "bc",
359
+ captive_end_digits_strategy: "delete"
360
+ });
361
+ p.include_apocrypha(true);
362
+ });
363
+ it("should handle book: 1Sam (hl)", function() {
364
+ expect(p.parse("una Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'una Samuel 1:1'");
365
+ expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Samuel 1:1'");
366
+ expect(p.parse("1 Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Samuel 1:1'");
367
+ expect(p.parse("una Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'una Sa 1:1'");
368
+ expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Sa 1:1'");
369
+ expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Sa 1:1'");
370
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
371
+ p.include_apocrypha(false);
372
+ expect(p.parse("UNA SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'UNA SAMUEL 1:1'");
373
+ expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAMUEL 1:1'");
374
+ expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAMUEL 1:1'");
375
+ expect(p.parse("UNA SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'UNA SA 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 (hl)", 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 (hl)", function() {
396
+ expect(p.parse("2. Mga Hari 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Mga Hari 1:1'");
397
+ expect(p.parse("2 Mga Hari 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Mga Hari 1:1'");
398
+ expect(p.parse("2. Ha 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Ha 1:1'");
399
+ expect(p.parse("2 Ha 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Ha 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. MGA HARI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. MGA HARI 1:1'");
403
+ expect(p.parse("2 MGA HARI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 MGA HARI 1:1'");
404
+ expect(p.parse("2. HA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. HA 1:1'");
405
+ expect(p.parse("2 HA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 HA 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 (hl)", 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 (hl)", function() {
424
+ expect(p.parse("una Mga Hari 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'una Mga Hari 1:1'");
425
+ expect(p.parse("1. Mga Hari 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Mga Hari 1:1'");
426
+ expect(p.parse("1 Mga Hari 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Mga Hari 1:1'");
427
+ expect(p.parse("una Ha 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'una Ha 1:1'");
428
+ expect(p.parse("1. Ha 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Ha 1:1'");
429
+ expect(p.parse("1 Ha 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Ha 1:1'");
430
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
431
+ p.include_apocrypha(false);
432
+ expect(p.parse("UNA MGA HARI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'UNA MGA HARI 1:1'");
433
+ expect(p.parse("1. MGA HARI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. MGA HARI 1:1'");
434
+ expect(p.parse("1 MGA HARI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 MGA HARI 1:1'");
435
+ expect(p.parse("UNA HA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'UNA HA 1:1'");
436
+ expect(p.parse("1. HA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. HA 1:1'");
437
+ expect(p.parse("1 HA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 HA 1:1'");
438
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
439
+ });
440
+ });
441
+
442
+ describe("Localized book 2Chr (hl)", function() {
443
+ var p;
444
+ p = {};
445
+ beforeEach(function() {
446
+ p = new bcv_parser();
447
+ p.set_options({
448
+ book_alone_strategy: "ignore",
449
+ book_sequence_strategy: "ignore",
450
+ osis_compaction_strategy: "bc",
451
+ captive_end_digits_strategy: "delete"
452
+ });
453
+ p.include_apocrypha(true);
454
+ });
455
+ it("should handle book: 2Chr (hl)", function() {
456
+ expect(p.parse("2. Mga Cronicas 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Mga Cronicas 1:1'");
457
+ expect(p.parse("2 Mga Cronicas 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Mga Cronicas 1:1'");
458
+ expect(p.parse("2. Cr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Cr 1:1'");
459
+ expect(p.parse("2 Cr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Cr 1:1'");
460
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
461
+ p.include_apocrypha(false);
462
+ expect(p.parse("2. MGA CRONICAS 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. MGA CRONICAS 1:1'");
463
+ expect(p.parse("2 MGA CRONICAS 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 MGA CRONICAS 1:1'");
464
+ expect(p.parse("2. CR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. CR 1:1'");
465
+ expect(p.parse("2 CR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 CR 1:1'");
466
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
467
+ });
468
+ });
469
+
470
+ describe("Localized book 1Chr (hl)", function() {
471
+ var p;
472
+ p = {};
473
+ beforeEach(function() {
474
+ p = new bcv_parser();
475
+ p.set_options({
476
+ book_alone_strategy: "ignore",
477
+ book_sequence_strategy: "ignore",
478
+ osis_compaction_strategy: "bc",
479
+ captive_end_digits_strategy: "delete"
480
+ });
481
+ p.include_apocrypha(true);
482
+ });
483
+ it("should handle book: 1Chr (hl)", function() {
484
+ expect(p.parse("una Mga Cronicas 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'una Mga Cronicas 1:1'");
485
+ expect(p.parse("1. Mga Cronicas 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Mga Cronicas 1:1'");
486
+ expect(p.parse("1 Mga Cronicas 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Mga Cronicas 1:1'");
487
+ expect(p.parse("una Cr 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'una Cr 1:1'");
488
+ expect(p.parse("1. Cr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Cr 1:1'");
489
+ expect(p.parse("1 Cr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Cr 1:1'");
490
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
491
+ p.include_apocrypha(false);
492
+ expect(p.parse("UNA MGA CRONICAS 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'UNA MGA CRONICAS 1:1'");
493
+ expect(p.parse("1. MGA CRONICAS 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. MGA CRONICAS 1:1'");
494
+ expect(p.parse("1 MGA CRONICAS 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 MGA CRONICAS 1:1'");
495
+ expect(p.parse("UNA CR 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'UNA CR 1:1'");
496
+ expect(p.parse("1. CR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. CR 1:1'");
497
+ expect(p.parse("1 CR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 CR 1:1'");
498
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
499
+ });
500
+ });
501
+
502
+ describe("Localized book Ezra (hl)", function() {
503
+ var p;
504
+ p = {};
505
+ beforeEach(function() {
506
+ p = new bcv_parser();
507
+ p.set_options({
508
+ book_alone_strategy: "ignore",
509
+ book_sequence_strategy: "ignore",
510
+ osis_compaction_strategy: "bc",
511
+ captive_end_digits_strategy: "delete"
512
+ });
513
+ p.include_apocrypha(true);
514
+ });
515
+ it("should handle book: Ezra (hl)", function() {
516
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
517
+ expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezr 1:1'");
518
+ p.include_apocrypha(false);
519
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
520
+ expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZR 1:1'");
521
+ });
522
+ });
523
+
524
+ describe("Localized book Neh (hl)", function() {
525
+ var p;
526
+ p = {};
527
+ beforeEach(function() {
528
+ p = new bcv_parser();
529
+ p.set_options({
530
+ book_alone_strategy: "ignore",
531
+ book_sequence_strategy: "ignore",
532
+ osis_compaction_strategy: "bc",
533
+ captive_end_digits_strategy: "delete"
534
+ });
535
+ p.include_apocrypha(true);
536
+ });
537
+ it("should handle book: Neh (hl)", function() {
538
+ expect(p.parse("Nehemias 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehemias 1:1'");
539
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
540
+ p.include_apocrypha(false);
541
+ expect(p.parse("NEHEMIAS 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEMIAS 1:1'");
542
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
543
+ });
544
+ });
545
+
546
+ describe("Localized book Esth (hl)", function() {
547
+ var p;
548
+ p = {};
549
+ beforeEach(function() {
550
+ p = new bcv_parser();
551
+ p.set_options({
552
+ book_alone_strategy: "ignore",
553
+ book_sequence_strategy: "ignore",
554
+ osis_compaction_strategy: "bc",
555
+ captive_end_digits_strategy: "delete"
556
+ });
557
+ p.include_apocrypha(true);
558
+ });
559
+ it("should handle book: Esth (hl)", function() {
560
+ expect(p.parse("Esther 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esther 1:1'");
561
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
562
+ expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Est 1:1'");
563
+ p.include_apocrypha(false);
564
+ expect(p.parse("ESTHER 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTHER 1:1'");
565
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
566
+ expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1", "parsing: 'EST 1:1'");
567
+ });
568
+ });
569
+
570
+ describe("Localized book Job (hl)", function() {
571
+ var p;
572
+ p = {};
573
+ beforeEach(function() {
574
+ p = new bcv_parser();
575
+ p.set_options({
576
+ book_alone_strategy: "ignore",
577
+ book_sequence_strategy: "ignore",
578
+ osis_compaction_strategy: "bc",
579
+ captive_end_digits_strategy: "delete"
580
+ });
581
+ p.include_apocrypha(true);
582
+ });
583
+ it("should handle book: Job (hl)", function() {
584
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
585
+ p.include_apocrypha(false);
586
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
587
+ });
588
+ });
589
+
590
+ describe("Localized book Ps (hl)", function() {
591
+ var p;
592
+ p = {};
593
+ beforeEach(function() {
594
+ p = new bcv_parser();
595
+ p.set_options({
596
+ book_alone_strategy: "ignore",
597
+ book_sequence_strategy: "ignore",
598
+ osis_compaction_strategy: "bc",
599
+ captive_end_digits_strategy: "delete"
600
+ });
601
+ p.include_apocrypha(true);
602
+ });
603
+ it("should handle book: Ps (hl)", function() {
604
+ expect(p.parse("Mga Salmo 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Mga Salmo 1:1'");
605
+ expect(p.parse("Sal 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Sal 1:1'");
606
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
607
+ p.include_apocrypha(false);
608
+ expect(p.parse("MGA SALMO 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MGA SALMO 1:1'");
609
+ expect(p.parse("SAL 1:1").osis()).toEqual("Ps.1.1", "parsing: 'SAL 1:1'");
610
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
611
+ });
612
+ });
613
+
614
+ describe("Localized book Prov (hl)", function() {
615
+ var p;
616
+ p = {};
617
+ beforeEach(function() {
618
+ p = new bcv_parser();
619
+ p.set_options({
620
+ book_alone_strategy: "ignore",
621
+ book_sequence_strategy: "ignore",
622
+ osis_compaction_strategy: "bc",
623
+ captive_end_digits_strategy: "delete"
624
+ });
625
+ p.include_apocrypha(true);
626
+ });
627
+ it("should handle book: Prov (hl)", function() {
628
+ expect(p.parse("Mga Proberbios 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Mga Proberbios 1:1'");
629
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
630
+ expect(p.parse("Pro 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Pro 1:1'");
631
+ p.include_apocrypha(false);
632
+ expect(p.parse("MGA PROBERBIOS 1:1").osis()).toEqual("Prov.1.1", "parsing: 'MGA PROBERBIOS 1:1'");
633
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
634
+ expect(p.parse("PRO 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PRO 1:1'");
635
+ });
636
+ });
637
+
638
+ describe("Localized book Eccl (hl)", function() {
639
+ var p;
640
+ p = {};
641
+ beforeEach(function() {
642
+ p = new bcv_parser();
643
+ p.set_options({
644
+ book_alone_strategy: "ignore",
645
+ book_sequence_strategy: "ignore",
646
+ osis_compaction_strategy: "bc",
647
+ captive_end_digits_strategy: "delete"
648
+ });
649
+ p.include_apocrypha(true);
650
+ });
651
+ it("should handle book: Eccl (hl)", function() {
652
+ expect(p.parse("Ecclesiastes 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Ecclesiastes 1:1'");
653
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
654
+ expect(p.parse("Ecc 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Ecc 1:1'");
655
+ p.include_apocrypha(false);
656
+ expect(p.parse("ECCLESIASTES 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCLESIASTES 1:1'");
657
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
658
+ expect(p.parse("ECC 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECC 1:1'");
659
+ });
660
+ });
661
+
662
+ describe("Localized book Song (hl)", function() {
663
+ var p;
664
+ p = {};
665
+ beforeEach(function() {
666
+ p = new bcv_parser();
667
+ p.set_options({
668
+ book_alone_strategy: "ignore",
669
+ book_sequence_strategy: "ignore",
670
+ osis_compaction_strategy: "bc",
671
+ captive_end_digits_strategy: "delete"
672
+ });
673
+ p.include_apocrypha(true);
674
+ });
675
+ it("should handle book: Song (hl)", function() {
676
+ expect(p.parse("Awit ni Solomon 1:1").osis()).toEqual("Song.1.1", "parsing: 'Awit ni Solomon 1:1'");
677
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
678
+ expect(p.parse("Awi 1:1").osis()).toEqual("Song.1.1", "parsing: 'Awi 1:1'");
679
+ p.include_apocrypha(false);
680
+ expect(p.parse("AWIT NI SOLOMON 1:1").osis()).toEqual("Song.1.1", "parsing: 'AWIT NI SOLOMON 1:1'");
681
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
682
+ expect(p.parse("AWI 1:1").osis()).toEqual("Song.1.1", "parsing: 'AWI 1:1'");
683
+ });
684
+ });
685
+
686
+ describe("Localized book Jer (hl)", 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: Jer (hl)", function() {
700
+ expect(p.parse("Jeremias 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jeremias 1:1'");
701
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
702
+ p.include_apocrypha(false);
703
+ expect(p.parse("JEREMIAS 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JEREMIAS 1:1'");
704
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
705
+ });
706
+ });
707
+
708
+ describe("Localized book Ezek (hl)", 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 (hl)", function() {
722
+ expect(p.parse("Ezekiel 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezekiel 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("EZEKIEL 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEKIEL 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 (hl)", 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 (hl)", function() {
746
+ expect(p.parse("Daniel 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Daniel 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("DANIEL 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DANIEL 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 (hl)", 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 (hl)", function() {
768
+ expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hosea 1:1'");
769
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
770
+ p.include_apocrypha(false);
771
+ expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOSEA 1:1'");
772
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
773
+ });
774
+ });
775
+
776
+ describe("Localized book Joel (hl)", function() {
777
+ var p;
778
+ p = {};
779
+ beforeEach(function() {
780
+ p = new bcv_parser();
781
+ p.set_options({
782
+ book_alone_strategy: "ignore",
783
+ book_sequence_strategy: "ignore",
784
+ osis_compaction_strategy: "bc",
785
+ captive_end_digits_strategy: "delete"
786
+ });
787
+ p.include_apocrypha(true);
788
+ });
789
+ it("should handle book: Joel (hl)", function() {
790
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
791
+ expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joe 1:1'");
792
+ p.include_apocrypha(false);
793
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
794
+ expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOE 1:1'");
795
+ });
796
+ });
797
+
798
+ describe("Localized book Amos (hl)", function() {
799
+ var p;
800
+ p = {};
801
+ beforeEach(function() {
802
+ p = new bcv_parser();
803
+ p.set_options({
804
+ book_alone_strategy: "ignore",
805
+ book_sequence_strategy: "ignore",
806
+ osis_compaction_strategy: "bc",
807
+ captive_end_digits_strategy: "delete"
808
+ });
809
+ p.include_apocrypha(true);
810
+ });
811
+ it("should handle book: Amos (hl)", function() {
812
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
813
+ expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amo 1:1'");
814
+ p.include_apocrypha(false);
815
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
816
+ expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMO 1:1'");
817
+ });
818
+ });
819
+
820
+ describe("Localized book Obad (hl)", function() {
821
+ var p;
822
+ p = {};
823
+ beforeEach(function() {
824
+ p = new bcv_parser();
825
+ p.set_options({
826
+ book_alone_strategy: "ignore",
827
+ book_sequence_strategy: "ignore",
828
+ osis_compaction_strategy: "bc",
829
+ captive_end_digits_strategy: "delete"
830
+ });
831
+ p.include_apocrypha(true);
832
+ });
833
+ it("should handle book: Obad (hl)", function() {
834
+ expect(p.parse("Obadias 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obadias 1:1'");
835
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
836
+ expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Oba 1:1'");
837
+ p.include_apocrypha(false);
838
+ expect(p.parse("OBADIAS 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBADIAS 1:1'");
839
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
840
+ expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBA 1:1'");
841
+ });
842
+ });
843
+
844
+ describe("Localized book Jonah (hl)", function() {
845
+ var p;
846
+ p = {};
847
+ beforeEach(function() {
848
+ p = new bcv_parser();
849
+ p.set_options({
850
+ book_alone_strategy: "ignore",
851
+ book_sequence_strategy: "ignore",
852
+ osis_compaction_strategy: "bc",
853
+ captive_end_digits_strategy: "delete"
854
+ });
855
+ p.include_apocrypha(true);
856
+ });
857
+ it("should handle book: Jonah (hl)", function() {
858
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
859
+ expect(p.parse("Jonas 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonas 1:1'");
860
+ expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jon 1:1'");
861
+ p.include_apocrypha(false);
862
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
863
+ expect(p.parse("JONAS 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAS 1:1'");
864
+ expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JON 1:1'");
865
+ });
866
+ });
867
+
868
+ describe("Localized book Mic (hl)", function() {
869
+ var p;
870
+ p = {};
871
+ beforeEach(function() {
872
+ p = new bcv_parser();
873
+ p.set_options({
874
+ book_alone_strategy: "ignore",
875
+ book_sequence_strategy: "ignore",
876
+ osis_compaction_strategy: "bc",
877
+ captive_end_digits_strategy: "delete"
878
+ });
879
+ p.include_apocrypha(true);
880
+ });
881
+ it("should handle book: Mic (hl)", function() {
882
+ expect(p.parse("Miqueas 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Miqueas 1:1'");
883
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
884
+ expect(p.parse("Mik 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mik 1:1'");
885
+ p.include_apocrypha(false);
886
+ expect(p.parse("MIQUEAS 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIQUEAS 1:1'");
887
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
888
+ expect(p.parse("MIK 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIK 1:1'");
889
+ });
890
+ });
891
+
892
+ describe("Localized book Nah (hl)", function() {
893
+ var p;
894
+ p = {};
895
+ beforeEach(function() {
896
+ p = new bcv_parser();
897
+ p.set_options({
898
+ book_alone_strategy: "ignore",
899
+ book_sequence_strategy: "ignore",
900
+ osis_compaction_strategy: "bc",
901
+ captive_end_digits_strategy: "delete"
902
+ });
903
+ p.include_apocrypha(true);
904
+ });
905
+ it("should handle book: Nah (hl)", function() {
906
+ expect(p.parse("Nahum 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nahum 1:1'");
907
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
908
+ p.include_apocrypha(false);
909
+ expect(p.parse("NAHUM 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAHUM 1:1'");
910
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
911
+ });
912
+ });
913
+
914
+ describe("Localized book Hab (hl)", function() {
915
+ var p;
916
+ p = {};
917
+ beforeEach(function() {
918
+ p = new bcv_parser();
919
+ p.set_options({
920
+ book_alone_strategy: "ignore",
921
+ book_sequence_strategy: "ignore",
922
+ osis_compaction_strategy: "bc",
923
+ captive_end_digits_strategy: "delete"
924
+ });
925
+ p.include_apocrypha(true);
926
+ });
927
+ it("should handle book: Hab (hl)", function() {
928
+ expect(p.parse("Habacuc 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Habacuc 1:1'");
929
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
930
+ p.include_apocrypha(false);
931
+ expect(p.parse("HABACUC 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HABACUC 1:1'");
932
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
933
+ });
934
+ });
935
+
936
+ describe("Localized book Zeph (hl)", function() {
937
+ var p;
938
+ p = {};
939
+ beforeEach(function() {
940
+ p = new bcv_parser();
941
+ p.set_options({
942
+ book_alone_strategy: "ignore",
943
+ book_sequence_strategy: "ignore",
944
+ osis_compaction_strategy: "bc",
945
+ captive_end_digits_strategy: "delete"
946
+ });
947
+ p.include_apocrypha(true);
948
+ });
949
+ it("should handle book: Zeph (hl)", function() {
950
+ expect(p.parse("Zefanias 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zefanias 1:1'");
951
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
952
+ expect(p.parse("Zef 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zef 1:1'");
953
+ p.include_apocrypha(false);
954
+ expect(p.parse("ZEFANIAS 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEFANIAS 1:1'");
955
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
956
+ expect(p.parse("ZEF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEF 1:1'");
957
+ });
958
+ });
959
+
960
+ describe("Localized book Hag (hl)", function() {
961
+ var p;
962
+ p = {};
963
+ beforeEach(function() {
964
+ p = new bcv_parser();
965
+ p.set_options({
966
+ book_alone_strategy: "ignore",
967
+ book_sequence_strategy: "ignore",
968
+ osis_compaction_strategy: "bc",
969
+ captive_end_digits_strategy: "delete"
970
+ });
971
+ p.include_apocrypha(true);
972
+ });
973
+ it("should handle book: Hag (hl)", function() {
974
+ expect(p.parse("Haggai 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Haggai 1:1'");
975
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
976
+ p.include_apocrypha(false);
977
+ expect(p.parse("HAGGAI 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAGGAI 1:1'");
978
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
979
+ });
980
+ });
981
+
982
+ describe("Localized book Zech (hl)", function() {
983
+ var p;
984
+ p = {};
985
+ beforeEach(function() {
986
+ p = new bcv_parser();
987
+ p.set_options({
988
+ book_alone_strategy: "ignore",
989
+ book_sequence_strategy: "ignore",
990
+ osis_compaction_strategy: "bc",
991
+ captive_end_digits_strategy: "delete"
992
+ });
993
+ p.include_apocrypha(true);
994
+ });
995
+ it("should handle book: Zech (hl)", function() {
996
+ expect(p.parse("Zacarias 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zacarias 1:1'");
997
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
998
+ expect(p.parse("Zac 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zac 1:1'");
999
+ p.include_apocrypha(false);
1000
+ expect(p.parse("ZACARIAS 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZACARIAS 1:1'");
1001
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1002
+ expect(p.parse("ZAC 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZAC 1:1'");
1003
+ });
1004
+ });
1005
+
1006
+ describe("Localized book Mal (hl)", function() {
1007
+ var p;
1008
+ p = {};
1009
+ beforeEach(function() {
1010
+ p = new bcv_parser();
1011
+ p.set_options({
1012
+ book_alone_strategy: "ignore",
1013
+ book_sequence_strategy: "ignore",
1014
+ osis_compaction_strategy: "bc",
1015
+ captive_end_digits_strategy: "delete"
1016
+ });
1017
+ p.include_apocrypha(true);
1018
+ });
1019
+ it("should handle book: Mal (hl)", function() {
1020
+ expect(p.parse("Malakias 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Malakias 1:1'");
1021
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1022
+ p.include_apocrypha(false);
1023
+ expect(p.parse("MALAKIAS 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MALAKIAS 1:1'");
1024
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1025
+ });
1026
+ });
1027
+
1028
+ describe("Localized book Matt (hl)", function() {
1029
+ var p;
1030
+ p = {};
1031
+ beforeEach(function() {
1032
+ p = new bcv_parser();
1033
+ p.set_options({
1034
+ book_alone_strategy: "ignore",
1035
+ book_sequence_strategy: "ignore",
1036
+ osis_compaction_strategy: "bc",
1037
+ captive_end_digits_strategy: "delete"
1038
+ });
1039
+ p.include_apocrypha(true);
1040
+ });
1041
+ it("should handle book: Matt (hl)", function() {
1042
+ expect(p.parse("Mateo 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mateo 1:1'");
1043
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1044
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1045
+ p.include_apocrypha(false);
1046
+ expect(p.parse("MATEO 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATEO 1:1'");
1047
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1048
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1049
+ });
1050
+ });
1051
+
1052
+ describe("Localized book Mark (hl)", 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: Mark (hl)", function() {
1066
+ expect(p.parse("Marcos 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Marcos 1:1'");
1067
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1068
+ expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mar 1:1'");
1069
+ p.include_apocrypha(false);
1070
+ expect(p.parse("MARCOS 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARCOS 1:1'");
1071
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1072
+ expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MAR 1:1'");
1073
+ });
1074
+ });
1075
+
1076
+ describe("Localized book Luke (hl)", function() {
1077
+ var p;
1078
+ p = {};
1079
+ beforeEach(function() {
1080
+ p = new bcv_parser();
1081
+ p.set_options({
1082
+ book_alone_strategy: "ignore",
1083
+ book_sequence_strategy: "ignore",
1084
+ osis_compaction_strategy: "bc",
1085
+ captive_end_digits_strategy: "delete"
1086
+ });
1087
+ p.include_apocrypha(true);
1088
+ });
1089
+ it("should handle book: Luke (hl)", function() {
1090
+ expect(p.parse("Lucas 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Lucas 1:1'");
1091
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1092
+ expect(p.parse("Luc 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luc 1:1'");
1093
+ p.include_apocrypha(false);
1094
+ expect(p.parse("LUCAS 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUCAS 1:1'");
1095
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1096
+ expect(p.parse("LUC 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUC 1:1'");
1097
+ });
1098
+ });
1099
+
1100
+ describe("Localized book 1John (hl)", function() {
1101
+ var p;
1102
+ p = {};
1103
+ beforeEach(function() {
1104
+ p = new bcv_parser();
1105
+ p.set_options({
1106
+ book_alone_strategy: "ignore",
1107
+ book_sequence_strategy: "ignore",
1108
+ osis_compaction_strategy: "bc",
1109
+ captive_end_digits_strategy: "delete"
1110
+ });
1111
+ p.include_apocrypha(true);
1112
+ });
1113
+ it("should handle book: 1John (hl)", function() {
1114
+ expect(p.parse("una Juan 1:1").osis()).toEqual("1John.1.1", "parsing: 'una Juan 1:1'");
1115
+ expect(p.parse("1. Juan 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Juan 1:1'");
1116
+ expect(p.parse("1 Juan 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Juan 1:1'");
1117
+ expect(p.parse("una Ju 1:1").osis()).toEqual("1John.1.1", "parsing: 'una Ju 1:1'");
1118
+ expect(p.parse("1. Ju 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Ju 1:1'");
1119
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1120
+ expect(p.parse("1 Ju 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Ju 1:1'");
1121
+ p.include_apocrypha(false);
1122
+ expect(p.parse("UNA JUAN 1:1").osis()).toEqual("1John.1.1", "parsing: 'UNA JUAN 1:1'");
1123
+ expect(p.parse("1. JUAN 1:1").osis()).toEqual("1John.1.1", "parsing: '1. JUAN 1:1'");
1124
+ expect(p.parse("1 JUAN 1:1").osis()).toEqual("1John.1.1", "parsing: '1 JUAN 1:1'");
1125
+ expect(p.parse("UNA JU 1:1").osis()).toEqual("1John.1.1", "parsing: 'UNA JU 1:1'");
1126
+ expect(p.parse("1. JU 1:1").osis()).toEqual("1John.1.1", "parsing: '1. JU 1:1'");
1127
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1128
+ expect(p.parse("1 JU 1:1").osis()).toEqual("1John.1.1", "parsing: '1 JU 1:1'");
1129
+ });
1130
+ });
1131
+
1132
+ describe("Localized book 2John (hl)", function() {
1133
+ var p;
1134
+ p = {};
1135
+ beforeEach(function() {
1136
+ p = new bcv_parser();
1137
+ p.set_options({
1138
+ book_alone_strategy: "ignore",
1139
+ book_sequence_strategy: "ignore",
1140
+ osis_compaction_strategy: "bc",
1141
+ captive_end_digits_strategy: "delete"
1142
+ });
1143
+ p.include_apocrypha(true);
1144
+ });
1145
+ it("should handle book: 2John (hl)", function() {
1146
+ expect(p.parse("2. Juan 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Juan 1:1'");
1147
+ expect(p.parse("2 Juan 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Juan 1:1'");
1148
+ expect(p.parse("2. Ju 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Ju 1:1'");
1149
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1150
+ expect(p.parse("2 Ju 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Ju 1:1'");
1151
+ p.include_apocrypha(false);
1152
+ expect(p.parse("2. JUAN 1:1").osis()).toEqual("2John.1.1", "parsing: '2. JUAN 1:1'");
1153
+ expect(p.parse("2 JUAN 1:1").osis()).toEqual("2John.1.1", "parsing: '2 JUAN 1:1'");
1154
+ expect(p.parse("2. JU 1:1").osis()).toEqual("2John.1.1", "parsing: '2. JU 1:1'");
1155
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1156
+ expect(p.parse("2 JU 1:1").osis()).toEqual("2John.1.1", "parsing: '2 JU 1:1'");
1157
+ });
1158
+ });
1159
+
1160
+ describe("Localized book 3John (hl)", function() {
1161
+ var p;
1162
+ p = {};
1163
+ beforeEach(function() {
1164
+ p = new bcv_parser();
1165
+ p.set_options({
1166
+ book_alone_strategy: "ignore",
1167
+ book_sequence_strategy: "ignore",
1168
+ osis_compaction_strategy: "bc",
1169
+ captive_end_digits_strategy: "delete"
1170
+ });
1171
+ p.include_apocrypha(true);
1172
+ });
1173
+ it("should handle book: 3John (hl)", function() {
1174
+ expect(p.parse("3. Juan 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Juan 1:1'");
1175
+ expect(p.parse("3 Juan 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Juan 1:1'");
1176
+ expect(p.parse("3. Ju 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Ju 1:1'");
1177
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1178
+ expect(p.parse("3 Ju 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Ju 1:1'");
1179
+ p.include_apocrypha(false);
1180
+ expect(p.parse("3. JUAN 1:1").osis()).toEqual("3John.1.1", "parsing: '3. JUAN 1:1'");
1181
+ expect(p.parse("3 JUAN 1:1").osis()).toEqual("3John.1.1", "parsing: '3 JUAN 1:1'");
1182
+ expect(p.parse("3. JU 1:1").osis()).toEqual("3John.1.1", "parsing: '3. JU 1:1'");
1183
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1184
+ expect(p.parse("3 JU 1:1").osis()).toEqual("3John.1.1", "parsing: '3 JU 1:1'");
1185
+ });
1186
+ });
1187
+
1188
+ describe("Localized book John (hl)", function() {
1189
+ var p;
1190
+ p = {};
1191
+ beforeEach(function() {
1192
+ p = new bcv_parser();
1193
+ p.set_options({
1194
+ book_alone_strategy: "ignore",
1195
+ book_sequence_strategy: "ignore",
1196
+ osis_compaction_strategy: "bc",
1197
+ captive_end_digits_strategy: "delete"
1198
+ });
1199
+ p.include_apocrypha(true);
1200
+ });
1201
+ it("should handle book: John (hl)", function() {
1202
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1203
+ expect(p.parse("Juan 1:1").osis()).toEqual("John.1.1", "parsing: 'Juan 1:1'");
1204
+ expect(p.parse("Jua 1:1").osis()).toEqual("John.1.1", "parsing: 'Jua 1:1'");
1205
+ p.include_apocrypha(false);
1206
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1207
+ expect(p.parse("JUAN 1:1").osis()).toEqual("John.1.1", "parsing: 'JUAN 1:1'");
1208
+ expect(p.parse("JUA 1:1").osis()).toEqual("John.1.1", "parsing: 'JUA 1:1'");
1209
+ });
1210
+ });
1211
+
1212
+ describe("Localized book Acts (hl)", function() {
1213
+ var p;
1214
+ p = {};
1215
+ beforeEach(function() {
1216
+ p = new bcv_parser();
1217
+ p.set_options({
1218
+ book_alone_strategy: "ignore",
1219
+ book_sequence_strategy: "ignore",
1220
+ osis_compaction_strategy: "bc",
1221
+ captive_end_digits_strategy: "delete"
1222
+ });
1223
+ p.include_apocrypha(true);
1224
+ });
1225
+ it("should handle book: Acts (hl)", function() {
1226
+ expect(p.parse("Mga Buhat 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Mga Buhat 1:1'");
1227
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1228
+ expect(p.parse("Mga 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Mga 1:1'");
1229
+ p.include_apocrypha(false);
1230
+ expect(p.parse("MGA BUHAT 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MGA BUHAT 1:1'");
1231
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1232
+ expect(p.parse("MGA 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MGA 1:1'");
1233
+ });
1234
+ });
1235
+
1236
+ describe("Localized book Rom (hl)", function() {
1237
+ var p;
1238
+ p = {};
1239
+ beforeEach(function() {
1240
+ p = new bcv_parser();
1241
+ p.set_options({
1242
+ book_alone_strategy: "ignore",
1243
+ book_sequence_strategy: "ignore",
1244
+ osis_compaction_strategy: "bc",
1245
+ captive_end_digits_strategy: "delete"
1246
+ });
1247
+ p.include_apocrypha(true);
1248
+ });
1249
+ it("should handle book: Rom (hl)", function() {
1250
+ expect(p.parse("Mga Taga-Roma 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Mga Taga-Roma 1:1'");
1251
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1252
+ p.include_apocrypha(false);
1253
+ expect(p.parse("MGA TAGA-ROMA 1:1").osis()).toEqual("Rom.1.1", "parsing: 'MGA TAGA-ROMA 1:1'");
1254
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1255
+ });
1256
+ });
1257
+
1258
+ describe("Localized book 2Cor (hl)", function() {
1259
+ var p;
1260
+ p = {};
1261
+ beforeEach(function() {
1262
+ p = new bcv_parser();
1263
+ p.set_options({
1264
+ book_alone_strategy: "ignore",
1265
+ book_sequence_strategy: "ignore",
1266
+ osis_compaction_strategy: "bc",
1267
+ captive_end_digits_strategy: "delete"
1268
+ });
1269
+ p.include_apocrypha(true);
1270
+ });
1271
+ it("should handle book: 2Cor (hl)", function() {
1272
+ expect(p.parse("2. Mga Taga-Corinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Mga Taga-Corinto 1:1'");
1273
+ expect(p.parse("2 Mga Taga-Corinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Mga Taga-Corinto 1:1'");
1274
+ expect(p.parse("2. Co 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Co 1:1'");
1275
+ expect(p.parse("2 Co 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Co 1:1'");
1276
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1277
+ p.include_apocrypha(false);
1278
+ expect(p.parse("2. MGA TAGA-CORINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. MGA TAGA-CORINTO 1:1'");
1279
+ expect(p.parse("2 MGA TAGA-CORINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 MGA TAGA-CORINTO 1:1'");
1280
+ expect(p.parse("2. CO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. CO 1:1'");
1281
+ expect(p.parse("2 CO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 CO 1:1'");
1282
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1283
+ });
1284
+ });
1285
+
1286
+ describe("Localized book 1Cor (hl)", function() {
1287
+ var p;
1288
+ p = {};
1289
+ beforeEach(function() {
1290
+ p = new bcv_parser();
1291
+ p.set_options({
1292
+ book_alone_strategy: "ignore",
1293
+ book_sequence_strategy: "ignore",
1294
+ osis_compaction_strategy: "bc",
1295
+ captive_end_digits_strategy: "delete"
1296
+ });
1297
+ p.include_apocrypha(true);
1298
+ });
1299
+ it("should handle book: 1Cor (hl)", function() {
1300
+ expect(p.parse("una Mga Taga-Corinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'una Mga Taga-Corinto 1:1'");
1301
+ expect(p.parse("1. Mga Taga-Corinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Mga Taga-Corinto 1:1'");
1302
+ expect(p.parse("1 Mga Taga-Corinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Mga Taga-Corinto 1:1'");
1303
+ expect(p.parse("una Co 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'una Co 1:1'");
1304
+ expect(p.parse("1. Co 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Co 1:1'");
1305
+ expect(p.parse("1 Co 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Co 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("UNA MGA TAGA-CORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'UNA MGA TAGA-CORINTO 1:1'");
1309
+ expect(p.parse("1. MGA TAGA-CORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. MGA TAGA-CORINTO 1:1'");
1310
+ expect(p.parse("1 MGA TAGA-CORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 MGA TAGA-CORINTO 1:1'");
1311
+ expect(p.parse("UNA CO 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'UNA CO 1:1'");
1312
+ expect(p.parse("1. CO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. CO 1:1'");
1313
+ expect(p.parse("1 CO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 CO 1:1'");
1314
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1315
+ });
1316
+ });
1317
+
1318
+ describe("Localized book Gal (hl)", function() {
1319
+ var p;
1320
+ p = {};
1321
+ beforeEach(function() {
1322
+ p = new bcv_parser();
1323
+ p.set_options({
1324
+ book_alone_strategy: "ignore",
1325
+ book_sequence_strategy: "ignore",
1326
+ osis_compaction_strategy: "bc",
1327
+ captive_end_digits_strategy: "delete"
1328
+ });
1329
+ p.include_apocrypha(true);
1330
+ });
1331
+ it("should handle book: Gal (hl)", function() {
1332
+ expect(p.parse("Mga Taga-Galacia 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Mga Taga-Galacia 1:1'");
1333
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1334
+ p.include_apocrypha(false);
1335
+ expect(p.parse("MGA TAGA-GALACIA 1:1").osis()).toEqual("Gal.1.1", "parsing: 'MGA TAGA-GALACIA 1:1'");
1336
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1337
+ });
1338
+ });
1339
+
1340
+ describe("Localized book Eph (hl)", function() {
1341
+ var p;
1342
+ p = {};
1343
+ beforeEach(function() {
1344
+ p = new bcv_parser();
1345
+ p.set_options({
1346
+ book_alone_strategy: "ignore",
1347
+ book_sequence_strategy: "ignore",
1348
+ osis_compaction_strategy: "bc",
1349
+ captive_end_digits_strategy: "delete"
1350
+ });
1351
+ p.include_apocrypha(true);
1352
+ });
1353
+ it("should handle book: Eph (hl)", function() {
1354
+ expect(p.parse("Mga Taga-Efeso 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Mga Taga-Efeso 1:1'");
1355
+ expect(p.parse("Efe 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efe 1:1'");
1356
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1357
+ p.include_apocrypha(false);
1358
+ expect(p.parse("MGA TAGA-EFESO 1:1").osis()).toEqual("Eph.1.1", "parsing: 'MGA TAGA-EFESO 1:1'");
1359
+ expect(p.parse("EFE 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFE 1:1'");
1360
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1361
+ });
1362
+ });
1363
+
1364
+ describe("Localized book Phil (hl)", function() {
1365
+ var p;
1366
+ p = {};
1367
+ beforeEach(function() {
1368
+ p = new bcv_parser();
1369
+ p.set_options({
1370
+ book_alone_strategy: "ignore",
1371
+ book_sequence_strategy: "ignore",
1372
+ osis_compaction_strategy: "bc",
1373
+ captive_end_digits_strategy: "delete"
1374
+ });
1375
+ p.include_apocrypha(true);
1376
+ });
1377
+ it("should handle book: Phil (hl)", function() {
1378
+ expect(p.parse("Mga Taga-Filipos 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Mga Taga-Filipos 1:1'");
1379
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1380
+ expect(p.parse("Fil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Fil 1:1'");
1381
+ p.include_apocrypha(false);
1382
+ expect(p.parse("MGA TAGA-FILIPOS 1:1").osis()).toEqual("Phil.1.1", "parsing: 'MGA TAGA-FILIPOS 1:1'");
1383
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1384
+ expect(p.parse("FIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FIL 1:1'");
1385
+ });
1386
+ });
1387
+
1388
+ describe("Localized book Col (hl)", function() {
1389
+ var p;
1390
+ p = {};
1391
+ beforeEach(function() {
1392
+ p = new bcv_parser();
1393
+ p.set_options({
1394
+ book_alone_strategy: "ignore",
1395
+ book_sequence_strategy: "ignore",
1396
+ osis_compaction_strategy: "bc",
1397
+ captive_end_digits_strategy: "delete"
1398
+ });
1399
+ p.include_apocrypha(true);
1400
+ });
1401
+ it("should handle book: Col (hl)", function() {
1402
+ expect(p.parse("Mga Taga-Colosas 1:1").osis()).toEqual("Col.1.1", "parsing: 'Mga Taga-Colosas 1:1'");
1403
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1404
+ p.include_apocrypha(false);
1405
+ expect(p.parse("MGA TAGA-COLOSAS 1:1").osis()).toEqual("Col.1.1", "parsing: 'MGA TAGA-COLOSAS 1:1'");
1406
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1407
+ });
1408
+ });
1409
+
1410
+ describe("Localized book 2Thess (hl)", 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 (hl)", function() {
1424
+ expect(p.parse("2. Mga Taga-Tesalonica 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Mga Taga-Tesalonica 1:1'");
1425
+ expect(p.parse("2 Mga Taga-Tesalonica 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Mga Taga-Tesalonica 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. MGA TAGA-TESALONICA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. MGA TAGA-TESALONICA 1:1'");
1431
+ expect(p.parse("2 MGA TAGA-TESALONICA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 MGA TAGA-TESALONICA 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 (hl)", 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 (hl)", function() {
1452
+ expect(p.parse("una Mga Taga-Tesalonica 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'una Mga Taga-Tesalonica 1:1'");
1453
+ expect(p.parse("1. Mga Taga-Tesalonica 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Mga Taga-Tesalonica 1:1'");
1454
+ expect(p.parse("1 Mga Taga-Tesalonica 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Mga Taga-Tesalonica 1:1'");
1455
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1456
+ expect(p.parse("una Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'una Te 1:1'");
1457
+ expect(p.parse("1. Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Te 1:1'");
1458
+ expect(p.parse("1 Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Te 1:1'");
1459
+ p.include_apocrypha(false);
1460
+ expect(p.parse("UNA MGA TAGA-TESALONICA 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'UNA MGA TAGA-TESALONICA 1:1'");
1461
+ expect(p.parse("1. MGA TAGA-TESALONICA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. MGA TAGA-TESALONICA 1:1'");
1462
+ expect(p.parse("1 MGA TAGA-TESALONICA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 MGA TAGA-TESALONICA 1:1'");
1463
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1464
+ expect(p.parse("UNA TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'UNA TE 1:1'");
1465
+ expect(p.parse("1. TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TE 1:1'");
1466
+ expect(p.parse("1 TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TE 1:1'");
1467
+ });
1468
+ });
1469
+
1470
+ describe("Localized book 2Tim (hl)", function() {
1471
+ var p;
1472
+ p = {};
1473
+ beforeEach(function() {
1474
+ p = new bcv_parser();
1475
+ p.set_options({
1476
+ book_alone_strategy: "ignore",
1477
+ book_sequence_strategy: "ignore",
1478
+ osis_compaction_strategy: "bc",
1479
+ captive_end_digits_strategy: "delete"
1480
+ });
1481
+ p.include_apocrypha(true);
1482
+ });
1483
+ it("should handle book: 2Tim (hl)", function() {
1484
+ expect(p.parse("2. Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Timoteo 1:1'");
1485
+ expect(p.parse("2 Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Timoteo 1:1'");
1486
+ expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Ti 1:1'");
1487
+ expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Ti 1:1'");
1488
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1489
+ p.include_apocrypha(false);
1490
+ expect(p.parse("2. TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIMOTEO 1:1'");
1491
+ expect(p.parse("2 TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIMOTEO 1:1'");
1492
+ expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TI 1:1'");
1493
+ expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TI 1:1'");
1494
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1495
+ });
1496
+ });
1497
+
1498
+ describe("Localized book 1Tim (hl)", function() {
1499
+ var p;
1500
+ p = {};
1501
+ beforeEach(function() {
1502
+ p = new bcv_parser();
1503
+ p.set_options({
1504
+ book_alone_strategy: "ignore",
1505
+ book_sequence_strategy: "ignore",
1506
+ osis_compaction_strategy: "bc",
1507
+ captive_end_digits_strategy: "delete"
1508
+ });
1509
+ p.include_apocrypha(true);
1510
+ });
1511
+ it("should handle book: 1Tim (hl)", function() {
1512
+ expect(p.parse("una Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'una Timoteo 1:1'");
1513
+ expect(p.parse("1. Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Timoteo 1:1'");
1514
+ expect(p.parse("1 Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Timoteo 1:1'");
1515
+ expect(p.parse("una Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'una Ti 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
+ p.include_apocrypha(false);
1520
+ expect(p.parse("UNA TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'UNA TIMOTEO 1:1'");
1521
+ expect(p.parse("1. TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIMOTEO 1:1'");
1522
+ expect(p.parse("1 TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIMOTEO 1:1'");
1523
+ expect(p.parse("UNA TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'UNA TI 1:1'");
1524
+ expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TI 1:1'");
1525
+ expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TI 1:1'");
1526
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1527
+ });
1528
+ });
1529
+
1530
+ describe("Localized book Titus (hl)", function() {
1531
+ var p;
1532
+ p = {};
1533
+ beforeEach(function() {
1534
+ p = new bcv_parser();
1535
+ p.set_options({
1536
+ book_alone_strategy: "ignore",
1537
+ book_sequence_strategy: "ignore",
1538
+ osis_compaction_strategy: "bc",
1539
+ captive_end_digits_strategy: "delete"
1540
+ });
1541
+ p.include_apocrypha(true);
1542
+ });
1543
+ it("should handle book: Titus (hl)", function() {
1544
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1545
+ expect(p.parse("Tito 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tito 1:1'");
1546
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1547
+ p.include_apocrypha(false);
1548
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1549
+ expect(p.parse("TITO 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITO 1:1'");
1550
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1551
+ });
1552
+ });
1553
+
1554
+ describe("Localized book Phlm (hl)", function() {
1555
+ var p;
1556
+ p = {};
1557
+ beforeEach(function() {
1558
+ p = new bcv_parser();
1559
+ p.set_options({
1560
+ book_alone_strategy: "ignore",
1561
+ book_sequence_strategy: "ignore",
1562
+ osis_compaction_strategy: "bc",
1563
+ captive_end_digits_strategy: "delete"
1564
+ });
1565
+ p.include_apocrypha(true);
1566
+ });
1567
+ it("should handle book: Phlm (hl)", function() {
1568
+ expect(p.parse("Filemon 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Filemon 1:1'");
1569
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1570
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1571
+ p.include_apocrypha(false);
1572
+ expect(p.parse("FILEMON 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FILEMON 1:1'");
1573
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1574
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1575
+ });
1576
+ });
1577
+
1578
+ describe("Localized book Heb (hl)", function() {
1579
+ var p;
1580
+ p = {};
1581
+ beforeEach(function() {
1582
+ p = new bcv_parser();
1583
+ p.set_options({
1584
+ book_alone_strategy: "ignore",
1585
+ book_sequence_strategy: "ignore",
1586
+ osis_compaction_strategy: "bc",
1587
+ captive_end_digits_strategy: "delete"
1588
+ });
1589
+ p.include_apocrypha(true);
1590
+ });
1591
+ it("should handle book: Heb (hl)", function() {
1592
+ expect(p.parse("Mga Hebreyo 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Mga Hebreyo 1:1'");
1593
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1594
+ p.include_apocrypha(false);
1595
+ expect(p.parse("MGA HEBREYO 1:1").osis()).toEqual("Heb.1.1", "parsing: 'MGA HEBREYO 1:1'");
1596
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1597
+ });
1598
+ });
1599
+
1600
+ describe("Localized book Jas (hl)", function() {
1601
+ var p;
1602
+ p = {};
1603
+ beforeEach(function() {
1604
+ p = new bcv_parser();
1605
+ p.set_options({
1606
+ book_alone_strategy: "ignore",
1607
+ book_sequence_strategy: "ignore",
1608
+ osis_compaction_strategy: "bc",
1609
+ captive_end_digits_strategy: "delete"
1610
+ });
1611
+ p.include_apocrypha(true);
1612
+ });
1613
+ it("should handle book: Jas (hl)", function() {
1614
+ expect(p.parse("Santiago 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Santiago 1:1'");
1615
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1616
+ expect(p.parse("San 1:1").osis()).toEqual("Jas.1.1", "parsing: 'San 1:1'");
1617
+ p.include_apocrypha(false);
1618
+ expect(p.parse("SANTIAGO 1:1").osis()).toEqual("Jas.1.1", "parsing: 'SANTIAGO 1:1'");
1619
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1620
+ expect(p.parse("SAN 1:1").osis()).toEqual("Jas.1.1", "parsing: 'SAN 1:1'");
1621
+ });
1622
+ });
1623
+
1624
+ describe("Localized book 2Pet (hl)", function() {
1625
+ var p;
1626
+ p = {};
1627
+ beforeEach(function() {
1628
+ p = new bcv_parser();
1629
+ p.set_options({
1630
+ book_alone_strategy: "ignore",
1631
+ book_sequence_strategy: "ignore",
1632
+ osis_compaction_strategy: "bc",
1633
+ captive_end_digits_strategy: "delete"
1634
+ });
1635
+ p.include_apocrypha(true);
1636
+ });
1637
+ it("should handle book: 2Pet (hl)", function() {
1638
+ expect(p.parse("2. Pedro 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pedro 1:1'");
1639
+ expect(p.parse("2 Pedro 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pedro 1:1'");
1640
+ expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pe 1:1'");
1641
+ expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pe 1:1'");
1642
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1643
+ p.include_apocrypha(false);
1644
+ expect(p.parse("2. PEDRO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PEDRO 1:1'");
1645
+ expect(p.parse("2 PEDRO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PEDRO 1:1'");
1646
+ expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PE 1:1'");
1647
+ expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PE 1:1'");
1648
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1649
+ });
1650
+ });
1651
+
1652
+ describe("Localized book 1Pet (hl)", function() {
1653
+ var p;
1654
+ p = {};
1655
+ beforeEach(function() {
1656
+ p = new bcv_parser();
1657
+ p.set_options({
1658
+ book_alone_strategy: "ignore",
1659
+ book_sequence_strategy: "ignore",
1660
+ osis_compaction_strategy: "bc",
1661
+ captive_end_digits_strategy: "delete"
1662
+ });
1663
+ p.include_apocrypha(true);
1664
+ });
1665
+ it("should handle book: 1Pet (hl)", function() {
1666
+ expect(p.parse("una Pedro 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'una Pedro 1:1'");
1667
+ expect(p.parse("1. Pedro 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pedro 1:1'");
1668
+ expect(p.parse("1 Pedro 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pedro 1:1'");
1669
+ expect(p.parse("una Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'una Pe 1:1'");
1670
+ expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pe 1:1'");
1671
+ expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pe 1:1'");
1672
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1673
+ p.include_apocrypha(false);
1674
+ expect(p.parse("UNA PEDRO 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'UNA PEDRO 1:1'");
1675
+ expect(p.parse("1. PEDRO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PEDRO 1:1'");
1676
+ expect(p.parse("1 PEDRO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PEDRO 1:1'");
1677
+ expect(p.parse("UNA PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'UNA PE 1:1'");
1678
+ expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PE 1:1'");
1679
+ expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PE 1:1'");
1680
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1681
+ });
1682
+ });
1683
+
1684
+ describe("Localized book Jude (hl)", function() {
1685
+ var p;
1686
+ p = {};
1687
+ beforeEach(function() {
1688
+ p = new bcv_parser();
1689
+ p.set_options({
1690
+ book_alone_strategy: "ignore",
1691
+ book_sequence_strategy: "ignore",
1692
+ osis_compaction_strategy: "bc",
1693
+ captive_end_digits_strategy: "delete"
1694
+ });
1695
+ p.include_apocrypha(true);
1696
+ });
1697
+ it("should handle book: Jude (hl)", function() {
1698
+ expect(p.parse("Judas 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Judas 1:1'");
1699
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1700
+ expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jud 1:1'");
1701
+ p.include_apocrypha(false);
1702
+ expect(p.parse("JUDAS 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDAS 1:1'");
1703
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1704
+ expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUD 1:1'");
1705
+ });
1706
+ });
1707
+
1708
+ describe("Miscellaneous tests", function() {
1709
+ var p;
1710
+ p = {};
1711
+ beforeEach(function() {
1712
+ p = new bcv_parser();
1713
+ p.set_options({
1714
+ book_alone_strategy: "ignore",
1715
+ book_sequence_strategy: "ignore",
1716
+ osis_compaction_strategy: "bc",
1717
+ captive_end_digits_strategy: "delete"
1718
+ });
1719
+ p.include_apocrypha(true);
1720
+ });
1721
+ it("should return the expected language", function() {
1722
+ expect(p.languages).toEqual(["hl"]);
1723
+ });
1724
+ it("should handle ranges (hl)", function() {
1725
+ expect(p.parse("Titus 1:1 mag 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 mag 2'");
1726
+ expect(p.parse("Matt 1mag2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1mag2'");
1727
+ expect(p.parse("Phlm 2 MAG 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 MAG 3'");
1728
+ });
1729
+ it("should handle chapters (hl)", function() {
1730
+ expect(p.parse("Titus 1:1, kapitulo 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, kapitulo 2'");
1731
+ expect(p.parse("Matt 3:4 KAPITULO 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 KAPITULO 6'");
1732
+ });
1733
+ it("should handle verses (hl)", function() {
1734
+ expect(p.parse("Exod 1:1 vers�culo 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 vers�culo 3'");
1735
+ expect(p.parse("Phlm VERS�CULO 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm VERS�CULO 6'");
1736
+ expect(p.parse("Exod 1:1 bersikulo 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 bersikulo 3'");
1737
+ expect(p.parse("Phlm BERSIKULO 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm BERSIKULO 6'");
1738
+ });
1739
+ it("should handle 'and' (hl)", function() {
1740
+ expect(p.parse("Exod 1:1 kag 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 kag 3'");
1741
+ expect(p.parse("Phlm 2 KAG 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 KAG 6'");
1742
+ });
1743
+ it("should handle titles (hl)", function() {
1744
+ expect(p.parse("Ps 3 titulo, 4:2, 5:titulo").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 titulo, 4:2, 5:titulo'");
1745
+ expect(p.parse("PS 3 TITULO, 4:2, 5:TITULO").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 TITULO, 4:2, 5:TITULO'");
1746
+ });
1747
+ it("should handle 'ff' (hl)", function() {
1748
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1749
+ 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'");
1750
+ });
1751
+ it("should handle translations (hl)", function() {
1752
+ expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1753
+ expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1754
+ });
1755
+ it("should handle book ranges (hl)", function() {
1756
+ p.set_options({
1757
+ book_alone_strategy: "full",
1758
+ book_range_strategy: "include"
1759
+ });
1760
+ expect(p.parse("1 mag 3 Ju").osis()).toEqual("1John.1-3John.1", "parsing: '1 mag 3 Ju'");
1761
+ });
1762
+ return it("should handle boundaries (hl)", function() {
1763
+ p.set_options({
1764
+ book_alone_strategy: "full"
1765
+ });
1766
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1767
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1768
+ });
1769
+ });
1770
+
1771
+ }).call(this);