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,1781 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/nd-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (nd)", 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 (nd)", 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 (nd)", function() {
82
+ expect(p.parse("Genesisi 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Genesisi 1:1'");
83
+ expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Gen 1:1'");
84
+ p.include_apocrypha(false);
85
+ expect(p.parse("GENESISI 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GENESISI 1:1'");
86
+ expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GEN 1:1'");
87
+ });
88
+ });
89
+
90
+ describe("Localized book Exod (nd)", 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 (nd)", function() {
104
+ expect(p.parse("Eksodusi 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Eksodusi 1:1'");
105
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
106
+ expect(p.parse("Eks 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Eks 1:1'");
107
+ p.include_apocrypha(false);
108
+ expect(p.parse("EKSODUSI 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EKSODUSI 1:1'");
109
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
110
+ expect(p.parse("EKS 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EKS 1:1'");
111
+ });
112
+ });
113
+
114
+ describe("Localized book Lev (nd)", 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 (nd)", function() {
128
+ expect(p.parse("Levitikusi 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Levitikusi 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("LEVITIKUSI 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEVITIKUSI 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 (nd)", 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 (nd)", function() {
150
+ expect(p.parse("Numeri 1:1").osis()).toEqual("Num.1.1", "parsing: 'Numeri 1:1'");
151
+ expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
152
+ p.include_apocrypha(false);
153
+ expect(p.parse("NUMERI 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUMERI 1:1'");
154
+ expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
155
+ });
156
+ });
157
+
158
+ describe("Localized book Lam (nd)", 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 (nd)", function() {
172
+ expect(p.parse("Izililo 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Izililo 1:1'");
173
+ expect(p.parse("Izi 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Izi 1:1'");
174
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
175
+ p.include_apocrypha(false);
176
+ expect(p.parse("IZILILO 1:1").osis()).toEqual("Lam.1.1", "parsing: 'IZILILO 1:1'");
177
+ expect(p.parse("IZI 1:1").osis()).toEqual("Lam.1.1", "parsing: 'IZI 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 (nd)", 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 (nd)", function() {
196
+ expect(p.parse("Isambulo 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Isambulo 1:1'");
197
+ expect(p.parse("Ism 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Ism 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("ISAMBULO 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ISAMBULO 1:1'");
201
+ expect(p.parse("ISM 1:1").osis()).toEqual("Rev.1.1", "parsing: 'ISM 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 (nd)", 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 (nd)", function() {
220
+ expect(p.parse("Dutheronomi 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Dutheronomi 1:1'");
221
+ expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
222
+ expect(p.parse("Dut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Dut 1:1'");
223
+ p.include_apocrypha(false);
224
+ expect(p.parse("DUTHERONOMI 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DUTHERONOMI 1:1'");
225
+ expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
226
+ expect(p.parse("DUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DUT 1:1'");
227
+ });
228
+ });
229
+
230
+ describe("Localized book Josh (nd)", 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 (nd)", function() {
244
+ expect(p.parse("Joshua 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Joshua 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("JOSHUA 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSHUA 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 (nd)", 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 (nd)", function() {
268
+ expect(p.parse("Abahluleli 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Abahluleli 1:1'");
269
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
270
+ expect(p.parse("Aba 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Aba 1:1'");
271
+ p.include_apocrypha(false);
272
+ expect(p.parse("ABAHLULELI 1:1").osis()).toEqual("Judg.1.1", "parsing: 'ABAHLULELI 1:1'");
273
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
274
+ expect(p.parse("ABA 1:1").osis()).toEqual("Judg.1.1", "parsing: 'ABA 1:1'");
275
+ });
276
+ });
277
+
278
+ describe("Localized book Ruth (nd)", 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 (nd)", function() {
292
+ expect(p.parse("U-Ruthi 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'U-Ruthi 1:1'");
293
+ expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
294
+ expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Rut 1:1'");
295
+ p.include_apocrypha(false);
296
+ expect(p.parse("U-RUTHI 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'U-RUTHI 1:1'");
297
+ expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
298
+ expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUT 1:1'");
299
+ });
300
+ });
301
+
302
+ describe("Localized book Isa (nd)", function() {
303
+ var p;
304
+ p = {};
305
+ beforeEach(function() {
306
+ p = new bcv_parser();
307
+ p.set_options({
308
+ book_alone_strategy: "ignore",
309
+ book_sequence_strategy: "ignore",
310
+ osis_compaction_strategy: "bc",
311
+ captive_end_digits_strategy: "delete"
312
+ });
313
+ p.include_apocrypha(true);
314
+ });
315
+ it("should handle book: Isa (nd)", function() {
316
+ expect(p.parse("U-Isaya 1:1").osis()).toEqual("Isa.1.1", "parsing: 'U-Isaya 1:1'");
317
+ expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
318
+ p.include_apocrypha(false);
319
+ expect(p.parse("U-ISAYA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'U-ISAYA 1:1'");
320
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
321
+ });
322
+ });
323
+
324
+ describe("Localized book 2Sam (nd)", function() {
325
+ var p;
326
+ p = {};
327
+ beforeEach(function() {
328
+ p = new bcv_parser();
329
+ p.set_options({
330
+ book_alone_strategy: "ignore",
331
+ book_sequence_strategy: "ignore",
332
+ osis_compaction_strategy: "bc",
333
+ captive_end_digits_strategy: "delete"
334
+ });
335
+ p.include_apocrypha(true);
336
+ });
337
+ it("should handle book: 2Sam (nd)", function() {
338
+ expect(p.parse("2. USamuweli 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. USamuweli 1:1'");
339
+ expect(p.parse("2 USamuweli 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 USamuweli 1:1'");
340
+ expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Sa 1:1'");
341
+ expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Sa 1:1'");
342
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
343
+ p.include_apocrypha(false);
344
+ expect(p.parse("2. USAMUWELI 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. USAMUWELI 1:1'");
345
+ expect(p.parse("2 USAMUWELI 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 USAMUWELI 1:1'");
346
+ expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SA 1:1'");
347
+ expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SA 1:1'");
348
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
349
+ });
350
+ });
351
+
352
+ describe("Localized book 1Sam (nd)", function() {
353
+ var p;
354
+ p = {};
355
+ beforeEach(function() {
356
+ p = new bcv_parser();
357
+ p.set_options({
358
+ book_alone_strategy: "ignore",
359
+ book_sequence_strategy: "ignore",
360
+ osis_compaction_strategy: "bc",
361
+ captive_end_digits_strategy: "delete"
362
+ });
363
+ p.include_apocrypha(true);
364
+ });
365
+ it("should handle book: 1Sam (nd)", function() {
366
+ expect(p.parse("kuqala USamuweli 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'kuqala USamuweli 1:1'");
367
+ expect(p.parse("1. USamuweli 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. USamuweli 1:1'");
368
+ expect(p.parse("1 USamuweli 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 USamuweli 1:1'");
369
+ expect(p.parse("kuqala Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'kuqala Sa 1:1'");
370
+ expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Sa 1:1'");
371
+ expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Sa 1:1'");
372
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
373
+ p.include_apocrypha(false);
374
+ expect(p.parse("KUQALA USAMUWELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'KUQALA USAMUWELI 1:1'");
375
+ expect(p.parse("1. USAMUWELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. USAMUWELI 1:1'");
376
+ expect(p.parse("1 USAMUWELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 USAMUWELI 1:1'");
377
+ expect(p.parse("KUQALA SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'KUQALA SA 1:1'");
378
+ expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SA 1:1'");
379
+ expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SA 1:1'");
380
+ expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
381
+ });
382
+ });
383
+
384
+ describe("Localized book 2Kgs (nd)", function() {
385
+ var p;
386
+ p = {};
387
+ beforeEach(function() {
388
+ p = new bcv_parser();
389
+ p.set_options({
390
+ book_alone_strategy: "ignore",
391
+ book_sequence_strategy: "ignore",
392
+ osis_compaction_strategy: "bc",
393
+ captive_end_digits_strategy: "delete"
394
+ });
395
+ p.include_apocrypha(true);
396
+ });
397
+ it("should handle book: 2Kgs (nd)", function() {
398
+ expect(p.parse("2. AmaKhosi 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. AmaKhosi 1:1'");
399
+ expect(p.parse("2 AmaKhosi 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 AmaKhosi 1:1'");
400
+ expect(p.parse("2. Kh 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Kh 1:1'");
401
+ expect(p.parse("2 Kh 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Kh 1:1'");
402
+ expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
403
+ p.include_apocrypha(false);
404
+ expect(p.parse("2. AMAKHOSI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. AMAKHOSI 1:1'");
405
+ expect(p.parse("2 AMAKHOSI 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 AMAKHOSI 1:1'");
406
+ expect(p.parse("2. KH 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. KH 1:1'");
407
+ expect(p.parse("2 KH 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 KH 1:1'");
408
+ expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
409
+ });
410
+ });
411
+
412
+ describe("Localized book 1Kgs (nd)", function() {
413
+ var p;
414
+ p = {};
415
+ beforeEach(function() {
416
+ p = new bcv_parser();
417
+ p.set_options({
418
+ book_alone_strategy: "ignore",
419
+ book_sequence_strategy: "ignore",
420
+ osis_compaction_strategy: "bc",
421
+ captive_end_digits_strategy: "delete"
422
+ });
423
+ p.include_apocrypha(true);
424
+ });
425
+ it("should handle book: 1Kgs (nd)", function() {
426
+ expect(p.parse("kuqala AmaKhosi 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'kuqala AmaKhosi 1:1'");
427
+ expect(p.parse("1. AmaKhosi 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. AmaKhosi 1:1'");
428
+ expect(p.parse("1 AmaKhosi 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 AmaKhosi 1:1'");
429
+ expect(p.parse("kuqala Kh 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'kuqala Kh 1:1'");
430
+ expect(p.parse("1. Kh 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Kh 1:1'");
431
+ expect(p.parse("1 Kh 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Kh 1:1'");
432
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
433
+ p.include_apocrypha(false);
434
+ expect(p.parse("KUQALA AMAKHOSI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'KUQALA AMAKHOSI 1:1'");
435
+ expect(p.parse("1. AMAKHOSI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. AMAKHOSI 1:1'");
436
+ expect(p.parse("1 AMAKHOSI 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 AMAKHOSI 1:1'");
437
+ expect(p.parse("KUQALA KH 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'KUQALA KH 1:1'");
438
+ expect(p.parse("1. KH 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. KH 1:1'");
439
+ expect(p.parse("1 KH 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 KH 1:1'");
440
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
441
+ });
442
+ });
443
+
444
+ describe("Localized book 2Chr (nd)", function() {
445
+ var p;
446
+ p = {};
447
+ beforeEach(function() {
448
+ p = new bcv_parser();
449
+ p.set_options({
450
+ book_alone_strategy: "ignore",
451
+ book_sequence_strategy: "ignore",
452
+ osis_compaction_strategy: "bc",
453
+ captive_end_digits_strategy: "delete"
454
+ });
455
+ p.include_apocrypha(true);
456
+ });
457
+ it("should handle book: 2Chr (nd)", function() {
458
+ expect(p.parse("2. IziKronike 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. IziKronike 1:1'");
459
+ expect(p.parse("2 IziKronike 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 IziKronike 1:1'");
460
+ expect(p.parse("2. Kr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Kr 1:1'");
461
+ expect(p.parse("2 Kr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Kr 1:1'");
462
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
463
+ p.include_apocrypha(false);
464
+ expect(p.parse("2. IZIKRONIKE 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. IZIKRONIKE 1:1'");
465
+ expect(p.parse("2 IZIKRONIKE 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 IZIKRONIKE 1:1'");
466
+ expect(p.parse("2. KR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. KR 1:1'");
467
+ expect(p.parse("2 KR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 KR 1:1'");
468
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
469
+ });
470
+ });
471
+
472
+ describe("Localized book 1Chr (nd)", function() {
473
+ var p;
474
+ p = {};
475
+ beforeEach(function() {
476
+ p = new bcv_parser();
477
+ p.set_options({
478
+ book_alone_strategy: "ignore",
479
+ book_sequence_strategy: "ignore",
480
+ osis_compaction_strategy: "bc",
481
+ captive_end_digits_strategy: "delete"
482
+ });
483
+ p.include_apocrypha(true);
484
+ });
485
+ it("should handle book: 1Chr (nd)", function() {
486
+ expect(p.parse("kuqala IziKronike 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'kuqala IziKronike 1:1'");
487
+ expect(p.parse("1. IziKronike 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. IziKronike 1:1'");
488
+ expect(p.parse("1 IziKronike 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 IziKronike 1:1'");
489
+ expect(p.parse("kuqala Kr 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'kuqala Kr 1:1'");
490
+ expect(p.parse("1. Kr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Kr 1:1'");
491
+ expect(p.parse("1 Kr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Kr 1:1'");
492
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
493
+ p.include_apocrypha(false);
494
+ expect(p.parse("KUQALA IZIKRONIKE 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'KUQALA IZIKRONIKE 1:1'");
495
+ expect(p.parse("1. IZIKRONIKE 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. IZIKRONIKE 1:1'");
496
+ expect(p.parse("1 IZIKRONIKE 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 IZIKRONIKE 1:1'");
497
+ expect(p.parse("KUQALA KR 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'KUQALA KR 1:1'");
498
+ expect(p.parse("1. KR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. KR 1:1'");
499
+ expect(p.parse("1 KR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 KR 1:1'");
500
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
501
+ });
502
+ });
503
+
504
+ describe("Localized book Ezra (nd)", function() {
505
+ var p;
506
+ p = {};
507
+ beforeEach(function() {
508
+ p = new bcv_parser();
509
+ p.set_options({
510
+ book_alone_strategy: "ignore",
511
+ book_sequence_strategy: "ignore",
512
+ osis_compaction_strategy: "bc",
513
+ captive_end_digits_strategy: "delete"
514
+ });
515
+ p.include_apocrypha(true);
516
+ });
517
+ it("should handle book: Ezra (nd)", function() {
518
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
519
+ expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezr 1:1'");
520
+ p.include_apocrypha(false);
521
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
522
+ expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZR 1:1'");
523
+ });
524
+ });
525
+
526
+ describe("Localized book Neh (nd)", function() {
527
+ var p;
528
+ p = {};
529
+ beforeEach(function() {
530
+ p = new bcv_parser();
531
+ p.set_options({
532
+ book_alone_strategy: "ignore",
533
+ book_sequence_strategy: "ignore",
534
+ osis_compaction_strategy: "bc",
535
+ captive_end_digits_strategy: "delete"
536
+ });
537
+ p.include_apocrypha(true);
538
+ });
539
+ it("should handle book: Neh (nd)", function() {
540
+ expect(p.parse("Nehemiya 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehemiya 1:1'");
541
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
542
+ p.include_apocrypha(false);
543
+ expect(p.parse("NEHEMIYA 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEMIYA 1:1'");
544
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
545
+ });
546
+ });
547
+
548
+ describe("Localized book Esth (nd)", function() {
549
+ var p;
550
+ p = {};
551
+ beforeEach(function() {
552
+ p = new bcv_parser();
553
+ p.set_options({
554
+ book_alone_strategy: "ignore",
555
+ book_sequence_strategy: "ignore",
556
+ osis_compaction_strategy: "bc",
557
+ captive_end_digits_strategy: "delete"
558
+ });
559
+ p.include_apocrypha(true);
560
+ });
561
+ it("should handle book: Esth (nd)", function() {
562
+ expect(p.parse("Estheri 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Estheri 1:1'");
563
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
564
+ expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Est 1:1'");
565
+ p.include_apocrypha(false);
566
+ expect(p.parse("ESTHERI 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTHERI 1:1'");
567
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
568
+ expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1", "parsing: 'EST 1:1'");
569
+ });
570
+ });
571
+
572
+ describe("Localized book Job (nd)", function() {
573
+ var p;
574
+ p = {};
575
+ beforeEach(function() {
576
+ p = new bcv_parser();
577
+ p.set_options({
578
+ book_alone_strategy: "ignore",
579
+ book_sequence_strategy: "ignore",
580
+ osis_compaction_strategy: "bc",
581
+ captive_end_digits_strategy: "delete"
582
+ });
583
+ p.include_apocrypha(true);
584
+ });
585
+ it("should handle book: Job (nd)", function() {
586
+ expect(p.parse("UJobe 1:1").osis()).toEqual("Job.1.1", "parsing: 'UJobe 1:1'");
587
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
588
+ p.include_apocrypha(false);
589
+ expect(p.parse("UJOBE 1:1").osis()).toEqual("Job.1.1", "parsing: 'UJOBE 1:1'");
590
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
591
+ });
592
+ });
593
+
594
+ describe("Localized book Ps (nd)", function() {
595
+ var p;
596
+ p = {};
597
+ beforeEach(function() {
598
+ p = new bcv_parser();
599
+ p.set_options({
600
+ book_alone_strategy: "ignore",
601
+ book_sequence_strategy: "ignore",
602
+ osis_compaction_strategy: "bc",
603
+ captive_end_digits_strategy: "delete"
604
+ });
605
+ p.include_apocrypha(true);
606
+ });
607
+ it("should handle book: Ps (nd)", function() {
608
+ expect(p.parse("AmaHubo 1:1").osis()).toEqual("Ps.1.1", "parsing: 'AmaHubo 1:1'");
609
+ expect(p.parse("Hub 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Hub 1:1'");
610
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
611
+ p.include_apocrypha(false);
612
+ expect(p.parse("AMAHUBO 1:1").osis()).toEqual("Ps.1.1", "parsing: 'AMAHUBO 1:1'");
613
+ expect(p.parse("HUB 1:1").osis()).toEqual("Ps.1.1", "parsing: 'HUB 1:1'");
614
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
615
+ });
616
+ });
617
+
618
+ describe("Localized book Prov (nd)", function() {
619
+ var p;
620
+ p = {};
621
+ beforeEach(function() {
622
+ p = new bcv_parser();
623
+ p.set_options({
624
+ book_alone_strategy: "ignore",
625
+ book_sequence_strategy: "ignore",
626
+ osis_compaction_strategy: "bc",
627
+ captive_end_digits_strategy: "delete"
628
+ });
629
+ p.include_apocrypha(true);
630
+ });
631
+ it("should handle book: Prov (nd)", function() {
632
+ expect(p.parse("Izaga 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Izaga 1:1'");
633
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
634
+ expect(p.parse("Iza 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Iza 1:1'");
635
+ p.include_apocrypha(false);
636
+ expect(p.parse("IZAGA 1:1").osis()).toEqual("Prov.1.1", "parsing: 'IZAGA 1:1'");
637
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
638
+ expect(p.parse("IZA 1:1").osis()).toEqual("Prov.1.1", "parsing: 'IZA 1:1'");
639
+ });
640
+ });
641
+
642
+ describe("Localized book Eccl (nd)", function() {
643
+ var p;
644
+ p = {};
645
+ beforeEach(function() {
646
+ p = new bcv_parser();
647
+ p.set_options({
648
+ book_alone_strategy: "ignore",
649
+ book_sequence_strategy: "ignore",
650
+ osis_compaction_strategy: "bc",
651
+ captive_end_digits_strategy: "delete"
652
+ });
653
+ p.include_apocrypha(true);
654
+ });
655
+ it("should handle book: Eccl (nd)", function() {
656
+ expect(p.parse("UmShumayeli 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'UmShumayeli 1:1'");
657
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
658
+ expect(p.parse("UmS 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'UmS 1:1'");
659
+ p.include_apocrypha(false);
660
+ expect(p.parse("UMSHUMAYELI 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'UMSHUMAYELI 1:1'");
661
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
662
+ expect(p.parse("UMS 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'UMS 1:1'");
663
+ });
664
+ });
665
+
666
+ describe("Localized book Song (nd)", function() {
667
+ var p;
668
+ p = {};
669
+ beforeEach(function() {
670
+ p = new bcv_parser();
671
+ p.set_options({
672
+ book_alone_strategy: "ignore",
673
+ book_sequence_strategy: "ignore",
674
+ osis_compaction_strategy: "bc",
675
+ captive_end_digits_strategy: "delete"
676
+ });
677
+ p.include_apocrypha(true);
678
+ });
679
+ it("should handle book: Song (nd)", function() {
680
+ expect(p.parse("Ingoma yamaNgoma 1:1").osis()).toEqual("Song.1.1", "parsing: 'Ingoma yamaNgoma 1:1'");
681
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
682
+ expect(p.parse("Ing 1:1").osis()).toEqual("Song.1.1", "parsing: 'Ing 1:1'");
683
+ p.include_apocrypha(false);
684
+ expect(p.parse("INGOMA YAMANGOMA 1:1").osis()).toEqual("Song.1.1", "parsing: 'INGOMA YAMANGOMA 1:1'");
685
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
686
+ expect(p.parse("ING 1:1").osis()).toEqual("Song.1.1", "parsing: 'ING 1:1'");
687
+ });
688
+ });
689
+
690
+ describe("Localized book Jer (nd)", function() {
691
+ var p;
692
+ p = {};
693
+ beforeEach(function() {
694
+ p = new bcv_parser();
695
+ p.set_options({
696
+ book_alone_strategy: "ignore",
697
+ book_sequence_strategy: "ignore",
698
+ osis_compaction_strategy: "bc",
699
+ captive_end_digits_strategy: "delete"
700
+ });
701
+ p.include_apocrypha(true);
702
+ });
703
+ it("should handle book: Jer (nd)", function() {
704
+ expect(p.parse("UJeremiya 1:1").osis()).toEqual("Jer.1.1", "parsing: 'UJeremiya 1:1'");
705
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
706
+ p.include_apocrypha(false);
707
+ expect(p.parse("UJEREMIYA 1:1").osis()).toEqual("Jer.1.1", "parsing: 'UJEREMIYA 1:1'");
708
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
709
+ });
710
+ });
711
+
712
+ describe("Localized book Ezek (nd)", function() {
713
+ var p;
714
+ p = {};
715
+ beforeEach(function() {
716
+ p = new bcv_parser();
717
+ p.set_options({
718
+ book_alone_strategy: "ignore",
719
+ book_sequence_strategy: "ignore",
720
+ osis_compaction_strategy: "bc",
721
+ captive_end_digits_strategy: "delete"
722
+ });
723
+ p.include_apocrypha(true);
724
+ });
725
+ it("should handle book: Ezek (nd)", function() {
726
+ expect(p.parse("UEzekhiyeli 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'UEzekhiyeli 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
+ p.include_apocrypha(false);
730
+ expect(p.parse("UEZEKHIYELI 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'UEZEKHIYELI 1:1'");
731
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
732
+ expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZE 1:1'");
733
+ });
734
+ });
735
+
736
+ describe("Localized book Dan (nd)", function() {
737
+ var p;
738
+ p = {};
739
+ beforeEach(function() {
740
+ p = new bcv_parser();
741
+ p.set_options({
742
+ book_alone_strategy: "ignore",
743
+ book_sequence_strategy: "ignore",
744
+ osis_compaction_strategy: "bc",
745
+ captive_end_digits_strategy: "delete"
746
+ });
747
+ p.include_apocrypha(true);
748
+ });
749
+ it("should handle book: Dan (nd)", function() {
750
+ expect(p.parse("UDaniel 1:1").osis()).toEqual("Dan.1.1", "parsing: 'UDaniel 1:1'");
751
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
752
+ p.include_apocrypha(false);
753
+ expect(p.parse("UDANIEL 1:1").osis()).toEqual("Dan.1.1", "parsing: 'UDANIEL 1:1'");
754
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
755
+ });
756
+ });
757
+
758
+ describe("Localized book Hos (nd)", function() {
759
+ var p;
760
+ p = {};
761
+ beforeEach(function() {
762
+ p = new bcv_parser();
763
+ p.set_options({
764
+ book_alone_strategy: "ignore",
765
+ book_sequence_strategy: "ignore",
766
+ osis_compaction_strategy: "bc",
767
+ captive_end_digits_strategy: "delete"
768
+ });
769
+ p.include_apocrypha(true);
770
+ });
771
+ it("should handle book: Hos (nd)", function() {
772
+ expect(p.parse("UHezekhiyeli 1:1").osis()).toEqual("Hos.1.1", "parsing: 'UHezekhiyeli 1:1'");
773
+ expect(p.parse("Hez 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hez 1:1'");
774
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
775
+ p.include_apocrypha(false);
776
+ expect(p.parse("UHEZEKHIYELI 1:1").osis()).toEqual("Hos.1.1", "parsing: 'UHEZEKHIYELI 1:1'");
777
+ expect(p.parse("HEZ 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HEZ 1:1'");
778
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
779
+ });
780
+ });
781
+
782
+ describe("Localized book Joel (nd)", function() {
783
+ var p;
784
+ p = {};
785
+ beforeEach(function() {
786
+ p = new bcv_parser();
787
+ p.set_options({
788
+ book_alone_strategy: "ignore",
789
+ book_sequence_strategy: "ignore",
790
+ osis_compaction_strategy: "bc",
791
+ captive_end_digits_strategy: "delete"
792
+ });
793
+ p.include_apocrypha(true);
794
+ });
795
+ it("should handle book: Joel (nd)", function() {
796
+ expect(p.parse("UJoeli 1:1").osis()).toEqual("Joel.1.1", "parsing: 'UJoeli 1:1'");
797
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
798
+ expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joe 1:1'");
799
+ p.include_apocrypha(false);
800
+ expect(p.parse("UJOELI 1:1").osis()).toEqual("Joel.1.1", "parsing: 'UJOELI 1:1'");
801
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
802
+ expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOE 1:1'");
803
+ });
804
+ });
805
+
806
+ describe("Localized book Amos (nd)", function() {
807
+ var p;
808
+ p = {};
809
+ beforeEach(function() {
810
+ p = new bcv_parser();
811
+ p.set_options({
812
+ book_alone_strategy: "ignore",
813
+ book_sequence_strategy: "ignore",
814
+ osis_compaction_strategy: "bc",
815
+ captive_end_digits_strategy: "delete"
816
+ });
817
+ p.include_apocrypha(true);
818
+ });
819
+ it("should handle book: Amos (nd)", function() {
820
+ expect(p.parse("U-Amosi 1:1").osis()).toEqual("Amos.1.1", "parsing: 'U-Amosi 1:1'");
821
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
822
+ expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amo 1:1'");
823
+ p.include_apocrypha(false);
824
+ expect(p.parse("U-AMOSI 1:1").osis()).toEqual("Amos.1.1", "parsing: 'U-AMOSI 1:1'");
825
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
826
+ expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMO 1:1'");
827
+ });
828
+ });
829
+
830
+ describe("Localized book Obad (nd)", function() {
831
+ var p;
832
+ p = {};
833
+ beforeEach(function() {
834
+ p = new bcv_parser();
835
+ p.set_options({
836
+ book_alone_strategy: "ignore",
837
+ book_sequence_strategy: "ignore",
838
+ osis_compaction_strategy: "bc",
839
+ captive_end_digits_strategy: "delete"
840
+ });
841
+ p.include_apocrypha(true);
842
+ });
843
+ it("should handle book: Obad (nd)", function() {
844
+ expect(p.parse("U-Obadiya 1:1").osis()).toEqual("Obad.1.1", "parsing: 'U-Obadiya 1:1'");
845
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
846
+ expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Oba 1:1'");
847
+ p.include_apocrypha(false);
848
+ expect(p.parse("U-OBADIYA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'U-OBADIYA 1:1'");
849
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
850
+ expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBA 1:1'");
851
+ });
852
+ });
853
+
854
+ describe("Localized book Jonah (nd)", function() {
855
+ var p;
856
+ p = {};
857
+ beforeEach(function() {
858
+ p = new bcv_parser();
859
+ p.set_options({
860
+ book_alone_strategy: "ignore",
861
+ book_sequence_strategy: "ignore",
862
+ osis_compaction_strategy: "bc",
863
+ captive_end_digits_strategy: "delete"
864
+ });
865
+ p.include_apocrypha(true);
866
+ });
867
+ it("should handle book: Jonah (nd)", function() {
868
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
869
+ expect(p.parse("UJona 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'UJona 1:1'");
870
+ expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jon 1:1'");
871
+ p.include_apocrypha(false);
872
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
873
+ expect(p.parse("UJONA 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'UJONA 1:1'");
874
+ expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JON 1:1'");
875
+ });
876
+ });
877
+
878
+ describe("Localized book Mic (nd)", function() {
879
+ var p;
880
+ p = {};
881
+ beforeEach(function() {
882
+ p = new bcv_parser();
883
+ p.set_options({
884
+ book_alone_strategy: "ignore",
885
+ book_sequence_strategy: "ignore",
886
+ osis_compaction_strategy: "bc",
887
+ captive_end_digits_strategy: "delete"
888
+ });
889
+ p.include_apocrypha(true);
890
+ });
891
+ it("should handle book: Mic (nd)", function() {
892
+ expect(p.parse("UMika 1:1").osis()).toEqual("Mic.1.1", "parsing: 'UMika 1:1'");
893
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
894
+ expect(p.parse("Mik 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mik 1:1'");
895
+ p.include_apocrypha(false);
896
+ expect(p.parse("UMIKA 1:1").osis()).toEqual("Mic.1.1", "parsing: 'UMIKA 1:1'");
897
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
898
+ expect(p.parse("MIK 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIK 1:1'");
899
+ });
900
+ });
901
+
902
+ describe("Localized book Nah (nd)", function() {
903
+ var p;
904
+ p = {};
905
+ beforeEach(function() {
906
+ p = new bcv_parser();
907
+ p.set_options({
908
+ book_alone_strategy: "ignore",
909
+ book_sequence_strategy: "ignore",
910
+ osis_compaction_strategy: "bc",
911
+ captive_end_digits_strategy: "delete"
912
+ });
913
+ p.include_apocrypha(true);
914
+ });
915
+ it("should handle book: Nah (nd)", function() {
916
+ expect(p.parse("UNahume 1:1").osis()).toEqual("Nah.1.1", "parsing: 'UNahume 1:1'");
917
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
918
+ p.include_apocrypha(false);
919
+ expect(p.parse("UNAHUME 1:1").osis()).toEqual("Nah.1.1", "parsing: 'UNAHUME 1:1'");
920
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
921
+ });
922
+ });
923
+
924
+ describe("Localized book Hab (nd)", function() {
925
+ var p;
926
+ p = {};
927
+ beforeEach(function() {
928
+ p = new bcv_parser();
929
+ p.set_options({
930
+ book_alone_strategy: "ignore",
931
+ book_sequence_strategy: "ignore",
932
+ osis_compaction_strategy: "bc",
933
+ captive_end_digits_strategy: "delete"
934
+ });
935
+ p.include_apocrypha(true);
936
+ });
937
+ it("should handle book: Hab (nd)", function() {
938
+ expect(p.parse("UHabakuki 1:1").osis()).toEqual("Hab.1.1", "parsing: 'UHabakuki 1:1'");
939
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
940
+ p.include_apocrypha(false);
941
+ expect(p.parse("UHABAKUKI 1:1").osis()).toEqual("Hab.1.1", "parsing: 'UHABAKUKI 1:1'");
942
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
943
+ });
944
+ });
945
+
946
+ describe("Localized book Zeph (nd)", function() {
947
+ var p;
948
+ p = {};
949
+ beforeEach(function() {
950
+ p = new bcv_parser();
951
+ p.set_options({
952
+ book_alone_strategy: "ignore",
953
+ book_sequence_strategy: "ignore",
954
+ osis_compaction_strategy: "bc",
955
+ captive_end_digits_strategy: "delete"
956
+ });
957
+ p.include_apocrypha(true);
958
+ });
959
+ it("should handle book: Zeph (nd)", function() {
960
+ expect(p.parse("UZefaniya 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'UZefaniya 1:1'");
961
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
962
+ expect(p.parse("Zef 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zef 1:1'");
963
+ p.include_apocrypha(false);
964
+ expect(p.parse("UZEFANIYA 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'UZEFANIYA 1:1'");
965
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
966
+ expect(p.parse("ZEF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEF 1:1'");
967
+ });
968
+ });
969
+
970
+ describe("Localized book Hag (nd)", function() {
971
+ var p;
972
+ p = {};
973
+ beforeEach(function() {
974
+ p = new bcv_parser();
975
+ p.set_options({
976
+ book_alone_strategy: "ignore",
977
+ book_sequence_strategy: "ignore",
978
+ osis_compaction_strategy: "bc",
979
+ captive_end_digits_strategy: "delete"
980
+ });
981
+ p.include_apocrypha(true);
982
+ });
983
+ it("should handle book: Hag (nd)", function() {
984
+ expect(p.parse("U-Hagayi 1:1").osis()).toEqual("Hag.1.1", "parsing: 'U-Hagayi 1:1'");
985
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
986
+ p.include_apocrypha(false);
987
+ expect(p.parse("U-HAGAYI 1:1").osis()).toEqual("Hag.1.1", "parsing: 'U-HAGAYI 1:1'");
988
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
989
+ });
990
+ });
991
+
992
+ describe("Localized book Zech (nd)", function() {
993
+ var p;
994
+ p = {};
995
+ beforeEach(function() {
996
+ p = new bcv_parser();
997
+ p.set_options({
998
+ book_alone_strategy: "ignore",
999
+ book_sequence_strategy: "ignore",
1000
+ osis_compaction_strategy: "bc",
1001
+ captive_end_digits_strategy: "delete"
1002
+ });
1003
+ p.include_apocrypha(true);
1004
+ });
1005
+ it("should handle book: Zech (nd)", function() {
1006
+ expect(p.parse("UZekariya 1:1").osis()).toEqual("Zech.1.1", "parsing: 'UZekariya 1:1'");
1007
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
1008
+ expect(p.parse("Zek 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zek 1:1'");
1009
+ p.include_apocrypha(false);
1010
+ expect(p.parse("UZEKARIYA 1:1").osis()).toEqual("Zech.1.1", "parsing: 'UZEKARIYA 1:1'");
1011
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1012
+ expect(p.parse("ZEK 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZEK 1:1'");
1013
+ });
1014
+ });
1015
+
1016
+ describe("Localized book Mal (nd)", function() {
1017
+ var p;
1018
+ p = {};
1019
+ beforeEach(function() {
1020
+ p = new bcv_parser();
1021
+ p.set_options({
1022
+ book_alone_strategy: "ignore",
1023
+ book_sequence_strategy: "ignore",
1024
+ osis_compaction_strategy: "bc",
1025
+ captive_end_digits_strategy: "delete"
1026
+ });
1027
+ p.include_apocrypha(true);
1028
+ });
1029
+ it("should handle book: Mal (nd)", function() {
1030
+ expect(p.parse("UMalaki 1:1").osis()).toEqual("Mal.1.1", "parsing: 'UMalaki 1:1'");
1031
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1032
+ p.include_apocrypha(false);
1033
+ expect(p.parse("UMALAKI 1:1").osis()).toEqual("Mal.1.1", "parsing: 'UMALAKI 1:1'");
1034
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1035
+ });
1036
+ });
1037
+
1038
+ describe("Localized book Matt (nd)", function() {
1039
+ var p;
1040
+ p = {};
1041
+ beforeEach(function() {
1042
+ p = new bcv_parser();
1043
+ p.set_options({
1044
+ book_alone_strategy: "ignore",
1045
+ book_sequence_strategy: "ignore",
1046
+ osis_compaction_strategy: "bc",
1047
+ captive_end_digits_strategy: "delete"
1048
+ });
1049
+ p.include_apocrypha(true);
1050
+ });
1051
+ it("should handle book: Matt (nd)", function() {
1052
+ expect(p.parse("UMathewu 1:1").osis()).toEqual("Matt.1.1", "parsing: 'UMathewu 1:1'");
1053
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1054
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1055
+ p.include_apocrypha(false);
1056
+ expect(p.parse("UMATHEWU 1:1").osis()).toEqual("Matt.1.1", "parsing: 'UMATHEWU 1:1'");
1057
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1058
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1059
+ });
1060
+ });
1061
+
1062
+ describe("Localized book Mark (nd)", function() {
1063
+ var p;
1064
+ p = {};
1065
+ beforeEach(function() {
1066
+ p = new bcv_parser();
1067
+ p.set_options({
1068
+ book_alone_strategy: "ignore",
1069
+ book_sequence_strategy: "ignore",
1070
+ osis_compaction_strategy: "bc",
1071
+ captive_end_digits_strategy: "delete"
1072
+ });
1073
+ p.include_apocrypha(true);
1074
+ });
1075
+ it("should handle book: Mark (nd)", function() {
1076
+ expect(p.parse("UMakho 1:1").osis()).toEqual("Mark.1.1", "parsing: 'UMakho 1:1'");
1077
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1078
+ expect(p.parse("Mak 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mak 1:1'");
1079
+ p.include_apocrypha(false);
1080
+ expect(p.parse("UMAKHO 1:1").osis()).toEqual("Mark.1.1", "parsing: 'UMAKHO 1:1'");
1081
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1082
+ expect(p.parse("MAK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MAK 1:1'");
1083
+ });
1084
+ });
1085
+
1086
+ describe("Localized book Luke (nd)", function() {
1087
+ var p;
1088
+ p = {};
1089
+ beforeEach(function() {
1090
+ p = new bcv_parser();
1091
+ p.set_options({
1092
+ book_alone_strategy: "ignore",
1093
+ book_sequence_strategy: "ignore",
1094
+ osis_compaction_strategy: "bc",
1095
+ captive_end_digits_strategy: "delete"
1096
+ });
1097
+ p.include_apocrypha(true);
1098
+ });
1099
+ it("should handle book: Luke (nd)", function() {
1100
+ expect(p.parse("ULukha 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ULukha 1:1'");
1101
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1102
+ expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luk 1:1'");
1103
+ p.include_apocrypha(false);
1104
+ expect(p.parse("ULUKHA 1:1").osis()).toEqual("Luke.1.1", "parsing: 'ULUKHA 1:1'");
1105
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1106
+ expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUK 1:1'");
1107
+ });
1108
+ });
1109
+
1110
+ describe("Localized book 1John (nd)", function() {
1111
+ var p;
1112
+ p = {};
1113
+ beforeEach(function() {
1114
+ p = new bcv_parser();
1115
+ p.set_options({
1116
+ book_alone_strategy: "ignore",
1117
+ book_sequence_strategy: "ignore",
1118
+ osis_compaction_strategy: "bc",
1119
+ captive_end_digits_strategy: "delete"
1120
+ });
1121
+ p.include_apocrypha(true);
1122
+ });
1123
+ it("should handle book: 1John (nd)", function() {
1124
+ expect(p.parse("kuqala KaJohane 1:1").osis()).toEqual("1John.1.1", "parsing: 'kuqala KaJohane 1:1'");
1125
+ expect(p.parse("1. KaJohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1. KaJohane 1:1'");
1126
+ expect(p.parse("1 KaJohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1 KaJohane 1:1'");
1127
+ expect(p.parse("kuqala Jo 1:1").osis()).toEqual("1John.1.1", "parsing: 'kuqala Jo 1:1'");
1128
+ expect(p.parse("1. Jo 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Jo 1:1'");
1129
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1130
+ expect(p.parse("1 Jo 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Jo 1:1'");
1131
+ p.include_apocrypha(false);
1132
+ expect(p.parse("KUQALA KAJOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: 'KUQALA KAJOHANE 1:1'");
1133
+ expect(p.parse("1. KAJOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1. KAJOHANE 1:1'");
1134
+ expect(p.parse("1 KAJOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1 KAJOHANE 1:1'");
1135
+ expect(p.parse("KUQALA JO 1:1").osis()).toEqual("1John.1.1", "parsing: 'KUQALA JO 1:1'");
1136
+ expect(p.parse("1. JO 1:1").osis()).toEqual("1John.1.1", "parsing: '1. JO 1:1'");
1137
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1138
+ expect(p.parse("1 JO 1:1").osis()).toEqual("1John.1.1", "parsing: '1 JO 1:1'");
1139
+ });
1140
+ });
1141
+
1142
+ describe("Localized book 2John (nd)", function() {
1143
+ var p;
1144
+ p = {};
1145
+ beforeEach(function() {
1146
+ p = new bcv_parser();
1147
+ p.set_options({
1148
+ book_alone_strategy: "ignore",
1149
+ book_sequence_strategy: "ignore",
1150
+ osis_compaction_strategy: "bc",
1151
+ captive_end_digits_strategy: "delete"
1152
+ });
1153
+ p.include_apocrypha(true);
1154
+ });
1155
+ it("should handle book: 2John (nd)", function() {
1156
+ expect(p.parse("2. KaJohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2. KaJohane 1:1'");
1157
+ expect(p.parse("2 KaJohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2 KaJohane 1:1'");
1158
+ expect(p.parse("2. Jo 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Jo 1:1'");
1159
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1160
+ expect(p.parse("2 Jo 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Jo 1:1'");
1161
+ p.include_apocrypha(false);
1162
+ expect(p.parse("2. KAJOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2. KAJOHANE 1:1'");
1163
+ expect(p.parse("2 KAJOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2 KAJOHANE 1:1'");
1164
+ expect(p.parse("2. JO 1:1").osis()).toEqual("2John.1.1", "parsing: '2. JO 1:1'");
1165
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1166
+ expect(p.parse("2 JO 1:1").osis()).toEqual("2John.1.1", "parsing: '2 JO 1:1'");
1167
+ });
1168
+ });
1169
+
1170
+ describe("Localized book 3John (nd)", function() {
1171
+ var p;
1172
+ p = {};
1173
+ beforeEach(function() {
1174
+ p = new bcv_parser();
1175
+ p.set_options({
1176
+ book_alone_strategy: "ignore",
1177
+ book_sequence_strategy: "ignore",
1178
+ osis_compaction_strategy: "bc",
1179
+ captive_end_digits_strategy: "delete"
1180
+ });
1181
+ p.include_apocrypha(true);
1182
+ });
1183
+ it("should handle book: 3John (nd)", function() {
1184
+ expect(p.parse("3. KaJohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3. KaJohane 1:1'");
1185
+ expect(p.parse("3 KaJohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3 KaJohane 1:1'");
1186
+ expect(p.parse("3. Jo 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Jo 1:1'");
1187
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1188
+ expect(p.parse("3 Jo 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Jo 1:1'");
1189
+ p.include_apocrypha(false);
1190
+ expect(p.parse("3. KAJOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3. KAJOHANE 1:1'");
1191
+ expect(p.parse("3 KAJOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3 KAJOHANE 1:1'");
1192
+ expect(p.parse("3. JO 1:1").osis()).toEqual("3John.1.1", "parsing: '3. JO 1:1'");
1193
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1194
+ expect(p.parse("3 JO 1:1").osis()).toEqual("3John.1.1", "parsing: '3 JO 1:1'");
1195
+ });
1196
+ });
1197
+
1198
+ describe("Localized book John (nd)", function() {
1199
+ var p;
1200
+ p = {};
1201
+ beforeEach(function() {
1202
+ p = new bcv_parser();
1203
+ p.set_options({
1204
+ book_alone_strategy: "ignore",
1205
+ book_sequence_strategy: "ignore",
1206
+ osis_compaction_strategy: "bc",
1207
+ captive_end_digits_strategy: "delete"
1208
+ });
1209
+ p.include_apocrypha(true);
1210
+ });
1211
+ it("should handle book: John (nd)", function() {
1212
+ expect(p.parse("UJohane 1:1").osis()).toEqual("John.1.1", "parsing: 'UJohane 1:1'");
1213
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1214
+ expect(p.parse("Joh 1:1").osis()).toEqual("John.1.1", "parsing: 'Joh 1:1'");
1215
+ p.include_apocrypha(false);
1216
+ expect(p.parse("UJOHANE 1:1").osis()).toEqual("John.1.1", "parsing: 'UJOHANE 1:1'");
1217
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1218
+ expect(p.parse("JOH 1:1").osis()).toEqual("John.1.1", "parsing: 'JOH 1:1'");
1219
+ });
1220
+ });
1221
+
1222
+ describe("Localized book Acts (nd)", function() {
1223
+ var p;
1224
+ p = {};
1225
+ beforeEach(function() {
1226
+ p = new bcv_parser();
1227
+ p.set_options({
1228
+ book_alone_strategy: "ignore",
1229
+ book_sequence_strategy: "ignore",
1230
+ osis_compaction_strategy: "bc",
1231
+ captive_end_digits_strategy: "delete"
1232
+ });
1233
+ p.include_apocrypha(true);
1234
+ });
1235
+ it("should handle book: Acts (nd)", function() {
1236
+ expect(p.parse("ImiSebenzi 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ImiSebenzi 1:1'");
1237
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1238
+ expect(p.parse("Imi 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Imi 1:1'");
1239
+ p.include_apocrypha(false);
1240
+ expect(p.parse("IMISEBENZI 1:1").osis()).toEqual("Acts.1.1", "parsing: 'IMISEBENZI 1:1'");
1241
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1242
+ expect(p.parse("IMI 1:1").osis()).toEqual("Acts.1.1", "parsing: 'IMI 1:1'");
1243
+ });
1244
+ });
1245
+
1246
+ describe("Localized book Rom (nd)", function() {
1247
+ var p;
1248
+ p = {};
1249
+ beforeEach(function() {
1250
+ p = new bcv_parser();
1251
+ p.set_options({
1252
+ book_alone_strategy: "ignore",
1253
+ book_sequence_strategy: "ignore",
1254
+ osis_compaction_strategy: "bc",
1255
+ captive_end_digits_strategy: "delete"
1256
+ });
1257
+ p.include_apocrypha(true);
1258
+ });
1259
+ it("should handle book: Rom (nd)", function() {
1260
+ expect(p.parse("KwabaseRoma 1:1").osis()).toEqual("Rom.1.1", "parsing: 'KwabaseRoma 1:1'");
1261
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1262
+ p.include_apocrypha(false);
1263
+ expect(p.parse("KWABASEROMA 1:1").osis()).toEqual("Rom.1.1", "parsing: 'KWABASEROMA 1:1'");
1264
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1265
+ });
1266
+ });
1267
+
1268
+ describe("Localized book 2Cor (nd)", function() {
1269
+ var p;
1270
+ p = {};
1271
+ beforeEach(function() {
1272
+ p = new bcv_parser();
1273
+ p.set_options({
1274
+ book_alone_strategy: "ignore",
1275
+ book_sequence_strategy: "ignore",
1276
+ osis_compaction_strategy: "bc",
1277
+ captive_end_digits_strategy: "delete"
1278
+ });
1279
+ p.include_apocrypha(true);
1280
+ });
1281
+ it("should handle book: 2Cor (nd)", function() {
1282
+ expect(p.parse("2. KwabaseKorinte 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KwabaseKorinte 1:1'");
1283
+ expect(p.parse("2 KwabaseKorinte 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KwabaseKorinte 1:1'");
1284
+ expect(p.parse("2. Ko 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Ko 1:1'");
1285
+ expect(p.parse("2 Ko 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Ko 1:1'");
1286
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1287
+ p.include_apocrypha(false);
1288
+ expect(p.parse("2. KWABASEKORINTE 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KWABASEKORINTE 1:1'");
1289
+ expect(p.parse("2 KWABASEKORINTE 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KWABASEKORINTE 1:1'");
1290
+ expect(p.parse("2. KO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KO 1:1'");
1291
+ expect(p.parse("2 KO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KO 1:1'");
1292
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1293
+ });
1294
+ });
1295
+
1296
+ describe("Localized book 1Cor (nd)", function() {
1297
+ var p;
1298
+ p = {};
1299
+ beforeEach(function() {
1300
+ p = new bcv_parser();
1301
+ p.set_options({
1302
+ book_alone_strategy: "ignore",
1303
+ book_sequence_strategy: "ignore",
1304
+ osis_compaction_strategy: "bc",
1305
+ captive_end_digits_strategy: "delete"
1306
+ });
1307
+ p.include_apocrypha(true);
1308
+ });
1309
+ it("should handle book: 1Cor (nd)", function() {
1310
+ expect(p.parse("kuqala KwabaseKorinte 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'kuqala KwabaseKorinte 1:1'");
1311
+ expect(p.parse("1. KwabaseKorinte 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KwabaseKorinte 1:1'");
1312
+ expect(p.parse("1 KwabaseKorinte 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KwabaseKorinte 1:1'");
1313
+ expect(p.parse("kuqala Ko 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'kuqala Ko 1:1'");
1314
+ expect(p.parse("1. Ko 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Ko 1:1'");
1315
+ expect(p.parse("1 Ko 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Ko 1:1'");
1316
+ expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
1317
+ p.include_apocrypha(false);
1318
+ expect(p.parse("KUQALA KWABASEKORINTE 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'KUQALA KWABASEKORINTE 1:1'");
1319
+ expect(p.parse("1. KWABASEKORINTE 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KWABASEKORINTE 1:1'");
1320
+ expect(p.parse("1 KWABASEKORINTE 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KWABASEKORINTE 1:1'");
1321
+ expect(p.parse("KUQALA KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'KUQALA KO 1:1'");
1322
+ expect(p.parse("1. KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KO 1:1'");
1323
+ expect(p.parse("1 KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KO 1:1'");
1324
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1325
+ });
1326
+ });
1327
+
1328
+ describe("Localized book Gal (nd)", 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: Gal (nd)", function() {
1342
+ expect(p.parse("KwabaseGalathiya 1:1").osis()).toEqual("Gal.1.1", "parsing: 'KwabaseGalathiya 1:1'");
1343
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1344
+ p.include_apocrypha(false);
1345
+ expect(p.parse("KWABASEGALATHIYA 1:1").osis()).toEqual("Gal.1.1", "parsing: 'KWABASEGALATHIYA 1:1'");
1346
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1347
+ });
1348
+ });
1349
+
1350
+ describe("Localized book Eph (nd)", function() {
1351
+ var p;
1352
+ p = {};
1353
+ beforeEach(function() {
1354
+ p = new bcv_parser();
1355
+ p.set_options({
1356
+ book_alone_strategy: "ignore",
1357
+ book_sequence_strategy: "ignore",
1358
+ osis_compaction_strategy: "bc",
1359
+ captive_end_digits_strategy: "delete"
1360
+ });
1361
+ p.include_apocrypha(true);
1362
+ });
1363
+ it("should handle book: Eph (nd)", function() {
1364
+ expect(p.parse("Kwabase-Efesu 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Kwabase-Efesu 1:1'");
1365
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1366
+ expect(p.parse("Ef 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Ef 1:1'");
1367
+ p.include_apocrypha(false);
1368
+ expect(p.parse("KWABASE-EFESU 1:1").osis()).toEqual("Eph.1.1", "parsing: 'KWABASE-EFESU 1:1'");
1369
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1370
+ expect(p.parse("EF 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EF 1:1'");
1371
+ });
1372
+ });
1373
+
1374
+ describe("Localized book Phil (nd)", function() {
1375
+ var p;
1376
+ p = {};
1377
+ beforeEach(function() {
1378
+ p = new bcv_parser();
1379
+ p.set_options({
1380
+ book_alone_strategy: "ignore",
1381
+ book_sequence_strategy: "ignore",
1382
+ osis_compaction_strategy: "bc",
1383
+ captive_end_digits_strategy: "delete"
1384
+ });
1385
+ p.include_apocrypha(true);
1386
+ });
1387
+ it("should handle book: Phil (nd)", function() {
1388
+ expect(p.parse("KwabaseFiliphi 1:1").osis()).toEqual("Phil.1.1", "parsing: 'KwabaseFiliphi 1:1'");
1389
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1390
+ expect(p.parse("Fil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Fil 1:1'");
1391
+ p.include_apocrypha(false);
1392
+ expect(p.parse("KWABASEFILIPHI 1:1").osis()).toEqual("Phil.1.1", "parsing: 'KWABASEFILIPHI 1:1'");
1393
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1394
+ expect(p.parse("FIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FIL 1:1'");
1395
+ });
1396
+ });
1397
+
1398
+ describe("Localized book Col (nd)", 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: Col (nd)", function() {
1412
+ expect(p.parse("KwabaseKolose 1:1").osis()).toEqual("Col.1.1", "parsing: 'KwabaseKolose 1:1'");
1413
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1414
+ expect(p.parse("Kol 1:1").osis()).toEqual("Col.1.1", "parsing: 'Kol 1:1'");
1415
+ p.include_apocrypha(false);
1416
+ expect(p.parse("KWABASEKOLOSE 1:1").osis()).toEqual("Col.1.1", "parsing: 'KWABASEKOLOSE 1:1'");
1417
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1418
+ expect(p.parse("KOL 1:1").osis()).toEqual("Col.1.1", "parsing: 'KOL 1:1'");
1419
+ });
1420
+ });
1421
+
1422
+ describe("Localized book 2Thess (nd)", function() {
1423
+ var p;
1424
+ p = {};
1425
+ beforeEach(function() {
1426
+ p = new bcv_parser();
1427
+ p.set_options({
1428
+ book_alone_strategy: "ignore",
1429
+ book_sequence_strategy: "ignore",
1430
+ osis_compaction_strategy: "bc",
1431
+ captive_end_digits_strategy: "delete"
1432
+ });
1433
+ p.include_apocrypha(true);
1434
+ });
1435
+ it("should handle book: 2Thess (nd)", function() {
1436
+ expect(p.parse("2. KwabaseThesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. KwabaseThesalonika 1:1'");
1437
+ expect(p.parse("2 KwabaseThesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 KwabaseThesalonika 1:1'");
1438
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1439
+ expect(p.parse("2. Th 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Th 1:1'");
1440
+ expect(p.parse("2 Th 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Th 1:1'");
1441
+ p.include_apocrypha(false);
1442
+ expect(p.parse("2. KWABASETHESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. KWABASETHESALONIKA 1:1'");
1443
+ expect(p.parse("2 KWABASETHESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 KWABASETHESALONIKA 1:1'");
1444
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1445
+ expect(p.parse("2. TH 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TH 1:1'");
1446
+ expect(p.parse("2 TH 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TH 1:1'");
1447
+ });
1448
+ });
1449
+
1450
+ describe("Localized book 1Thess (nd)", function() {
1451
+ var p;
1452
+ p = {};
1453
+ beforeEach(function() {
1454
+ p = new bcv_parser();
1455
+ p.set_options({
1456
+ book_alone_strategy: "ignore",
1457
+ book_sequence_strategy: "ignore",
1458
+ osis_compaction_strategy: "bc",
1459
+ captive_end_digits_strategy: "delete"
1460
+ });
1461
+ p.include_apocrypha(true);
1462
+ });
1463
+ it("should handle book: 1Thess (nd)", function() {
1464
+ expect(p.parse("kuqala KwabaseThesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'kuqala KwabaseThesalonika 1:1'");
1465
+ expect(p.parse("1. KwabaseThesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. KwabaseThesalonika 1:1'");
1466
+ expect(p.parse("1 KwabaseThesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 KwabaseThesalonika 1:1'");
1467
+ expect(p.parse("kuqala Th 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'kuqala Th 1:1'");
1468
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1469
+ expect(p.parse("1. Th 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Th 1:1'");
1470
+ expect(p.parse("1 Th 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Th 1:1'");
1471
+ p.include_apocrypha(false);
1472
+ expect(p.parse("KUQALA KWABASETHESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'KUQALA KWABASETHESALONIKA 1:1'");
1473
+ expect(p.parse("1. KWABASETHESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. KWABASETHESALONIKA 1:1'");
1474
+ expect(p.parse("1 KWABASETHESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 KWABASETHESALONIKA 1:1'");
1475
+ expect(p.parse("KUQALA TH 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'KUQALA TH 1:1'");
1476
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1477
+ expect(p.parse("1. TH 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TH 1:1'");
1478
+ expect(p.parse("1 TH 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TH 1:1'");
1479
+ });
1480
+ });
1481
+
1482
+ describe("Localized book 2Tim (nd)", 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: 2Tim (nd)", function() {
1496
+ expect(p.parse("2. KuThimothi 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. KuThimothi 1:1'");
1497
+ expect(p.parse("2 KuThimothi 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 KuThimothi 1:1'");
1498
+ expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Ti 1:1'");
1499
+ expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Ti 1:1'");
1500
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1501
+ p.include_apocrypha(false);
1502
+ expect(p.parse("2. KUTHIMOTHI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. KUTHIMOTHI 1:1'");
1503
+ expect(p.parse("2 KUTHIMOTHI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 KUTHIMOTHI 1:1'");
1504
+ expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TI 1:1'");
1505
+ expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TI 1:1'");
1506
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1507
+ });
1508
+ });
1509
+
1510
+ describe("Localized book 1Tim (nd)", 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: 1Tim (nd)", function() {
1524
+ expect(p.parse("kuqala KuThimothi 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'kuqala KuThimothi 1:1'");
1525
+ expect(p.parse("1. KuThimothi 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. KuThimothi 1:1'");
1526
+ expect(p.parse("1 KuThimothi 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 KuThimothi 1:1'");
1527
+ expect(p.parse("kuqala Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'kuqala Ti 1:1'");
1528
+ expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Ti 1:1'");
1529
+ expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Ti 1:1'");
1530
+ expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
1531
+ p.include_apocrypha(false);
1532
+ expect(p.parse("KUQALA KUTHIMOTHI 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'KUQALA KUTHIMOTHI 1:1'");
1533
+ expect(p.parse("1. KUTHIMOTHI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. KUTHIMOTHI 1:1'");
1534
+ expect(p.parse("1 KUTHIMOTHI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 KUTHIMOTHI 1:1'");
1535
+ expect(p.parse("KUQALA TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'KUQALA TI 1:1'");
1536
+ expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TI 1:1'");
1537
+ expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TI 1:1'");
1538
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1539
+ });
1540
+ });
1541
+
1542
+ describe("Localized book Titus (nd)", function() {
1543
+ var p;
1544
+ p = {};
1545
+ beforeEach(function() {
1546
+ p = new bcv_parser();
1547
+ p.set_options({
1548
+ book_alone_strategy: "ignore",
1549
+ book_sequence_strategy: "ignore",
1550
+ osis_compaction_strategy: "bc",
1551
+ captive_end_digits_strategy: "delete"
1552
+ });
1553
+ p.include_apocrypha(true);
1554
+ });
1555
+ it("should handle book: Titus (nd)", function() {
1556
+ expect(p.parse("KuTito 1:1").osis()).toEqual("Titus.1.1", "parsing: 'KuTito 1:1'");
1557
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1558
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1559
+ p.include_apocrypha(false);
1560
+ expect(p.parse("KUTITO 1:1").osis()).toEqual("Titus.1.1", "parsing: 'KUTITO 1:1'");
1561
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1562
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1563
+ });
1564
+ });
1565
+
1566
+ describe("Localized book Phlm (nd)", function() {
1567
+ var p;
1568
+ p = {};
1569
+ beforeEach(function() {
1570
+ p = new bcv_parser();
1571
+ p.set_options({
1572
+ book_alone_strategy: "ignore",
1573
+ book_sequence_strategy: "ignore",
1574
+ osis_compaction_strategy: "bc",
1575
+ captive_end_digits_strategy: "delete"
1576
+ });
1577
+ p.include_apocrypha(true);
1578
+ });
1579
+ it("should handle book: Phlm (nd)", function() {
1580
+ expect(p.parse("KuFilemoni 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'KuFilemoni 1:1'");
1581
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1582
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1583
+ p.include_apocrypha(false);
1584
+ expect(p.parse("KUFILEMONI 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'KUFILEMONI 1:1'");
1585
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1586
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1587
+ });
1588
+ });
1589
+
1590
+ describe("Localized book Heb (nd)", function() {
1591
+ var p;
1592
+ p = {};
1593
+ beforeEach(function() {
1594
+ p = new bcv_parser();
1595
+ p.set_options({
1596
+ book_alone_strategy: "ignore",
1597
+ book_sequence_strategy: "ignore",
1598
+ osis_compaction_strategy: "bc",
1599
+ captive_end_digits_strategy: "delete"
1600
+ });
1601
+ p.include_apocrypha(true);
1602
+ });
1603
+ it("should handle book: Heb (nd)", function() {
1604
+ expect(p.parse("KumaHebheru 1:1").osis()).toEqual("Heb.1.1", "parsing: 'KumaHebheru 1:1'");
1605
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1606
+ p.include_apocrypha(false);
1607
+ expect(p.parse("KUMAHEBHERU 1:1").osis()).toEqual("Heb.1.1", "parsing: 'KUMAHEBHERU 1:1'");
1608
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1609
+ });
1610
+ });
1611
+
1612
+ describe("Localized book Jas (nd)", function() {
1613
+ var p;
1614
+ p = {};
1615
+ beforeEach(function() {
1616
+ p = new bcv_parser();
1617
+ p.set_options({
1618
+ book_alone_strategy: "ignore",
1619
+ book_sequence_strategy: "ignore",
1620
+ osis_compaction_strategy: "bc",
1621
+ captive_end_digits_strategy: "delete"
1622
+ });
1623
+ p.include_apocrypha(true);
1624
+ });
1625
+ it("should handle book: Jas (nd)", function() {
1626
+ expect(p.parse("KuJakobe 1:1").osis()).toEqual("Jas.1.1", "parsing: 'KuJakobe 1:1'");
1627
+ expect(p.parse("Jak 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jak 1:1'");
1628
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1629
+ p.include_apocrypha(false);
1630
+ expect(p.parse("KUJAKOBE 1:1").osis()).toEqual("Jas.1.1", "parsing: 'KUJAKOBE 1:1'");
1631
+ expect(p.parse("JAK 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAK 1:1'");
1632
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1633
+ });
1634
+ });
1635
+
1636
+ describe("Localized book 2Pet (nd)", function() {
1637
+ var p;
1638
+ p = {};
1639
+ beforeEach(function() {
1640
+ p = new bcv_parser();
1641
+ p.set_options({
1642
+ book_alone_strategy: "ignore",
1643
+ book_sequence_strategy: "ignore",
1644
+ osis_compaction_strategy: "bc",
1645
+ captive_end_digits_strategy: "delete"
1646
+ });
1647
+ p.include_apocrypha(true);
1648
+ });
1649
+ it("should handle book: 2Pet (nd)", function() {
1650
+ expect(p.parse("2. KaPetru 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. KaPetru 1:1'");
1651
+ expect(p.parse("2 KaPetru 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 KaPetru 1:1'");
1652
+ expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pe 1:1'");
1653
+ expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pe 1:1'");
1654
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1655
+ p.include_apocrypha(false);
1656
+ expect(p.parse("2. KAPETRU 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. KAPETRU 1:1'");
1657
+ expect(p.parse("2 KAPETRU 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 KAPETRU 1:1'");
1658
+ expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PE 1:1'");
1659
+ expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PE 1:1'");
1660
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1661
+ });
1662
+ });
1663
+
1664
+ describe("Localized book 1Pet (nd)", function() {
1665
+ var p;
1666
+ p = {};
1667
+ beforeEach(function() {
1668
+ p = new bcv_parser();
1669
+ p.set_options({
1670
+ book_alone_strategy: "ignore",
1671
+ book_sequence_strategy: "ignore",
1672
+ osis_compaction_strategy: "bc",
1673
+ captive_end_digits_strategy: "delete"
1674
+ });
1675
+ p.include_apocrypha(true);
1676
+ });
1677
+ it("should handle book: 1Pet (nd)", function() {
1678
+ expect(p.parse("kuqala KaPetru 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'kuqala KaPetru 1:1'");
1679
+ expect(p.parse("1. KaPetru 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. KaPetru 1:1'");
1680
+ expect(p.parse("1 KaPetru 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 KaPetru 1:1'");
1681
+ expect(p.parse("kuqala Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'kuqala Pe 1:1'");
1682
+ expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Pe 1:1'");
1683
+ expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Pe 1:1'");
1684
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1685
+ p.include_apocrypha(false);
1686
+ expect(p.parse("KUQALA KAPETRU 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'KUQALA KAPETRU 1:1'");
1687
+ expect(p.parse("1. KAPETRU 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. KAPETRU 1:1'");
1688
+ expect(p.parse("1 KAPETRU 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 KAPETRU 1:1'");
1689
+ expect(p.parse("KUQALA PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'KUQALA PE 1:1'");
1690
+ expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PE 1:1'");
1691
+ expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PE 1:1'");
1692
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1693
+ });
1694
+ });
1695
+
1696
+ describe("Localized book Jude (nd)", function() {
1697
+ var p;
1698
+ p = {};
1699
+ beforeEach(function() {
1700
+ p = new bcv_parser();
1701
+ p.set_options({
1702
+ book_alone_strategy: "ignore",
1703
+ book_sequence_strategy: "ignore",
1704
+ osis_compaction_strategy: "bc",
1705
+ captive_end_digits_strategy: "delete"
1706
+ });
1707
+ p.include_apocrypha(true);
1708
+ });
1709
+ it("should handle book: Jude (nd)", function() {
1710
+ expect(p.parse("KuJuda 1:1").osis()).toEqual("Jude.1.1", "parsing: 'KuJuda 1:1'");
1711
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1712
+ expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jud 1:1'");
1713
+ p.include_apocrypha(false);
1714
+ expect(p.parse("KUJUDA 1:1").osis()).toEqual("Jude.1.1", "parsing: 'KUJUDA 1:1'");
1715
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1716
+ expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUD 1:1'");
1717
+ });
1718
+ });
1719
+
1720
+ describe("Miscellaneous tests", function() {
1721
+ var p;
1722
+ p = {};
1723
+ beforeEach(function() {
1724
+ p = new bcv_parser();
1725
+ p.set_options({
1726
+ book_alone_strategy: "ignore",
1727
+ book_sequence_strategy: "ignore",
1728
+ osis_compaction_strategy: "bc",
1729
+ captive_end_digits_strategy: "delete"
1730
+ });
1731
+ p.include_apocrypha(true);
1732
+ });
1733
+ it("should return the expected language", function() {
1734
+ expect(p.languages).toEqual(["nd"]);
1735
+ });
1736
+ it("should handle ranges (nd)", function() {
1737
+ expect(p.parse("Titus 1:1 ku 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 ku 2'");
1738
+ expect(p.parse("Matt 1ku2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1ku2'");
1739
+ expect(p.parse("Phlm 2 KU 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 KU 3'");
1740
+ });
1741
+ it("should handle chapters (nd)", function() {
1742
+ expect(p.parse("Titus 1:1, isahluko 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, isahluko 2'");
1743
+ expect(p.parse("Matt 3:4 ISAHLUKO 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 ISAHLUKO 6'");
1744
+ });
1745
+ it("should handle verses (nd)", function() {
1746
+ expect(p.parse("Exod 1:1 ivesi 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 ivesi 3'");
1747
+ expect(p.parse("Phlm IVESI 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm IVESI 6'");
1748
+ });
1749
+ it("should handle 'and' (nd)", function() {
1750
+ expect(p.parse("Exod 1:1 kunye 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 kunye 3'");
1751
+ expect(p.parse("Phlm 2 KUNYE 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 KUNYE 6'");
1752
+ });
1753
+ it("should handle titles (nd)", function() {
1754
+ expect(p.parse("Ps 3 ithayitlela, 4:2, 5:ithayitlela").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 ithayitlela, 4:2, 5:ithayitlela'");
1755
+ expect(p.parse("PS 3 ITHAYITLELA, 4:2, 5:ITHAYITLELA").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 ITHAYITLELA, 4:2, 5:ITHAYITLELA'");
1756
+ });
1757
+ it("should handle 'ff' (nd)", function() {
1758
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1759
+ 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'");
1760
+ });
1761
+ it("should handle translations (nd)", function() {
1762
+ expect(p.parse("Lev 1 (kjv)").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1763
+ expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual([["Lev.1", "kjv"]]);
1764
+ });
1765
+ it("should handle book ranges (nd)", function() {
1766
+ p.set_options({
1767
+ book_alone_strategy: "full",
1768
+ book_range_strategy: "include"
1769
+ });
1770
+ expect(p.parse("1 ku 3 Jo").osis()).toEqual("1John.1-3John.1", "parsing: '1 ku 3 Jo'");
1771
+ });
1772
+ return it("should handle boundaries (nd)", function() {
1773
+ p.set_options({
1774
+ book_alone_strategy: "full"
1775
+ });
1776
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1777
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1778
+ });
1779
+ });
1780
+
1781
+ }).call(this);