bible-ref-parse 3.0.13 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/am-bcv-parser.js +7218 -0
  2. package/dist/am-bcv-parser.min.js +1 -0
  3. package/dist/bb-bcv-parser.js +7247 -0
  4. package/dist/bb-bcv-parser.min.js +1 -0
  5. package/dist/bn-bcv-parser.js +7229 -0
  6. package/dist/bn-bcv-parser.min.js +1 -0
  7. package/dist/ee-bcv-parser.js +7127 -0
  8. package/dist/ee-bcv-parser.min.js +1 -0
  9. package/dist/hl-bcv-parser.js +7127 -0
  10. package/dist/hl-bcv-parser.min.js +1 -0
  11. package/dist/id-bcv-parser.js +7116 -0
  12. package/dist/id-bcv-parser.min.js +1 -0
  13. package/dist/il-bcv-parser.js +1 -1
  14. package/dist/il-bcv-parser.min.js +1 -1
  15. package/dist/lu-bcv-parser.js +7203 -0
  16. package/dist/lu-bcv-parser.min.js +1 -0
  17. package/dist/mg-bcv-parser.js +7116 -0
  18. package/dist/mg-bcv-parser.min.js +1 -0
  19. package/dist/mq-bcv-parser.js +7114 -0
  20. package/dist/mq-bcv-parser.min.js +1 -0
  21. package/dist/nd-bcv-parser.js +7116 -0
  22. package/dist/nd-bcv-parser.min.js +1 -0
  23. package/dist/ny-bcv-parser.js +7125 -0
  24. package/dist/ny-bcv-parser.min.js +1 -0
  25. package/dist/si-bcv-parser.js +7171 -0
  26. package/dist/si-bcv-parser.min.js +1 -0
  27. package/dist/test/am.spec.js +1939 -0
  28. package/dist/test/bb.spec.js +2083 -0
  29. package/dist/test/bn.spec.js +2340 -0
  30. package/dist/test/ee.spec.js +1781 -0
  31. package/dist/test/hl.spec.js +1771 -0
  32. package/dist/test/id.spec.js +1757 -0
  33. package/dist/test/il.spec.js +4 -4
  34. package/dist/test/lu.spec.js +1759 -0
  35. package/dist/test/mg.spec.js +1783 -0
  36. package/dist/test/mq.spec.js +1745 -0
  37. package/dist/test/nd.spec.js +1781 -0
  38. package/dist/test/ny.spec.js +1791 -0
  39. package/dist/test/si.spec.js +1797 -0
  40. package/dist/test/zu.spec.js +2075 -0
  41. package/dist/zu-bcv-parser.js +7236 -0
  42. package/dist/zu-bcv-parser.min.js +1 -0
  43. package/package.json +1 -1
@@ -0,0 +1,1745 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/mq-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (mq)", 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 (mq)", 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 (mq)", 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 (mq)", 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 (mq)", function() {
104
+ expect(p.parse("�xodo 1:1").osis()).toEqual("Exod.1.1", "parsing: '�xodo 1:1'");
105
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
106
+ expect(p.parse("�xo 1:1").osis()).toEqual("Exod.1.1", "parsing: '�xo 1:1'");
107
+ p.include_apocrypha(false);
108
+ expect(p.parse("�XODO 1:1").osis()).toEqual("Exod.1.1", "parsing: '�XODO 1:1'");
109
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
110
+ expect(p.parse("�XO 1:1").osis()).toEqual("Exod.1.1", "parsing: '�XO 1:1'");
111
+ });
112
+ });
113
+
114
+ describe("Localized book Lev (mq)", 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 (mq)", function() {
128
+ expect(p.parse("Lev�tico 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lev�tico 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("LEV�TICO 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEV�TICO 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 (mq)", 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 (mq)", function() {
150
+ expect(p.parse("N�meros 1:1").osis()).toEqual("Num.1.1", "parsing: 'N�meros 1:1'");
151
+ expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
152
+ expect(p.parse("N�m 1:1").osis()).toEqual("Num.1.1", "parsing: 'N�m 1:1'");
153
+ p.include_apocrypha(false);
154
+ expect(p.parse("N�MEROS 1:1").osis()).toEqual("Num.1.1", "parsing: 'N�MEROS 1:1'");
155
+ expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
156
+ expect(p.parse("N�M 1:1").osis()).toEqual("Num.1.1", "parsing: 'N�M 1:1'");
157
+ });
158
+ });
159
+
160
+ describe("Localized book Lam (mq)", function() {
161
+ var p;
162
+ p = {};
163
+ beforeEach(function() {
164
+ p = new bcv_parser();
165
+ p.set_options({
166
+ book_alone_strategy: "ignore",
167
+ book_sequence_strategy: "ignore",
168
+ osis_compaction_strategy: "bc",
169
+ captive_end_digits_strategy: "delete"
170
+ });
171
+ p.include_apocrypha(true);
172
+ });
173
+ it("should handle book: Lam (mq)", function() {
174
+ expect(p.parse("Lamentaciones 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lamentaciones 1:1'");
175
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
176
+ p.include_apocrypha(false);
177
+ expect(p.parse("LAMENTACIONES 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAMENTACIONES 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 (mq)", 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 (mq)", function() {
196
+ expect(p.parse("Apocalipsis 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Apocalipsis 1:1'");
197
+ expect(p.parse("Apo 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Apo 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("APOCALIPSIS 1:1").osis()).toEqual("Rev.1.1", "parsing: 'APOCALIPSIS 1:1'");
201
+ expect(p.parse("APO 1:1").osis()).toEqual("Rev.1.1", "parsing: 'APO 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 (mq)", 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 (mq)", 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 (mq)", 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 (mq)", function() {
244
+ expect(p.parse("Josu� 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josu� 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("JOSU� 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSU� 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 (mq)", 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 (mq)", function() {
268
+ expect(p.parse("Jueces 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Jueces 1:1'");
269
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
270
+ expect(p.parse("Jue 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Jue 1:1'");
271
+ p.include_apocrypha(false);
272
+ expect(p.parse("JUECES 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUECES 1:1'");
273
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
274
+ expect(p.parse("JUE 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUE 1:1'");
275
+ });
276
+ });
277
+
278
+ describe("Localized book Ruth (mq)", 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 (mq)", 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 (mq)", 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 (mq)", function() {
314
+ expect(p.parse("Isa�as 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa�as 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("ISA�AS 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA�AS 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 (mq)", 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 (mq)", 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 (mq)", 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 (mq)", function() {
364
+ expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. 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. Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Sa 1:1'");
367
+ expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Sa 1:1'");
368
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
369
+ p.include_apocrypha(false);
370
+ expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAMUEL 1:1'");
371
+ expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAMUEL 1:1'");
372
+ expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SA 1:1'");
373
+ expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SA 1:1'");
374
+ expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
375
+ });
376
+ });
377
+
378
+ describe("Localized book 2Kgs (mq)", function() {
379
+ var p;
380
+ p = {};
381
+ beforeEach(function() {
382
+ p = new bcv_parser();
383
+ p.set_options({
384
+ book_alone_strategy: "ignore",
385
+ book_sequence_strategy: "ignore",
386
+ osis_compaction_strategy: "bc",
387
+ captive_end_digits_strategy: "delete"
388
+ });
389
+ p.include_apocrypha(true);
390
+ });
391
+ it("should handle book: 2Kgs (mq)", function() {
392
+ expect(p.parse("2. Reyes 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Reyes 1:1'");
393
+ expect(p.parse("2 Reyes 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Reyes 1:1'");
394
+ expect(p.parse("2. Re 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Re 1:1'");
395
+ expect(p.parse("2 Re 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Re 1:1'");
396
+ expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
397
+ p.include_apocrypha(false);
398
+ expect(p.parse("2. REYES 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. REYES 1:1'");
399
+ expect(p.parse("2 REYES 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 REYES 1:1'");
400
+ expect(p.parse("2. RE 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. RE 1:1'");
401
+ expect(p.parse("2 RE 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 RE 1:1'");
402
+ expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
403
+ });
404
+ });
405
+
406
+ describe("Localized book 1Kgs (mq)", function() {
407
+ var p;
408
+ p = {};
409
+ beforeEach(function() {
410
+ p = new bcv_parser();
411
+ p.set_options({
412
+ book_alone_strategy: "ignore",
413
+ book_sequence_strategy: "ignore",
414
+ osis_compaction_strategy: "bc",
415
+ captive_end_digits_strategy: "delete"
416
+ });
417
+ p.include_apocrypha(true);
418
+ });
419
+ it("should handle book: 1Kgs (mq)", function() {
420
+ expect(p.parse("1. Reyes 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Reyes 1:1'");
421
+ expect(p.parse("1 Reyes 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Reyes 1:1'");
422
+ expect(p.parse("1. Re 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Re 1:1'");
423
+ expect(p.parse("1 Re 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Re 1:1'");
424
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
425
+ p.include_apocrypha(false);
426
+ expect(p.parse("1. REYES 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. REYES 1:1'");
427
+ expect(p.parse("1 REYES 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 REYES 1:1'");
428
+ expect(p.parse("1. RE 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. RE 1:1'");
429
+ expect(p.parse("1 RE 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 RE 1:1'");
430
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
431
+ });
432
+ });
433
+
434
+ describe("Localized book 2Chr (mq)", function() {
435
+ var p;
436
+ p = {};
437
+ beforeEach(function() {
438
+ p = new bcv_parser();
439
+ p.set_options({
440
+ book_alone_strategy: "ignore",
441
+ book_sequence_strategy: "ignore",
442
+ osis_compaction_strategy: "bc",
443
+ captive_end_digits_strategy: "delete"
444
+ });
445
+ p.include_apocrypha(true);
446
+ });
447
+ it("should handle book: 2Chr (mq)", function() {
448
+ expect(p.parse("2. Cr�nicas 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Cr�nicas 1:1'");
449
+ expect(p.parse("2 Cr�nicas 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Cr�nicas 1:1'");
450
+ expect(p.parse("2. Cr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Cr 1:1'");
451
+ expect(p.parse("2 Cr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Cr 1:1'");
452
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
453
+ p.include_apocrypha(false);
454
+ expect(p.parse("2. CR�NICAS 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. CR�NICAS 1:1'");
455
+ expect(p.parse("2 CR�NICAS 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 CR�NICAS 1:1'");
456
+ expect(p.parse("2. CR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. CR 1:1'");
457
+ expect(p.parse("2 CR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 CR 1:1'");
458
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
459
+ });
460
+ });
461
+
462
+ describe("Localized book 1Chr (mq)", function() {
463
+ var p;
464
+ p = {};
465
+ beforeEach(function() {
466
+ p = new bcv_parser();
467
+ p.set_options({
468
+ book_alone_strategy: "ignore",
469
+ book_sequence_strategy: "ignore",
470
+ osis_compaction_strategy: "bc",
471
+ captive_end_digits_strategy: "delete"
472
+ });
473
+ p.include_apocrypha(true);
474
+ });
475
+ it("should handle book: 1Chr (mq)", function() {
476
+ expect(p.parse("1. Cr�nicas 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Cr�nicas 1:1'");
477
+ expect(p.parse("1 Cr�nicas 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Cr�nicas 1:1'");
478
+ expect(p.parse("1. Cr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Cr 1:1'");
479
+ expect(p.parse("1 Cr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Cr 1:1'");
480
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
481
+ p.include_apocrypha(false);
482
+ expect(p.parse("1. CR�NICAS 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. CR�NICAS 1:1'");
483
+ expect(p.parse("1 CR�NICAS 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 CR�NICAS 1:1'");
484
+ expect(p.parse("1. CR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. CR 1:1'");
485
+ expect(p.parse("1 CR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 CR 1:1'");
486
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
487
+ });
488
+ });
489
+
490
+ describe("Localized book Ezra (mq)", function() {
491
+ var p;
492
+ p = {};
493
+ beforeEach(function() {
494
+ p = new bcv_parser();
495
+ p.set_options({
496
+ book_alone_strategy: "ignore",
497
+ book_sequence_strategy: "ignore",
498
+ osis_compaction_strategy: "bc",
499
+ captive_end_digits_strategy: "delete"
500
+ });
501
+ p.include_apocrypha(true);
502
+ });
503
+ it("should handle book: Ezra (mq)", function() {
504
+ expect(p.parse("Esdras 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Esdras 1:1'");
505
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
506
+ expect(p.parse("Esd 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Esd 1:1'");
507
+ p.include_apocrypha(false);
508
+ expect(p.parse("ESDRAS 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'ESDRAS 1:1'");
509
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
510
+ expect(p.parse("ESD 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'ESD 1:1'");
511
+ });
512
+ });
513
+
514
+ describe("Localized book Neh (mq)", function() {
515
+ var p;
516
+ p = {};
517
+ beforeEach(function() {
518
+ p = new bcv_parser();
519
+ p.set_options({
520
+ book_alone_strategy: "ignore",
521
+ book_sequence_strategy: "ignore",
522
+ osis_compaction_strategy: "bc",
523
+ captive_end_digits_strategy: "delete"
524
+ });
525
+ p.include_apocrypha(true);
526
+ });
527
+ it("should handle book: Neh (mq)", function() {
528
+ expect(p.parse("Nehem�as 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehem�as 1:1'");
529
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
530
+ p.include_apocrypha(false);
531
+ expect(p.parse("NEHEM�AS 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEM�AS 1:1'");
532
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
533
+ });
534
+ });
535
+
536
+ describe("Localized book Esth (mq)", function() {
537
+ var p;
538
+ p = {};
539
+ beforeEach(function() {
540
+ p = new bcv_parser();
541
+ p.set_options({
542
+ book_alone_strategy: "ignore",
543
+ book_sequence_strategy: "ignore",
544
+ osis_compaction_strategy: "bc",
545
+ captive_end_digits_strategy: "delete"
546
+ });
547
+ p.include_apocrypha(true);
548
+ });
549
+ it("should handle book: Esth (mq)", function() {
550
+ expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Ester 1:1'");
551
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
552
+ expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Est 1:1'");
553
+ p.include_apocrypha(false);
554
+ expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTER 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
+ });
558
+ });
559
+
560
+ describe("Localized book Job (mq)", function() {
561
+ var p;
562
+ p = {};
563
+ beforeEach(function() {
564
+ p = new bcv_parser();
565
+ p.set_options({
566
+ book_alone_strategy: "ignore",
567
+ book_sequence_strategy: "ignore",
568
+ osis_compaction_strategy: "bc",
569
+ captive_end_digits_strategy: "delete"
570
+ });
571
+ p.include_apocrypha(true);
572
+ });
573
+ it("should handle book: Job (mq)", function() {
574
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
575
+ p.include_apocrypha(false);
576
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
577
+ });
578
+ });
579
+
580
+ describe("Localized book Ps (mq)", function() {
581
+ var p;
582
+ p = {};
583
+ beforeEach(function() {
584
+ p = new bcv_parser();
585
+ p.set_options({
586
+ book_alone_strategy: "ignore",
587
+ book_sequence_strategy: "ignore",
588
+ osis_compaction_strategy: "bc",
589
+ captive_end_digits_strategy: "delete"
590
+ });
591
+ p.include_apocrypha(true);
592
+ });
593
+ it("should handle book: Ps (mq)", function() {
594
+ expect(p.parse("Salmos 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Salmos 1:1'");
595
+ expect(p.parse("Sal 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Sal 1:1'");
596
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
597
+ p.include_apocrypha(false);
598
+ expect(p.parse("SALMOS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'SALMOS 1:1'");
599
+ expect(p.parse("SAL 1:1").osis()).toEqual("Ps.1.1", "parsing: 'SAL 1:1'");
600
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
601
+ });
602
+ });
603
+
604
+ describe("Localized book Prov (mq)", function() {
605
+ var p;
606
+ p = {};
607
+ beforeEach(function() {
608
+ p = new bcv_parser();
609
+ p.set_options({
610
+ book_alone_strategy: "ignore",
611
+ book_sequence_strategy: "ignore",
612
+ osis_compaction_strategy: "bc",
613
+ captive_end_digits_strategy: "delete"
614
+ });
615
+ p.include_apocrypha(true);
616
+ });
617
+ it("should handle book: Prov (mq)", function() {
618
+ expect(p.parse("Proverbios 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Proverbios 1:1'");
619
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
620
+ expect(p.parse("Pro 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Pro 1:1'");
621
+ p.include_apocrypha(false);
622
+ expect(p.parse("PROVERBIOS 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROVERBIOS 1:1'");
623
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
624
+ expect(p.parse("PRO 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PRO 1:1'");
625
+ });
626
+ });
627
+
628
+ describe("Localized book Eccl (mq)", function() {
629
+ var p;
630
+ p = {};
631
+ beforeEach(function() {
632
+ p = new bcv_parser();
633
+ p.set_options({
634
+ book_alone_strategy: "ignore",
635
+ book_sequence_strategy: "ignore",
636
+ osis_compaction_strategy: "bc",
637
+ captive_end_digits_strategy: "delete"
638
+ });
639
+ p.include_apocrypha(true);
640
+ });
641
+ it("should handle book: Eccl (mq)", function() {
642
+ expect(p.parse("Eclesiast�s 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eclesiast�s 1:1'");
643
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
644
+ expect(p.parse("Ecl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Ecl 1:1'");
645
+ p.include_apocrypha(false);
646
+ expect(p.parse("ECLESIAST�S 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECLESIAST�S 1:1'");
647
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
648
+ expect(p.parse("ECL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECL 1:1'");
649
+ });
650
+ });
651
+
652
+ describe("Localized book Song (mq)", function() {
653
+ var p;
654
+ p = {};
655
+ beforeEach(function() {
656
+ p = new bcv_parser();
657
+ p.set_options({
658
+ book_alone_strategy: "ignore",
659
+ book_sequence_strategy: "ignore",
660
+ osis_compaction_strategy: "bc",
661
+ captive_end_digits_strategy: "delete"
662
+ });
663
+ p.include_apocrypha(true);
664
+ });
665
+ it("should handle book: Song (mq)", function() {
666
+ expect(p.parse("Cantar de los Cantares 1:1").osis()).toEqual("Song.1.1", "parsing: 'Cantar de los Cantares 1:1'");
667
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
668
+ expect(p.parse("Can 1:1").osis()).toEqual("Song.1.1", "parsing: 'Can 1:1'");
669
+ p.include_apocrypha(false);
670
+ expect(p.parse("CANTAR DE LOS CANTARES 1:1").osis()).toEqual("Song.1.1", "parsing: 'CANTAR DE LOS CANTARES 1:1'");
671
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
672
+ expect(p.parse("CAN 1:1").osis()).toEqual("Song.1.1", "parsing: 'CAN 1:1'");
673
+ });
674
+ });
675
+
676
+ describe("Localized book Jer (mq)", function() {
677
+ var p;
678
+ p = {};
679
+ beforeEach(function() {
680
+ p = new bcv_parser();
681
+ p.set_options({
682
+ book_alone_strategy: "ignore",
683
+ book_sequence_strategy: "ignore",
684
+ osis_compaction_strategy: "bc",
685
+ captive_end_digits_strategy: "delete"
686
+ });
687
+ p.include_apocrypha(true);
688
+ });
689
+ it("should handle book: Jer (mq)", function() {
690
+ expect(p.parse("Jerem�as 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jerem�as 1:1'");
691
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
692
+ p.include_apocrypha(false);
693
+ expect(p.parse("JEREM�AS 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JEREM�AS 1:1'");
694
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
695
+ });
696
+ });
697
+
698
+ describe("Localized book Ezek (mq)", function() {
699
+ var p;
700
+ p = {};
701
+ beforeEach(function() {
702
+ p = new bcv_parser();
703
+ p.set_options({
704
+ book_alone_strategy: "ignore",
705
+ book_sequence_strategy: "ignore",
706
+ osis_compaction_strategy: "bc",
707
+ captive_end_digits_strategy: "delete"
708
+ });
709
+ p.include_apocrypha(true);
710
+ });
711
+ it("should handle book: Ezek (mq)", function() {
712
+ expect(p.parse("Ezequiel 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezequiel 1:1'");
713
+ expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
714
+ expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Eze 1:1'");
715
+ p.include_apocrypha(false);
716
+ expect(p.parse("EZEQUIEL 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEQUIEL 1:1'");
717
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
718
+ expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZE 1:1'");
719
+ });
720
+ });
721
+
722
+ describe("Localized book Dan (mq)", function() {
723
+ var p;
724
+ p = {};
725
+ beforeEach(function() {
726
+ p = new bcv_parser();
727
+ p.set_options({
728
+ book_alone_strategy: "ignore",
729
+ book_sequence_strategy: "ignore",
730
+ osis_compaction_strategy: "bc",
731
+ captive_end_digits_strategy: "delete"
732
+ });
733
+ p.include_apocrypha(true);
734
+ });
735
+ it("should handle book: Dan (mq)", function() {
736
+ expect(p.parse("Daniel 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Daniel 1:1'");
737
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
738
+ p.include_apocrypha(false);
739
+ expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DANIEL 1:1'");
740
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
741
+ });
742
+ });
743
+
744
+ describe("Localized book Hos (mq)", function() {
745
+ var p;
746
+ p = {};
747
+ beforeEach(function() {
748
+ p = new bcv_parser();
749
+ p.set_options({
750
+ book_alone_strategy: "ignore",
751
+ book_sequence_strategy: "ignore",
752
+ osis_compaction_strategy: "bc",
753
+ captive_end_digits_strategy: "delete"
754
+ });
755
+ p.include_apocrypha(true);
756
+ });
757
+ it("should handle book: Hos (mq)", function() {
758
+ expect(p.parse("Oseas 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Oseas 1:1'");
759
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
760
+ expect(p.parse("Ose 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Ose 1:1'");
761
+ p.include_apocrypha(false);
762
+ expect(p.parse("OSEAS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'OSEAS 1:1'");
763
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
764
+ expect(p.parse("OSE 1:1").osis()).toEqual("Hos.1.1", "parsing: 'OSE 1:1'");
765
+ });
766
+ });
767
+
768
+ describe("Localized book Joel (mq)", function() {
769
+ var p;
770
+ p = {};
771
+ beforeEach(function() {
772
+ p = new bcv_parser();
773
+ p.set_options({
774
+ book_alone_strategy: "ignore",
775
+ book_sequence_strategy: "ignore",
776
+ osis_compaction_strategy: "bc",
777
+ captive_end_digits_strategy: "delete"
778
+ });
779
+ p.include_apocrypha(true);
780
+ });
781
+ it("should handle book: Joel (mq)", function() {
782
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
783
+ expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joe 1:1'");
784
+ p.include_apocrypha(false);
785
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
786
+ expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOE 1:1'");
787
+ });
788
+ });
789
+
790
+ describe("Localized book Amos (mq)", function() {
791
+ var p;
792
+ p = {};
793
+ beforeEach(function() {
794
+ p = new bcv_parser();
795
+ p.set_options({
796
+ book_alone_strategy: "ignore",
797
+ book_sequence_strategy: "ignore",
798
+ osis_compaction_strategy: "bc",
799
+ captive_end_digits_strategy: "delete"
800
+ });
801
+ p.include_apocrypha(true);
802
+ });
803
+ it("should handle book: Amos (mq)", function() {
804
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
805
+ expect(p.parse("Am�s 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Am�s 1:1'");
806
+ expect(p.parse("Am� 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Am� 1:1'");
807
+ p.include_apocrypha(false);
808
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
809
+ expect(p.parse("AM�S 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AM�S 1:1'");
810
+ expect(p.parse("AM� 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AM� 1:1'");
811
+ });
812
+ });
813
+
814
+ describe("Localized book Obad (mq)", function() {
815
+ var p;
816
+ p = {};
817
+ beforeEach(function() {
818
+ p = new bcv_parser();
819
+ p.set_options({
820
+ book_alone_strategy: "ignore",
821
+ book_sequence_strategy: "ignore",
822
+ osis_compaction_strategy: "bc",
823
+ captive_end_digits_strategy: "delete"
824
+ });
825
+ p.include_apocrypha(true);
826
+ });
827
+ it("should handle book: Obad (mq)", function() {
828
+ expect(p.parse("Abd�as 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Abd�as 1:1'");
829
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
830
+ expect(p.parse("Abd 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Abd 1:1'");
831
+ p.include_apocrypha(false);
832
+ expect(p.parse("ABD�AS 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ABD�AS 1:1'");
833
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
834
+ expect(p.parse("ABD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'ABD 1:1'");
835
+ });
836
+ });
837
+
838
+ describe("Localized book Jonah (mq)", function() {
839
+ var p;
840
+ p = {};
841
+ beforeEach(function() {
842
+ p = new bcv_parser();
843
+ p.set_options({
844
+ book_alone_strategy: "ignore",
845
+ book_sequence_strategy: "ignore",
846
+ osis_compaction_strategy: "bc",
847
+ captive_end_digits_strategy: "delete"
848
+ });
849
+ p.include_apocrypha(true);
850
+ });
851
+ it("should handle book: Jonah (mq)", function() {
852
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
853
+ expect(p.parse("Jon�s 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jon�s 1:1'");
854
+ expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jon 1:1'");
855
+ p.include_apocrypha(false);
856
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
857
+ expect(p.parse("JON�S 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JON�S 1:1'");
858
+ expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JON 1:1'");
859
+ });
860
+ });
861
+
862
+ describe("Localized book Mic (mq)", function() {
863
+ var p;
864
+ p = {};
865
+ beforeEach(function() {
866
+ p = new bcv_parser();
867
+ p.set_options({
868
+ book_alone_strategy: "ignore",
869
+ book_sequence_strategy: "ignore",
870
+ osis_compaction_strategy: "bc",
871
+ captive_end_digits_strategy: "delete"
872
+ });
873
+ p.include_apocrypha(true);
874
+ });
875
+ it("should handle book: Mic (mq)", function() {
876
+ expect(p.parse("Miqueas 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Miqueas 1:1'");
877
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
878
+ expect(p.parse("Miq 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Miq 1:1'");
879
+ p.include_apocrypha(false);
880
+ expect(p.parse("MIQUEAS 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIQUEAS 1:1'");
881
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
882
+ expect(p.parse("MIQ 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIQ 1:1'");
883
+ });
884
+ });
885
+
886
+ describe("Localized book Nah (mq)", function() {
887
+ var p;
888
+ p = {};
889
+ beforeEach(function() {
890
+ p = new bcv_parser();
891
+ p.set_options({
892
+ book_alone_strategy: "ignore",
893
+ book_sequence_strategy: "ignore",
894
+ osis_compaction_strategy: "bc",
895
+ captive_end_digits_strategy: "delete"
896
+ });
897
+ p.include_apocrypha(true);
898
+ });
899
+ it("should handle book: Nah (mq)", function() {
900
+ expect(p.parse("Nah�m 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah�m 1:1'");
901
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
902
+ p.include_apocrypha(false);
903
+ expect(p.parse("NAH�M 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH�M 1:1'");
904
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
905
+ });
906
+ });
907
+
908
+ describe("Localized book Hab (mq)", function() {
909
+ var p;
910
+ p = {};
911
+ beforeEach(function() {
912
+ p = new bcv_parser();
913
+ p.set_options({
914
+ book_alone_strategy: "ignore",
915
+ book_sequence_strategy: "ignore",
916
+ osis_compaction_strategy: "bc",
917
+ captive_end_digits_strategy: "delete"
918
+ });
919
+ p.include_apocrypha(true);
920
+ });
921
+ it("should handle book: Hab (mq)", function() {
922
+ expect(p.parse("Habacuc 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Habacuc 1:1'");
923
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
924
+ p.include_apocrypha(false);
925
+ expect(p.parse("HABACUC 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HABACUC 1:1'");
926
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
927
+ });
928
+ });
929
+
930
+ describe("Localized book Zeph (mq)", function() {
931
+ var p;
932
+ p = {};
933
+ beforeEach(function() {
934
+ p = new bcv_parser();
935
+ p.set_options({
936
+ book_alone_strategy: "ignore",
937
+ book_sequence_strategy: "ignore",
938
+ osis_compaction_strategy: "bc",
939
+ captive_end_digits_strategy: "delete"
940
+ });
941
+ p.include_apocrypha(true);
942
+ });
943
+ it("should handle book: Zeph (mq)", function() {
944
+ expect(p.parse("Sofon�as 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Sofon�as 1:1'");
945
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
946
+ expect(p.parse("Sof 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Sof 1:1'");
947
+ p.include_apocrypha(false);
948
+ expect(p.parse("SOFON�AS 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'SOFON�AS 1:1'");
949
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
950
+ expect(p.parse("SOF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'SOF 1:1'");
951
+ });
952
+ });
953
+
954
+ describe("Localized book Hag (mq)", function() {
955
+ var p;
956
+ p = {};
957
+ beforeEach(function() {
958
+ p = new bcv_parser();
959
+ p.set_options({
960
+ book_alone_strategy: "ignore",
961
+ book_sequence_strategy: "ignore",
962
+ osis_compaction_strategy: "bc",
963
+ captive_end_digits_strategy: "delete"
964
+ });
965
+ p.include_apocrypha(true);
966
+ });
967
+ it("should handle book: Hag (mq)", function() {
968
+ expect(p.parse("Hageo 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hageo 1:1'");
969
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
970
+ p.include_apocrypha(false);
971
+ expect(p.parse("HAGEO 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAGEO 1:1'");
972
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
973
+ });
974
+ });
975
+
976
+ describe("Localized book Zech (mq)", function() {
977
+ var p;
978
+ p = {};
979
+ beforeEach(function() {
980
+ p = new bcv_parser();
981
+ p.set_options({
982
+ book_alone_strategy: "ignore",
983
+ book_sequence_strategy: "ignore",
984
+ osis_compaction_strategy: "bc",
985
+ captive_end_digits_strategy: "delete"
986
+ });
987
+ p.include_apocrypha(true);
988
+ });
989
+ it("should handle book: Zech (mq)", function() {
990
+ expect(p.parse("Zacar�as 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zacar�as 1:1'");
991
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
992
+ expect(p.parse("Zac 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zac 1:1'");
993
+ p.include_apocrypha(false);
994
+ expect(p.parse("ZACAR�AS 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZACAR�AS 1:1'");
995
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
996
+ expect(p.parse("ZAC 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZAC 1:1'");
997
+ });
998
+ });
999
+
1000
+ describe("Localized book Mal (mq)", function() {
1001
+ var p;
1002
+ p = {};
1003
+ beforeEach(function() {
1004
+ p = new bcv_parser();
1005
+ p.set_options({
1006
+ book_alone_strategy: "ignore",
1007
+ book_sequence_strategy: "ignore",
1008
+ osis_compaction_strategy: "bc",
1009
+ captive_end_digits_strategy: "delete"
1010
+ });
1011
+ p.include_apocrypha(true);
1012
+ });
1013
+ it("should handle book: Mal (mq)", function() {
1014
+ expect(p.parse("Malaqu�as 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Malaqu�as 1:1'");
1015
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1016
+ p.include_apocrypha(false);
1017
+ expect(p.parse("MALAQU�AS 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MALAQU�AS 1:1'");
1018
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1019
+ });
1020
+ });
1021
+
1022
+ describe("Localized book Matt (mq)", function() {
1023
+ var p;
1024
+ p = {};
1025
+ beforeEach(function() {
1026
+ p = new bcv_parser();
1027
+ p.set_options({
1028
+ book_alone_strategy: "ignore",
1029
+ book_sequence_strategy: "ignore",
1030
+ osis_compaction_strategy: "bc",
1031
+ captive_end_digits_strategy: "delete"
1032
+ });
1033
+ p.include_apocrypha(true);
1034
+ });
1035
+ it("should handle book: Matt (mq)", function() {
1036
+ expect(p.parse("Mateo 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mateo 1:1'");
1037
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1038
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1039
+ p.include_apocrypha(false);
1040
+ expect(p.parse("MATEO 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATEO 1:1'");
1041
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1042
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1043
+ });
1044
+ });
1045
+
1046
+ describe("Localized book Mark (mq)", function() {
1047
+ var p;
1048
+ p = {};
1049
+ beforeEach(function() {
1050
+ p = new bcv_parser();
1051
+ p.set_options({
1052
+ book_alone_strategy: "ignore",
1053
+ book_sequence_strategy: "ignore",
1054
+ osis_compaction_strategy: "bc",
1055
+ captive_end_digits_strategy: "delete"
1056
+ });
1057
+ p.include_apocrypha(true);
1058
+ });
1059
+ it("should handle book: Mark (mq)", function() {
1060
+ expect(p.parse("Marcos 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Marcos 1:1'");
1061
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1062
+ expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mar 1:1'");
1063
+ p.include_apocrypha(false);
1064
+ expect(p.parse("MARCOS 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARCOS 1:1'");
1065
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1066
+ expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MAR 1:1'");
1067
+ });
1068
+ });
1069
+
1070
+ describe("Localized book Luke (mq)", function() {
1071
+ var p;
1072
+ p = {};
1073
+ beforeEach(function() {
1074
+ p = new bcv_parser();
1075
+ p.set_options({
1076
+ book_alone_strategy: "ignore",
1077
+ book_sequence_strategy: "ignore",
1078
+ osis_compaction_strategy: "bc",
1079
+ captive_end_digits_strategy: "delete"
1080
+ });
1081
+ p.include_apocrypha(true);
1082
+ });
1083
+ it("should handle book: Luke (mq)", function() {
1084
+ expect(p.parse("Lucas 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Lucas 1:1'");
1085
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1086
+ expect(p.parse("Luc 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luc 1:1'");
1087
+ p.include_apocrypha(false);
1088
+ expect(p.parse("LUCAS 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUCAS 1:1'");
1089
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1090
+ expect(p.parse("LUC 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUC 1:1'");
1091
+ });
1092
+ });
1093
+
1094
+ describe("Localized book 1John (mq)", function() {
1095
+ var p;
1096
+ p = {};
1097
+ beforeEach(function() {
1098
+ p = new bcv_parser();
1099
+ p.set_options({
1100
+ book_alone_strategy: "ignore",
1101
+ book_sequence_strategy: "ignore",
1102
+ osis_compaction_strategy: "bc",
1103
+ captive_end_digits_strategy: "delete"
1104
+ });
1105
+ p.include_apocrypha(true);
1106
+ });
1107
+ it("should handle book: 1John (mq)", function() {
1108
+ expect(p.parse("1. Juan 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Juan 1:1'");
1109
+ expect(p.parse("1 Juan 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Juan 1:1'");
1110
+ expect(p.parse("1. Ju 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Ju 1:1'");
1111
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1112
+ expect(p.parse("1 Ju 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Ju 1:1'");
1113
+ p.include_apocrypha(false);
1114
+ expect(p.parse("1. JUAN 1:1").osis()).toEqual("1John.1.1", "parsing: '1. 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. JU 1:1").osis()).toEqual("1John.1.1", "parsing: '1. JU 1:1'");
1117
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1118
+ expect(p.parse("1 JU 1:1").osis()).toEqual("1John.1.1", "parsing: '1 JU 1:1'");
1119
+ });
1120
+ });
1121
+
1122
+ describe("Localized book 2John (mq)", function() {
1123
+ var p;
1124
+ p = {};
1125
+ beforeEach(function() {
1126
+ p = new bcv_parser();
1127
+ p.set_options({
1128
+ book_alone_strategy: "ignore",
1129
+ book_sequence_strategy: "ignore",
1130
+ osis_compaction_strategy: "bc",
1131
+ captive_end_digits_strategy: "delete"
1132
+ });
1133
+ p.include_apocrypha(true);
1134
+ });
1135
+ it("should handle book: 2John (mq)", function() {
1136
+ expect(p.parse("2. Juan 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Juan 1:1'");
1137
+ expect(p.parse("2 Juan 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Juan 1:1'");
1138
+ expect(p.parse("2. Ju 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Ju 1:1'");
1139
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1140
+ expect(p.parse("2 Ju 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Ju 1:1'");
1141
+ p.include_apocrypha(false);
1142
+ expect(p.parse("2. JUAN 1:1").osis()).toEqual("2John.1.1", "parsing: '2. JUAN 1:1'");
1143
+ expect(p.parse("2 JUAN 1:1").osis()).toEqual("2John.1.1", "parsing: '2 JUAN 1:1'");
1144
+ expect(p.parse("2. JU 1:1").osis()).toEqual("2John.1.1", "parsing: '2. JU 1:1'");
1145
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1146
+ expect(p.parse("2 JU 1:1").osis()).toEqual("2John.1.1", "parsing: '2 JU 1:1'");
1147
+ });
1148
+ });
1149
+
1150
+ describe("Localized book 3John (mq)", function() {
1151
+ var p;
1152
+ p = {};
1153
+ beforeEach(function() {
1154
+ p = new bcv_parser();
1155
+ p.set_options({
1156
+ book_alone_strategy: "ignore",
1157
+ book_sequence_strategy: "ignore",
1158
+ osis_compaction_strategy: "bc",
1159
+ captive_end_digits_strategy: "delete"
1160
+ });
1161
+ p.include_apocrypha(true);
1162
+ });
1163
+ it("should handle book: 3John (mq)", function() {
1164
+ expect(p.parse("3. Juan 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Juan 1:1'");
1165
+ expect(p.parse("3 Juan 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Juan 1:1'");
1166
+ expect(p.parse("3. Ju 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Ju 1:1'");
1167
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1168
+ expect(p.parse("3 Ju 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Ju 1:1'");
1169
+ p.include_apocrypha(false);
1170
+ expect(p.parse("3. JUAN 1:1").osis()).toEqual("3John.1.1", "parsing: '3. JUAN 1:1'");
1171
+ expect(p.parse("3 JUAN 1:1").osis()).toEqual("3John.1.1", "parsing: '3 JUAN 1:1'");
1172
+ expect(p.parse("3. JU 1:1").osis()).toEqual("3John.1.1", "parsing: '3. JU 1:1'");
1173
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1174
+ expect(p.parse("3 JU 1:1").osis()).toEqual("3John.1.1", "parsing: '3 JU 1:1'");
1175
+ });
1176
+ });
1177
+
1178
+ describe("Localized book John (mq)", function() {
1179
+ var p;
1180
+ p = {};
1181
+ beforeEach(function() {
1182
+ p = new bcv_parser();
1183
+ p.set_options({
1184
+ book_alone_strategy: "ignore",
1185
+ book_sequence_strategy: "ignore",
1186
+ osis_compaction_strategy: "bc",
1187
+ captive_end_digits_strategy: "delete"
1188
+ });
1189
+ p.include_apocrypha(true);
1190
+ });
1191
+ it("should handle book: John (mq)", function() {
1192
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1193
+ expect(p.parse("Juan 1:1").osis()).toEqual("John.1.1", "parsing: 'Juan 1:1'");
1194
+ expect(p.parse("Jua 1:1").osis()).toEqual("John.1.1", "parsing: 'Jua 1:1'");
1195
+ p.include_apocrypha(false);
1196
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1197
+ expect(p.parse("JUAN 1:1").osis()).toEqual("John.1.1", "parsing: 'JUAN 1:1'");
1198
+ expect(p.parse("JUA 1:1").osis()).toEqual("John.1.1", "parsing: 'JUA 1:1'");
1199
+ });
1200
+ });
1201
+
1202
+ describe("Localized book Acts (mq)", function() {
1203
+ var p;
1204
+ p = {};
1205
+ beforeEach(function() {
1206
+ p = new bcv_parser();
1207
+ p.set_options({
1208
+ book_alone_strategy: "ignore",
1209
+ book_sequence_strategy: "ignore",
1210
+ osis_compaction_strategy: "bc",
1211
+ captive_end_digits_strategy: "delete"
1212
+ });
1213
+ p.include_apocrypha(true);
1214
+ });
1215
+ it("should handle book: Acts (mq)", function() {
1216
+ expect(p.parse("Hechos 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Hechos 1:1'");
1217
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1218
+ expect(p.parse("Hec 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Hec 1:1'");
1219
+ p.include_apocrypha(false);
1220
+ expect(p.parse("HECHOS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'HECHOS 1:1'");
1221
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1222
+ expect(p.parse("HEC 1:1").osis()).toEqual("Acts.1.1", "parsing: 'HEC 1:1'");
1223
+ });
1224
+ });
1225
+
1226
+ describe("Localized book Rom (mq)", function() {
1227
+ var p;
1228
+ p = {};
1229
+ beforeEach(function() {
1230
+ p = new bcv_parser();
1231
+ p.set_options({
1232
+ book_alone_strategy: "ignore",
1233
+ book_sequence_strategy: "ignore",
1234
+ osis_compaction_strategy: "bc",
1235
+ captive_end_digits_strategy: "delete"
1236
+ });
1237
+ p.include_apocrypha(true);
1238
+ });
1239
+ it("should handle book: Rom (mq)", function() {
1240
+ expect(p.parse("Romanos 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Romanos 1:1'");
1241
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1242
+ p.include_apocrypha(false);
1243
+ expect(p.parse("ROMANOS 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROMANOS 1:1'");
1244
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1245
+ });
1246
+ });
1247
+
1248
+ describe("Localized book 2Cor (mq)", function() {
1249
+ var p;
1250
+ p = {};
1251
+ beforeEach(function() {
1252
+ p = new bcv_parser();
1253
+ p.set_options({
1254
+ book_alone_strategy: "ignore",
1255
+ book_sequence_strategy: "ignore",
1256
+ osis_compaction_strategy: "bc",
1257
+ captive_end_digits_strategy: "delete"
1258
+ });
1259
+ p.include_apocrypha(true);
1260
+ });
1261
+ it("should handle book: 2Cor (mq)", function() {
1262
+ expect(p.parse("2. Corintios 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Corintios 1:1'");
1263
+ expect(p.parse("2 Corintios 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Corintios 1:1'");
1264
+ expect(p.parse("2. Co 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Co 1:1'");
1265
+ expect(p.parse("2 Co 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Co 1:1'");
1266
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1267
+ p.include_apocrypha(false);
1268
+ expect(p.parse("2. CORINTIOS 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. CORINTIOS 1:1'");
1269
+ expect(p.parse("2 CORINTIOS 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 CORINTIOS 1:1'");
1270
+ expect(p.parse("2. CO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. CO 1:1'");
1271
+ expect(p.parse("2 CO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 CO 1:1'");
1272
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1273
+ });
1274
+ });
1275
+
1276
+ describe("Localized book 1Cor (mq)", function() {
1277
+ var p;
1278
+ p = {};
1279
+ beforeEach(function() {
1280
+ p = new bcv_parser();
1281
+ p.set_options({
1282
+ book_alone_strategy: "ignore",
1283
+ book_sequence_strategy: "ignore",
1284
+ osis_compaction_strategy: "bc",
1285
+ captive_end_digits_strategy: "delete"
1286
+ });
1287
+ p.include_apocrypha(true);
1288
+ });
1289
+ it("should handle book: 1Cor (mq)", function() {
1290
+ expect(p.parse("1. Corintios 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Corintios 1:1'");
1291
+ expect(p.parse("1 Corintios 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Corintios 1:1'");
1292
+ expect(p.parse("1. Co 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Co 1:1'");
1293
+ expect(p.parse("1 Co 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Co 1:1'");
1294
+ expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
1295
+ p.include_apocrypha(false);
1296
+ expect(p.parse("1. CORINTIOS 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. CORINTIOS 1:1'");
1297
+ expect(p.parse("1 CORINTIOS 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 CORINTIOS 1:1'");
1298
+ expect(p.parse("1. CO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. CO 1:1'");
1299
+ expect(p.parse("1 CO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 CO 1:1'");
1300
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1301
+ });
1302
+ });
1303
+
1304
+ describe("Localized book Gal (mq)", function() {
1305
+ var p;
1306
+ p = {};
1307
+ beforeEach(function() {
1308
+ p = new bcv_parser();
1309
+ p.set_options({
1310
+ book_alone_strategy: "ignore",
1311
+ book_sequence_strategy: "ignore",
1312
+ osis_compaction_strategy: "bc",
1313
+ captive_end_digits_strategy: "delete"
1314
+ });
1315
+ p.include_apocrypha(true);
1316
+ });
1317
+ it("should handle book: Gal (mq)", function() {
1318
+ expect(p.parse("G�latas 1:1").osis()).toEqual("Gal.1.1", "parsing: 'G�latas 1:1'");
1319
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1320
+ expect(p.parse("G�l 1:1").osis()).toEqual("Gal.1.1", "parsing: 'G�l 1:1'");
1321
+ p.include_apocrypha(false);
1322
+ expect(p.parse("G�LATAS 1:1").osis()).toEqual("Gal.1.1", "parsing: 'G�LATAS 1:1'");
1323
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1324
+ expect(p.parse("G�L 1:1").osis()).toEqual("Gal.1.1", "parsing: 'G�L 1:1'");
1325
+ });
1326
+ });
1327
+
1328
+ describe("Localized book Eph (mq)", function() {
1329
+ var p;
1330
+ p = {};
1331
+ beforeEach(function() {
1332
+ p = new bcv_parser();
1333
+ p.set_options({
1334
+ book_alone_strategy: "ignore",
1335
+ book_sequence_strategy: "ignore",
1336
+ osis_compaction_strategy: "bc",
1337
+ captive_end_digits_strategy: "delete"
1338
+ });
1339
+ p.include_apocrypha(true);
1340
+ });
1341
+ it("should handle book: Eph (mq)", function() {
1342
+ expect(p.parse("Efesios 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efesios 1:1'");
1343
+ expect(p.parse("Efe 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efe 1:1'");
1344
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1345
+ p.include_apocrypha(false);
1346
+ expect(p.parse("EFESIOS 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFESIOS 1:1'");
1347
+ expect(p.parse("EFE 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFE 1:1'");
1348
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1349
+ });
1350
+ });
1351
+
1352
+ describe("Localized book Phil (mq)", function() {
1353
+ var p;
1354
+ p = {};
1355
+ beforeEach(function() {
1356
+ p = new bcv_parser();
1357
+ p.set_options({
1358
+ book_alone_strategy: "ignore",
1359
+ book_sequence_strategy: "ignore",
1360
+ osis_compaction_strategy: "bc",
1361
+ captive_end_digits_strategy: "delete"
1362
+ });
1363
+ p.include_apocrypha(true);
1364
+ });
1365
+ it("should handle book: Phil (mq)", function() {
1366
+ expect(p.parse("Filipenses 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Filipenses 1:1'");
1367
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1368
+ expect(p.parse("Fil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Fil 1:1'");
1369
+ p.include_apocrypha(false);
1370
+ expect(p.parse("FILIPENSES 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FILIPENSES 1:1'");
1371
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1372
+ expect(p.parse("FIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FIL 1:1'");
1373
+ });
1374
+ });
1375
+
1376
+ describe("Localized book Col (mq)", function() {
1377
+ var p;
1378
+ p = {};
1379
+ beforeEach(function() {
1380
+ p = new bcv_parser();
1381
+ p.set_options({
1382
+ book_alone_strategy: "ignore",
1383
+ book_sequence_strategy: "ignore",
1384
+ osis_compaction_strategy: "bc",
1385
+ captive_end_digits_strategy: "delete"
1386
+ });
1387
+ p.include_apocrypha(true);
1388
+ });
1389
+ it("should handle book: Col (mq)", function() {
1390
+ expect(p.parse("Colosenses 1:1").osis()).toEqual("Col.1.1", "parsing: 'Colosenses 1:1'");
1391
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1392
+ p.include_apocrypha(false);
1393
+ expect(p.parse("COLOSENSES 1:1").osis()).toEqual("Col.1.1", "parsing: 'COLOSENSES 1:1'");
1394
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1395
+ });
1396
+ });
1397
+
1398
+ describe("Localized book 2Thess (mq)", function() {
1399
+ var p;
1400
+ p = {};
1401
+ beforeEach(function() {
1402
+ p = new bcv_parser();
1403
+ p.set_options({
1404
+ book_alone_strategy: "ignore",
1405
+ book_sequence_strategy: "ignore",
1406
+ osis_compaction_strategy: "bc",
1407
+ captive_end_digits_strategy: "delete"
1408
+ });
1409
+ p.include_apocrypha(true);
1410
+ });
1411
+ it("should handle book: 2Thess (mq)", function() {
1412
+ expect(p.parse("2. Tesalonicenses 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Tesalonicenses 1:1'");
1413
+ expect(p.parse("2 Tesalonicenses 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Tesalonicenses 1:1'");
1414
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1415
+ expect(p.parse("2. Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Te 1:1'");
1416
+ expect(p.parse("2 Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Te 1:1'");
1417
+ p.include_apocrypha(false);
1418
+ expect(p.parse("2. TESALONICENSES 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TESALONICENSES 1:1'");
1419
+ expect(p.parse("2 TESALONICENSES 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TESALONICENSES 1:1'");
1420
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1421
+ expect(p.parse("2. TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TE 1:1'");
1422
+ expect(p.parse("2 TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TE 1:1'");
1423
+ });
1424
+ });
1425
+
1426
+ describe("Localized book 1Thess (mq)", function() {
1427
+ var p;
1428
+ p = {};
1429
+ beforeEach(function() {
1430
+ p = new bcv_parser();
1431
+ p.set_options({
1432
+ book_alone_strategy: "ignore",
1433
+ book_sequence_strategy: "ignore",
1434
+ osis_compaction_strategy: "bc",
1435
+ captive_end_digits_strategy: "delete"
1436
+ });
1437
+ p.include_apocrypha(true);
1438
+ });
1439
+ it("should handle book: 1Thess (mq)", function() {
1440
+ expect(p.parse("1. Tesalonicenses 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Tesalonicenses 1:1'");
1441
+ expect(p.parse("1 Tesalonicenses 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Tesalonicenses 1:1'");
1442
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1443
+ expect(p.parse("1. Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Te 1:1'");
1444
+ expect(p.parse("1 Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Te 1:1'");
1445
+ p.include_apocrypha(false);
1446
+ expect(p.parse("1. TESALONICENSES 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TESALONICENSES 1:1'");
1447
+ expect(p.parse("1 TESALONICENSES 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TESALONICENSES 1:1'");
1448
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1449
+ expect(p.parse("1. TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TE 1:1'");
1450
+ expect(p.parse("1 TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TE 1:1'");
1451
+ });
1452
+ });
1453
+
1454
+ describe("Localized book 2Tim (mq)", function() {
1455
+ var p;
1456
+ p = {};
1457
+ beforeEach(function() {
1458
+ p = new bcv_parser();
1459
+ p.set_options({
1460
+ book_alone_strategy: "ignore",
1461
+ book_sequence_strategy: "ignore",
1462
+ osis_compaction_strategy: "bc",
1463
+ captive_end_digits_strategy: "delete"
1464
+ });
1465
+ p.include_apocrypha(true);
1466
+ });
1467
+ it("should handle book: 2Tim (mq)", function() {
1468
+ expect(p.parse("2. Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Timoteo 1:1'");
1469
+ expect(p.parse("2 Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Timoteo 1:1'");
1470
+ expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Ti 1:1'");
1471
+ expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Ti 1:1'");
1472
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1473
+ p.include_apocrypha(false);
1474
+ expect(p.parse("2. TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIMOTEO 1:1'");
1475
+ expect(p.parse("2 TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIMOTEO 1:1'");
1476
+ expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TI 1:1'");
1477
+ expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TI 1:1'");
1478
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1479
+ });
1480
+ });
1481
+
1482
+ describe("Localized book 1Tim (mq)", function() {
1483
+ var p;
1484
+ p = {};
1485
+ beforeEach(function() {
1486
+ p = new bcv_parser();
1487
+ p.set_options({
1488
+ book_alone_strategy: "ignore",
1489
+ book_sequence_strategy: "ignore",
1490
+ osis_compaction_strategy: "bc",
1491
+ captive_end_digits_strategy: "delete"
1492
+ });
1493
+ p.include_apocrypha(true);
1494
+ });
1495
+ it("should handle book: 1Tim (mq)", function() {
1496
+ expect(p.parse("1. Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Timoteo 1:1'");
1497
+ expect(p.parse("1 Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Timoteo 1:1'");
1498
+ expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Ti 1:1'");
1499
+ expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Ti 1:1'");
1500
+ expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
1501
+ p.include_apocrypha(false);
1502
+ expect(p.parse("1. TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIMOTEO 1:1'");
1503
+ expect(p.parse("1 TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIMOTEO 1:1'");
1504
+ expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TI 1:1'");
1505
+ expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TI 1:1'");
1506
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1507
+ });
1508
+ });
1509
+
1510
+ describe("Localized book Titus (mq)", function() {
1511
+ var p;
1512
+ p = {};
1513
+ beforeEach(function() {
1514
+ p = new bcv_parser();
1515
+ p.set_options({
1516
+ book_alone_strategy: "ignore",
1517
+ book_sequence_strategy: "ignore",
1518
+ osis_compaction_strategy: "bc",
1519
+ captive_end_digits_strategy: "delete"
1520
+ });
1521
+ p.include_apocrypha(true);
1522
+ });
1523
+ it("should handle book: Titus (mq)", function() {
1524
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1525
+ expect(p.parse("Tito 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tito 1:1'");
1526
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1527
+ p.include_apocrypha(false);
1528
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1529
+ expect(p.parse("TITO 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITO 1:1'");
1530
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1531
+ });
1532
+ });
1533
+
1534
+ describe("Localized book Phlm (mq)", function() {
1535
+ var p;
1536
+ p = {};
1537
+ beforeEach(function() {
1538
+ p = new bcv_parser();
1539
+ p.set_options({
1540
+ book_alone_strategy: "ignore",
1541
+ book_sequence_strategy: "ignore",
1542
+ osis_compaction_strategy: "bc",
1543
+ captive_end_digits_strategy: "delete"
1544
+ });
1545
+ p.include_apocrypha(true);
1546
+ });
1547
+ it("should handle book: Phlm (mq)", function() {
1548
+ expect(p.parse("Filem�n 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Filem�n 1:1'");
1549
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1550
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1551
+ p.include_apocrypha(false);
1552
+ expect(p.parse("FILEM�N 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FILEM�N 1:1'");
1553
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1554
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1555
+ });
1556
+ });
1557
+
1558
+ describe("Localized book Heb (mq)", function() {
1559
+ var p;
1560
+ p = {};
1561
+ beforeEach(function() {
1562
+ p = new bcv_parser();
1563
+ p.set_options({
1564
+ book_alone_strategy: "ignore",
1565
+ book_sequence_strategy: "ignore",
1566
+ osis_compaction_strategy: "bc",
1567
+ captive_end_digits_strategy: "delete"
1568
+ });
1569
+ p.include_apocrypha(true);
1570
+ });
1571
+ it("should handle book: Heb (mq)", function() {
1572
+ expect(p.parse("Hebreos 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Hebreos 1:1'");
1573
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1574
+ p.include_apocrypha(false);
1575
+ expect(p.parse("HEBREOS 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEBREOS 1:1'");
1576
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1577
+ });
1578
+ });
1579
+
1580
+ describe("Localized book Jas (mq)", function() {
1581
+ var p;
1582
+ p = {};
1583
+ beforeEach(function() {
1584
+ p = new bcv_parser();
1585
+ p.set_options({
1586
+ book_alone_strategy: "ignore",
1587
+ book_sequence_strategy: "ignore",
1588
+ osis_compaction_strategy: "bc",
1589
+ captive_end_digits_strategy: "delete"
1590
+ });
1591
+ p.include_apocrypha(true);
1592
+ });
1593
+ it("should handle book: Jas (mq)", function() {
1594
+ expect(p.parse("Santiago 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Santiago 1:1'");
1595
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1596
+ expect(p.parse("San 1:1").osis()).toEqual("Jas.1.1", "parsing: 'San 1:1'");
1597
+ p.include_apocrypha(false);
1598
+ expect(p.parse("SANTIAGO 1:1").osis()).toEqual("Jas.1.1", "parsing: 'SANTIAGO 1:1'");
1599
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1600
+ expect(p.parse("SAN 1:1").osis()).toEqual("Jas.1.1", "parsing: 'SAN 1:1'");
1601
+ });
1602
+ });
1603
+
1604
+ describe("Localized book 2Pet (mq)", function() {
1605
+ var p;
1606
+ p = {};
1607
+ beforeEach(function() {
1608
+ p = new bcv_parser();
1609
+ p.set_options({
1610
+ book_alone_strategy: "ignore",
1611
+ book_sequence_strategy: "ignore",
1612
+ osis_compaction_strategy: "bc",
1613
+ captive_end_digits_strategy: "delete"
1614
+ });
1615
+ p.include_apocrypha(true);
1616
+ });
1617
+ it("should handle book: 2Pet (mq)", function() {
1618
+ expect(p.parse("2. Pedro 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pedro 1:1'");
1619
+ expect(p.parse("2 Pedro 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pedro 1:1'");
1620
+ expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pe 1:1'");
1621
+ expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pe 1:1'");
1622
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1623
+ p.include_apocrypha(false);
1624
+ expect(p.parse("2. PEDRO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PEDRO 1:1'");
1625
+ expect(p.parse("2 PEDRO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PEDRO 1:1'");
1626
+ expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PE 1:1'");
1627
+ expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PE 1:1'");
1628
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1629
+ });
1630
+ });
1631
+
1632
+ describe("Localized book 1Pet (mq)", function() {
1633
+ var p;
1634
+ p = {};
1635
+ beforeEach(function() {
1636
+ p = new bcv_parser();
1637
+ p.set_options({
1638
+ book_alone_strategy: "ignore",
1639
+ book_sequence_strategy: "ignore",
1640
+ osis_compaction_strategy: "bc",
1641
+ captive_end_digits_strategy: "delete"
1642
+ });
1643
+ p.include_apocrypha(true);
1644
+ });
1645
+ it("should handle book: 1Pet (mq)", function() {
1646
+ expect(p.parse("1. Pedro 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pedro 1:1'");
1647
+ expect(p.parse("1 Pedro 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pedro 1:1'");
1648
+ expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pe 1:1'");
1649
+ expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pe 1:1'");
1650
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1651
+ p.include_apocrypha(false);
1652
+ expect(p.parse("1. PEDRO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PEDRO 1:1'");
1653
+ expect(p.parse("1 PEDRO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PEDRO 1:1'");
1654
+ expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PE 1:1'");
1655
+ expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PE 1:1'");
1656
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1657
+ });
1658
+ });
1659
+
1660
+ describe("Localized book Jude (mq)", function() {
1661
+ var p;
1662
+ p = {};
1663
+ beforeEach(function() {
1664
+ p = new bcv_parser();
1665
+ p.set_options({
1666
+ book_alone_strategy: "ignore",
1667
+ book_sequence_strategy: "ignore",
1668
+ osis_compaction_strategy: "bc",
1669
+ captive_end_digits_strategy: "delete"
1670
+ });
1671
+ p.include_apocrypha(true);
1672
+ });
1673
+ it("should handle book: Jude (mq)", function() {
1674
+ expect(p.parse("Judas 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Judas 1:1'");
1675
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1676
+ expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jud 1:1'");
1677
+ p.include_apocrypha(false);
1678
+ expect(p.parse("JUDAS 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDAS 1:1'");
1679
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1680
+ expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUD 1:1'");
1681
+ });
1682
+ });
1683
+
1684
+ describe("Miscellaneous tests", 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 return the expected language", function() {
1698
+ expect(p.languages).toEqual(["mq"]);
1699
+ });
1700
+ it("should handle ranges (mq)", function() {
1701
+ expect(p.parse("Titus 1:1 - 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 - 2'");
1702
+ expect(p.parse("Matt 1-2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1-2'");
1703
+ expect(p.parse("Phlm 2 - 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 - 3'");
1704
+ });
1705
+ it("should handle chapters (mq)", function() {
1706
+ expect(p.parse("Titus 1:1, kampra 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, kampra 2'");
1707
+ expect(p.parse("Matt 3:4 KAMPRA 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 KAMPRA 6'");
1708
+ });
1709
+ it("should handle verses (mq)", function() {
1710
+ expect(p.parse("Exod 1:1 miska 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 miska 3'");
1711
+ expect(p.parse("Phlm MISKA 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm MISKA 6'");
1712
+ });
1713
+ it("should handle 'and' (mq)", function() {
1714
+ expect(p.parse("Exod 1:1 bila 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 bila 3'");
1715
+ expect(p.parse("Phlm 2 BILA 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 BILA 6'");
1716
+ });
1717
+ it("should handle titles (mq)", function() {
1718
+ expect(p.parse("Ps 3 t�ts�, 4:2, 5:t�ts�").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 t�ts�, 4:2, 5:t�ts�'");
1719
+ expect(p.parse("PS 3 T�TS�, 4:2, 5:T�TS�").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 T�TS�, 4:2, 5:T�TS�'");
1720
+ });
1721
+ it("should handle 'ff' (mq)", function() {
1722
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1723
+ 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'");
1724
+ });
1725
+ it("should handle translations (mq)", function() {
1726
+ expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1727
+ expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1728
+ });
1729
+ it("should handle book ranges (mq)", function() {
1730
+ p.set_options({
1731
+ book_alone_strategy: "full",
1732
+ book_range_strategy: "include"
1733
+ });
1734
+ expect(p.parse("1 - 3 Ju").osis()).toEqual("1John.1-3John.1", "parsing: '1 - 3 Ju'");
1735
+ });
1736
+ return it("should handle boundaries (mq)", function() {
1737
+ p.set_options({
1738
+ book_alone_strategy: "full"
1739
+ });
1740
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1741
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1742
+ });
1743
+ });
1744
+
1745
+ }).call(this);