bible-ref-parse 3.0.14 → 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 (40) 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/zu.spec.js +2075 -0
  38. package/dist/zu-bcv-parser.js +7236 -0
  39. package/dist/zu-bcv-parser.min.js +1 -0
  40. package/package.json +1 -1
@@ -0,0 +1,1791 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/ny-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (ny)", 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 (ny)", 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 (ny)", 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 (ny)", 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 (ny)", function() {
104
+ expect(p.parse("Ekisodo 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Ekisodo 1:1'");
105
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
106
+ expect(p.parse("Ek 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Ek 1:1'");
107
+ p.include_apocrypha(false);
108
+ expect(p.parse("EKISODO 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EKISODO 1:1'");
109
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
110
+ expect(p.parse("EK 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EK 1:1'");
111
+ });
112
+ });
113
+
114
+ describe("Localized book Lev (ny)", 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 (ny)", function() {
128
+ expect(p.parse("Levitiko 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Levitiko 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("LEVITIKO 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEVITIKO 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 (ny)", 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 (ny)", 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 (ny)", 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 (ny)", function() {
172
+ expect(p.parse("Maliro 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Maliro 1:1'");
173
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
174
+ expect(p.parse("Mlr 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Mlr 1:1'");
175
+ p.include_apocrypha(false);
176
+ expect(p.parse("MALIRO 1:1").osis()).toEqual("Lam.1.1", "parsing: 'MALIRO 1:1'");
177
+ expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
178
+ expect(p.parse("MLR 1:1").osis()).toEqual("Lam.1.1", "parsing: 'MLR 1:1'");
179
+ });
180
+ });
181
+
182
+ describe("Localized book Rev (ny)", 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 (ny)", function() {
196
+ expect(p.parse("Chivumbulutso 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Chivumbulutso 1:1'");
197
+ expect(p.parse("Chi 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Chi 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("CHIVUMBULUTSO 1:1").osis()).toEqual("Rev.1.1", "parsing: 'CHIVUMBULUTSO 1:1'");
201
+ expect(p.parse("CHI 1:1").osis()).toEqual("Rev.1.1", "parsing: 'CHI 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 (ny)", 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 (ny)", function() {
220
+ expect(p.parse("Deuteronomo 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deuteronomo 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("DEUTERONOMO 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUTERONOMO 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 (ny)", 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 (ny)", function() {
244
+ expect(p.parse("Yoswa 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Yoswa 1:1'");
245
+ expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josh 1:1'");
246
+ expect(p.parse("Yos 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Yos 1:1'");
247
+ p.include_apocrypha(false);
248
+ expect(p.parse("YOSWA 1:1").osis()).toEqual("Josh.1.1", "parsing: 'YOSWA 1:1'");
249
+ expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSH 1:1'");
250
+ expect(p.parse("YOS 1:1").osis()).toEqual("Josh.1.1", "parsing: 'YOS 1:1'");
251
+ });
252
+ });
253
+
254
+ describe("Localized book Judg (ny)", 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 (ny)", function() {
268
+ expect(p.parse("Oweruza 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Oweruza 1:1'");
269
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
270
+ expect(p.parse("Owe 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Owe 1:1'");
271
+ p.include_apocrypha(false);
272
+ expect(p.parse("OWERUZA 1:1").osis()).toEqual("Judg.1.1", "parsing: 'OWERUZA 1:1'");
273
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
274
+ expect(p.parse("OWE 1:1").osis()).toEqual("Judg.1.1", "parsing: 'OWE 1:1'");
275
+ });
276
+ });
277
+
278
+ describe("Localized book Ruth (ny)", 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 (ny)", function() {
292
+ expect(p.parse("Rute 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Rute 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("RUTE 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTE 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 (ny)", 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 (ny)", function() {
316
+ expect(p.parse("Yesaya 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Yesaya 1:1'");
317
+ expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Isa 1:1'");
318
+ expect(p.parse("Yes 1:1").osis()).toEqual("Isa.1.1", "parsing: 'Yes 1:1'");
319
+ p.include_apocrypha(false);
320
+ expect(p.parse("YESAYA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YESAYA 1:1'");
321
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
322
+ expect(p.parse("YES 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YES 1:1'");
323
+ });
324
+ });
325
+
326
+ describe("Localized book 2Sam (ny)", function() {
327
+ var p;
328
+ p = {};
329
+ beforeEach(function() {
330
+ p = new bcv_parser();
331
+ p.set_options({
332
+ book_alone_strategy: "ignore",
333
+ book_sequence_strategy: "ignore",
334
+ osis_compaction_strategy: "bc",
335
+ captive_end_digits_strategy: "delete"
336
+ });
337
+ p.include_apocrypha(true);
338
+ });
339
+ it("should handle book: 2Sam (ny)", function() {
340
+ expect(p.parse("2. Samueli 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Samueli 1:1'");
341
+ expect(p.parse("2 Samueli 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Samueli 1:1'");
342
+ expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Sa 1:1'");
343
+ expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Sa 1:1'");
344
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
345
+ p.include_apocrypha(false);
346
+ expect(p.parse("2. SAMUELI 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SAMUELI 1:1'");
347
+ expect(p.parse("2 SAMUELI 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SAMUELI 1:1'");
348
+ expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SA 1:1'");
349
+ expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SA 1:1'");
350
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
351
+ });
352
+ });
353
+
354
+ describe("Localized book 1Sam (ny)", function() {
355
+ var p;
356
+ p = {};
357
+ beforeEach(function() {
358
+ p = new bcv_parser();
359
+ p.set_options({
360
+ book_alone_strategy: "ignore",
361
+ book_sequence_strategy: "ignore",
362
+ osis_compaction_strategy: "bc",
363
+ captive_end_digits_strategy: "delete"
364
+ });
365
+ p.include_apocrypha(true);
366
+ });
367
+ it("should handle book: 1Sam (ny)", function() {
368
+ expect(p.parse("choyamba Samueli 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'choyamba Samueli 1:1'");
369
+ expect(p.parse("choyamba Sa 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'choyamba Sa 1:1'");
370
+ expect(p.parse("1. Samueli 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Samueli 1:1'");
371
+ expect(p.parse("1 Samueli 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Samueli 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
+ p.include_apocrypha(false);
376
+ expect(p.parse("CHOYAMBA SAMUELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'CHOYAMBA SAMUELI 1:1'");
377
+ expect(p.parse("CHOYAMBA SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: 'CHOYAMBA SA 1:1'");
378
+ expect(p.parse("1. SAMUELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAMUELI 1:1'");
379
+ expect(p.parse("1 SAMUELI 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAMUELI 1:1'");
380
+ expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SA 1:1'");
381
+ expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SA 1:1'");
382
+ expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1SAM 1:1'");
383
+ });
384
+ });
385
+
386
+ describe("Localized book 2Kgs (ny)", function() {
387
+ var p;
388
+ p = {};
389
+ beforeEach(function() {
390
+ p = new bcv_parser();
391
+ p.set_options({
392
+ book_alone_strategy: "ignore",
393
+ book_sequence_strategy: "ignore",
394
+ osis_compaction_strategy: "bc",
395
+ captive_end_digits_strategy: "delete"
396
+ });
397
+ p.include_apocrypha(true);
398
+ });
399
+ it("should handle book: 2Kgs (ny)", function() {
400
+ expect(p.parse("2. Mafumu 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Mafumu 1:1'");
401
+ expect(p.parse("2 Mafumu 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Mafumu 1:1'");
402
+ expect(p.parse("2. Ma 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Ma 1:1'");
403
+ expect(p.parse("2 Ma 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Ma 1:1'");
404
+ expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2Kgs 1:1'");
405
+ p.include_apocrypha(false);
406
+ expect(p.parse("2. MAFUMU 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. MAFUMU 1:1'");
407
+ expect(p.parse("2 MAFUMU 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 MAFUMU 1:1'");
408
+ expect(p.parse("2. MA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. MA 1:1'");
409
+ expect(p.parse("2 MA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 MA 1:1'");
410
+ expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2KGS 1:1'");
411
+ });
412
+ });
413
+
414
+ describe("Localized book 1Kgs (ny)", function() {
415
+ var p;
416
+ p = {};
417
+ beforeEach(function() {
418
+ p = new bcv_parser();
419
+ p.set_options({
420
+ book_alone_strategy: "ignore",
421
+ book_sequence_strategy: "ignore",
422
+ osis_compaction_strategy: "bc",
423
+ captive_end_digits_strategy: "delete"
424
+ });
425
+ p.include_apocrypha(true);
426
+ });
427
+ it("should handle book: 1Kgs (ny)", function() {
428
+ expect(p.parse("choyamba Mafumu 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'choyamba Mafumu 1:1'");
429
+ expect(p.parse("choyamba Ma 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'choyamba Ma 1:1'");
430
+ expect(p.parse("1. Mafumu 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Mafumu 1:1'");
431
+ expect(p.parse("1 Mafumu 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Mafumu 1:1'");
432
+ expect(p.parse("1. Ma 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Ma 1:1'");
433
+ expect(p.parse("1 Ma 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Ma 1:1'");
434
+ expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1Kgs 1:1'");
435
+ p.include_apocrypha(false);
436
+ expect(p.parse("CHOYAMBA MAFUMU 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'CHOYAMBA MAFUMU 1:1'");
437
+ expect(p.parse("CHOYAMBA MA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: 'CHOYAMBA MA 1:1'");
438
+ expect(p.parse("1. MAFUMU 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. MAFUMU 1:1'");
439
+ expect(p.parse("1 MAFUMU 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 MAFUMU 1:1'");
440
+ expect(p.parse("1. MA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. MA 1:1'");
441
+ expect(p.parse("1 MA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 MA 1:1'");
442
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
443
+ });
444
+ });
445
+
446
+ describe("Localized book 2Chr (ny)", function() {
447
+ var p;
448
+ p = {};
449
+ beforeEach(function() {
450
+ p = new bcv_parser();
451
+ p.set_options({
452
+ book_alone_strategy: "ignore",
453
+ book_sequence_strategy: "ignore",
454
+ osis_compaction_strategy: "bc",
455
+ captive_end_digits_strategy: "delete"
456
+ });
457
+ p.include_apocrypha(true);
458
+ });
459
+ it("should handle book: 2Chr (ny)", function() {
460
+ expect(p.parse("2. Mbiri 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Mbiri 1:1'");
461
+ expect(p.parse("2 Mbiri 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Mbiri 1:1'");
462
+ expect(p.parse("2. Mb 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Mb 1:1'");
463
+ expect(p.parse("2 Mb 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Mb 1:1'");
464
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
465
+ p.include_apocrypha(false);
466
+ expect(p.parse("2. MBIRI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. MBIRI 1:1'");
467
+ expect(p.parse("2 MBIRI 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 MBIRI 1:1'");
468
+ expect(p.parse("2. MB 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. MB 1:1'");
469
+ expect(p.parse("2 MB 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 MB 1:1'");
470
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
471
+ });
472
+ });
473
+
474
+ describe("Localized book 1Chr (ny)", function() {
475
+ var p;
476
+ p = {};
477
+ beforeEach(function() {
478
+ p = new bcv_parser();
479
+ p.set_options({
480
+ book_alone_strategy: "ignore",
481
+ book_sequence_strategy: "ignore",
482
+ osis_compaction_strategy: "bc",
483
+ captive_end_digits_strategy: "delete"
484
+ });
485
+ p.include_apocrypha(true);
486
+ });
487
+ it("should handle book: 1Chr (ny)", function() {
488
+ expect(p.parse("choyamba Mbiri 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'choyamba Mbiri 1:1'");
489
+ expect(p.parse("choyamba Mb 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'choyamba Mb 1:1'");
490
+ expect(p.parse("1. Mbiri 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Mbiri 1:1'");
491
+ expect(p.parse("1 Mbiri 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Mbiri 1:1'");
492
+ expect(p.parse("1. Mb 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Mb 1:1'");
493
+ expect(p.parse("1 Mb 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Mb 1:1'");
494
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
495
+ p.include_apocrypha(false);
496
+ expect(p.parse("CHOYAMBA MBIRI 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'CHOYAMBA MBIRI 1:1'");
497
+ expect(p.parse("CHOYAMBA MB 1:1").osis()).toEqual("1Chr.1.1", "parsing: 'CHOYAMBA MB 1:1'");
498
+ expect(p.parse("1. MBIRI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. MBIRI 1:1'");
499
+ expect(p.parse("1 MBIRI 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 MBIRI 1:1'");
500
+ expect(p.parse("1. MB 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. MB 1:1'");
501
+ expect(p.parse("1 MB 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 MB 1:1'");
502
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
503
+ });
504
+ });
505
+
506
+ describe("Localized book Ezra (ny)", function() {
507
+ var p;
508
+ p = {};
509
+ beforeEach(function() {
510
+ p = new bcv_parser();
511
+ p.set_options({
512
+ book_alone_strategy: "ignore",
513
+ book_sequence_strategy: "ignore",
514
+ osis_compaction_strategy: "bc",
515
+ captive_end_digits_strategy: "delete"
516
+ });
517
+ p.include_apocrypha(true);
518
+ });
519
+ it("should handle book: Ezra (ny)", function() {
520
+ expect(p.parse("Ezara 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezara 1:1'");
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
+ p.include_apocrypha(false);
524
+ expect(p.parse("EZARA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZARA 1:1'");
525
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
526
+ expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZR 1:1'");
527
+ });
528
+ });
529
+
530
+ describe("Localized book Neh (ny)", function() {
531
+ var p;
532
+ p = {};
533
+ beforeEach(function() {
534
+ p = new bcv_parser();
535
+ p.set_options({
536
+ book_alone_strategy: "ignore",
537
+ book_sequence_strategy: "ignore",
538
+ osis_compaction_strategy: "bc",
539
+ captive_end_digits_strategy: "delete"
540
+ });
541
+ p.include_apocrypha(true);
542
+ });
543
+ it("should handle book: Neh (ny)", function() {
544
+ expect(p.parse("Nehemiya 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehemiya 1:1'");
545
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
546
+ p.include_apocrypha(false);
547
+ expect(p.parse("NEHEMIYA 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEMIYA 1:1'");
548
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
549
+ });
550
+ });
551
+
552
+ describe("Localized book Esth (ny)", function() {
553
+ var p;
554
+ p = {};
555
+ beforeEach(function() {
556
+ p = new bcv_parser();
557
+ p.set_options({
558
+ book_alone_strategy: "ignore",
559
+ book_sequence_strategy: "ignore",
560
+ osis_compaction_strategy: "bc",
561
+ captive_end_digits_strategy: "delete"
562
+ });
563
+ p.include_apocrypha(true);
564
+ });
565
+ it("should handle book: Esth (ny)", function() {
566
+ expect(p.parse("Esteri 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esteri 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
+ p.include_apocrypha(false);
570
+ expect(p.parse("ESTERI 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTERI 1:1'");
571
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
572
+ expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1", "parsing: 'EST 1:1'");
573
+ });
574
+ });
575
+
576
+ describe("Localized book Job (ny)", function() {
577
+ var p;
578
+ p = {};
579
+ beforeEach(function() {
580
+ p = new bcv_parser();
581
+ p.set_options({
582
+ book_alone_strategy: "ignore",
583
+ book_sequence_strategy: "ignore",
584
+ osis_compaction_strategy: "bc",
585
+ captive_end_digits_strategy: "delete"
586
+ });
587
+ p.include_apocrypha(true);
588
+ });
589
+ it("should handle book: Job (ny)", function() {
590
+ expect(p.parse("Yobu 1:1").osis()).toEqual("Job.1.1", "parsing: 'Yobu 1:1'");
591
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
592
+ expect(p.parse("Yob 1:1").osis()).toEqual("Job.1.1", "parsing: 'Yob 1:1'");
593
+ p.include_apocrypha(false);
594
+ expect(p.parse("YOBU 1:1").osis()).toEqual("Job.1.1", "parsing: 'YOBU 1:1'");
595
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
596
+ expect(p.parse("YOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'YOB 1:1'");
597
+ });
598
+ });
599
+
600
+ describe("Localized book Ps (ny)", function() {
601
+ var p;
602
+ p = {};
603
+ beforeEach(function() {
604
+ p = new bcv_parser();
605
+ p.set_options({
606
+ book_alone_strategy: "ignore",
607
+ book_sequence_strategy: "ignore",
608
+ osis_compaction_strategy: "bc",
609
+ captive_end_digits_strategy: "delete"
610
+ });
611
+ p.include_apocrypha(true);
612
+ });
613
+ it("should handle book: Ps (ny)", function() {
614
+ expect(p.parse("Masalimo 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Masalimo 1:1'");
615
+ expect(p.parse("Mas 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Mas 1:1'");
616
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
617
+ p.include_apocrypha(false);
618
+ expect(p.parse("MASALIMO 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MASALIMO 1:1'");
619
+ expect(p.parse("MAS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MAS 1:1'");
620
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
621
+ });
622
+ });
623
+
624
+ describe("Localized book Prov (ny)", function() {
625
+ var p;
626
+ p = {};
627
+ beforeEach(function() {
628
+ p = new bcv_parser();
629
+ p.set_options({
630
+ book_alone_strategy: "ignore",
631
+ book_sequence_strategy: "ignore",
632
+ osis_compaction_strategy: "bc",
633
+ captive_end_digits_strategy: "delete"
634
+ });
635
+ p.include_apocrypha(true);
636
+ });
637
+ it("should handle book: Prov (ny)", function() {
638
+ expect(p.parse("Miyambo 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Miyambo 1:1'");
639
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
640
+ expect(p.parse("Miy 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Miy 1:1'");
641
+ p.include_apocrypha(false);
642
+ expect(p.parse("MIYAMBO 1:1").osis()).toEqual("Prov.1.1", "parsing: 'MIYAMBO 1:1'");
643
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
644
+ expect(p.parse("MIY 1:1").osis()).toEqual("Prov.1.1", "parsing: 'MIY 1:1'");
645
+ });
646
+ });
647
+
648
+ describe("Localized book Eccl (ny)", function() {
649
+ var p;
650
+ p = {};
651
+ beforeEach(function() {
652
+ p = new bcv_parser();
653
+ p.set_options({
654
+ book_alone_strategy: "ignore",
655
+ book_sequence_strategy: "ignore",
656
+ osis_compaction_strategy: "bc",
657
+ captive_end_digits_strategy: "delete"
658
+ });
659
+ p.include_apocrypha(true);
660
+ });
661
+ it("should handle book: Eccl (ny)", function() {
662
+ expect(p.parse("Mlaliki 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Mlaliki 1:1'");
663
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
664
+ expect(p.parse("Mla 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Mla 1:1'");
665
+ p.include_apocrypha(false);
666
+ expect(p.parse("MLALIKI 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'MLALIKI 1:1'");
667
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
668
+ expect(p.parse("MLA 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'MLA 1:1'");
669
+ });
670
+ });
671
+
672
+ describe("Localized book Song (ny)", function() {
673
+ var p;
674
+ p = {};
675
+ beforeEach(function() {
676
+ p = new bcv_parser();
677
+ p.set_options({
678
+ book_alone_strategy: "ignore",
679
+ book_sequence_strategy: "ignore",
680
+ osis_compaction_strategy: "bc",
681
+ captive_end_digits_strategy: "delete"
682
+ });
683
+ p.include_apocrypha(true);
684
+ });
685
+ it("should handle book: Song (ny)", function() {
686
+ expect(p.parse("Nyimbo za Salomo 1:1").osis()).toEqual("Song.1.1", "parsing: 'Nyimbo za Salomo 1:1'");
687
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
688
+ expect(p.parse("Nyi 1:1").osis()).toEqual("Song.1.1", "parsing: 'Nyi 1:1'");
689
+ p.include_apocrypha(false);
690
+ expect(p.parse("NYIMBO ZA SALOMO 1:1").osis()).toEqual("Song.1.1", "parsing: 'NYIMBO ZA SALOMO 1:1'");
691
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
692
+ expect(p.parse("NYI 1:1").osis()).toEqual("Song.1.1", "parsing: 'NYI 1:1'");
693
+ });
694
+ });
695
+
696
+ describe("Localized book Jer (ny)", function() {
697
+ var p;
698
+ p = {};
699
+ beforeEach(function() {
700
+ p = new bcv_parser();
701
+ p.set_options({
702
+ book_alone_strategy: "ignore",
703
+ book_sequence_strategy: "ignore",
704
+ osis_compaction_strategy: "bc",
705
+ captive_end_digits_strategy: "delete"
706
+ });
707
+ p.include_apocrypha(true);
708
+ });
709
+ it("should handle book: Jer (ny)", function() {
710
+ expect(p.parse("Yeremiya 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yeremiya 1:1'");
711
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
712
+ expect(p.parse("Yer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yer 1:1'");
713
+ p.include_apocrypha(false);
714
+ expect(p.parse("YEREMIYA 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YEREMIYA 1:1'");
715
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
716
+ expect(p.parse("YER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YER 1:1'");
717
+ });
718
+ });
719
+
720
+ describe("Localized book Ezek (ny)", function() {
721
+ var p;
722
+ p = {};
723
+ beforeEach(function() {
724
+ p = new bcv_parser();
725
+ p.set_options({
726
+ book_alone_strategy: "ignore",
727
+ book_sequence_strategy: "ignore",
728
+ osis_compaction_strategy: "bc",
729
+ captive_end_digits_strategy: "delete"
730
+ });
731
+ p.include_apocrypha(true);
732
+ });
733
+ it("should handle book: Ezek (ny)", function() {
734
+ expect(p.parse("Ezekieli 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezekieli 1:1'");
735
+ expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
736
+ expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Eze 1:1'");
737
+ p.include_apocrypha(false);
738
+ expect(p.parse("EZEKIELI 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEKIELI 1:1'");
739
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
740
+ expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZE 1:1'");
741
+ });
742
+ });
743
+
744
+ describe("Localized book Dan (ny)", 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: Dan (ny)", function() {
758
+ expect(p.parse("Danieli 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Danieli 1:1'");
759
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
760
+ p.include_apocrypha(false);
761
+ expect(p.parse("DANIELI 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DANIELI 1:1'");
762
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
763
+ });
764
+ });
765
+
766
+ describe("Localized book Hos (ny)", function() {
767
+ var p;
768
+ p = {};
769
+ beforeEach(function() {
770
+ p = new bcv_parser();
771
+ p.set_options({
772
+ book_alone_strategy: "ignore",
773
+ book_sequence_strategy: "ignore",
774
+ osis_compaction_strategy: "bc",
775
+ captive_end_digits_strategy: "delete"
776
+ });
777
+ p.include_apocrypha(true);
778
+ });
779
+ it("should handle book: Hos (ny)", function() {
780
+ expect(p.parse("Hoseya 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hoseya 1:1'");
781
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
782
+ p.include_apocrypha(false);
783
+ expect(p.parse("HOSEYA 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOSEYA 1:1'");
784
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
785
+ });
786
+ });
787
+
788
+ describe("Localized book Joel (ny)", function() {
789
+ var p;
790
+ p = {};
791
+ beforeEach(function() {
792
+ p = new bcv_parser();
793
+ p.set_options({
794
+ book_alone_strategy: "ignore",
795
+ book_sequence_strategy: "ignore",
796
+ osis_compaction_strategy: "bc",
797
+ captive_end_digits_strategy: "delete"
798
+ });
799
+ p.include_apocrypha(true);
800
+ });
801
+ it("should handle book: Joel (ny)", function() {
802
+ expect(p.parse("Yoweli 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Yoweli 1:1'");
803
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
804
+ expect(p.parse("Yow 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Yow 1:1'");
805
+ p.include_apocrypha(false);
806
+ expect(p.parse("YOWELI 1:1").osis()).toEqual("Joel.1.1", "parsing: 'YOWELI 1:1'");
807
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
808
+ expect(p.parse("YOW 1:1").osis()).toEqual("Joel.1.1", "parsing: 'YOW 1:1'");
809
+ });
810
+ });
811
+
812
+ describe("Localized book Amos (ny)", function() {
813
+ var p;
814
+ p = {};
815
+ beforeEach(function() {
816
+ p = new bcv_parser();
817
+ p.set_options({
818
+ book_alone_strategy: "ignore",
819
+ book_sequence_strategy: "ignore",
820
+ osis_compaction_strategy: "bc",
821
+ captive_end_digits_strategy: "delete"
822
+ });
823
+ p.include_apocrypha(true);
824
+ });
825
+ it("should handle book: Amos (ny)", function() {
826
+ expect(p.parse("Amosi 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amosi 1:1'");
827
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
828
+ expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amo 1:1'");
829
+ p.include_apocrypha(false);
830
+ expect(p.parse("AMOSI 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOSI 1:1'");
831
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
832
+ expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMO 1:1'");
833
+ });
834
+ });
835
+
836
+ describe("Localized book Obad (ny)", function() {
837
+ var p;
838
+ p = {};
839
+ beforeEach(function() {
840
+ p = new bcv_parser();
841
+ p.set_options({
842
+ book_alone_strategy: "ignore",
843
+ book_sequence_strategy: "ignore",
844
+ osis_compaction_strategy: "bc",
845
+ captive_end_digits_strategy: "delete"
846
+ });
847
+ p.include_apocrypha(true);
848
+ });
849
+ it("should handle book: Obad (ny)", function() {
850
+ expect(p.parse("Obadiya 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obadiya 1:1'");
851
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
852
+ expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Oba 1:1'");
853
+ p.include_apocrypha(false);
854
+ expect(p.parse("OBADIYA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBADIYA 1:1'");
855
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
856
+ expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBA 1:1'");
857
+ });
858
+ });
859
+
860
+ describe("Localized book Jonah (ny)", function() {
861
+ var p;
862
+ p = {};
863
+ beforeEach(function() {
864
+ p = new bcv_parser();
865
+ p.set_options({
866
+ book_alone_strategy: "ignore",
867
+ book_sequence_strategy: "ignore",
868
+ osis_compaction_strategy: "bc",
869
+ captive_end_digits_strategy: "delete"
870
+ });
871
+ p.include_apocrypha(true);
872
+ });
873
+ it("should handle book: Jonah (ny)", function() {
874
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
875
+ expect(p.parse("Yona 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yona 1:1'");
876
+ expect(p.parse("Yon 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yon 1:1'");
877
+ p.include_apocrypha(false);
878
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
879
+ expect(p.parse("YONA 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YONA 1:1'");
880
+ expect(p.parse("YON 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YON 1:1'");
881
+ });
882
+ });
883
+
884
+ describe("Localized book Mic (ny)", function() {
885
+ var p;
886
+ p = {};
887
+ beforeEach(function() {
888
+ p = new bcv_parser();
889
+ p.set_options({
890
+ book_alone_strategy: "ignore",
891
+ book_sequence_strategy: "ignore",
892
+ osis_compaction_strategy: "bc",
893
+ captive_end_digits_strategy: "delete"
894
+ });
895
+ p.include_apocrypha(true);
896
+ });
897
+ it("should handle book: Mic (ny)", function() {
898
+ expect(p.parse("Mika 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mika 1:1'");
899
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
900
+ expect(p.parse("Mik 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mik 1:1'");
901
+ p.include_apocrypha(false);
902
+ expect(p.parse("MIKA 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIKA 1:1'");
903
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
904
+ expect(p.parse("MIK 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIK 1:1'");
905
+ });
906
+ });
907
+
908
+ describe("Localized book Nah (ny)", 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: Nah (ny)", function() {
922
+ expect(p.parse("Nahumu 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nahumu 1:1'");
923
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
924
+ p.include_apocrypha(false);
925
+ expect(p.parse("NAHUMU 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAHUMU 1:1'");
926
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
927
+ });
928
+ });
929
+
930
+ describe("Localized book Hab (ny)", 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: Hab (ny)", function() {
944
+ expect(p.parse("Habakuku 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Habakuku 1:1'");
945
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
946
+ p.include_apocrypha(false);
947
+ expect(p.parse("HABAKUKU 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HABAKUKU 1:1'");
948
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
949
+ });
950
+ });
951
+
952
+ describe("Localized book Zeph (ny)", function() {
953
+ var p;
954
+ p = {};
955
+ beforeEach(function() {
956
+ p = new bcv_parser();
957
+ p.set_options({
958
+ book_alone_strategy: "ignore",
959
+ book_sequence_strategy: "ignore",
960
+ osis_compaction_strategy: "bc",
961
+ captive_end_digits_strategy: "delete"
962
+ });
963
+ p.include_apocrypha(true);
964
+ });
965
+ it("should handle book: Zeph (ny)", function() {
966
+ expect(p.parse("Zefaniya 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zefaniya 1:1'");
967
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
968
+ expect(p.parse("Zef 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zef 1:1'");
969
+ p.include_apocrypha(false);
970
+ expect(p.parse("ZEFANIYA 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEFANIYA 1:1'");
971
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
972
+ expect(p.parse("ZEF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEF 1:1'");
973
+ });
974
+ });
975
+
976
+ describe("Localized book Hag (ny)", 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: Hag (ny)", function() {
990
+ expect(p.parse("Hagayi 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hagayi 1:1'");
991
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
992
+ p.include_apocrypha(false);
993
+ expect(p.parse("HAGAYI 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAGAYI 1:1'");
994
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
995
+ });
996
+ });
997
+
998
+ describe("Localized book Zech (ny)", function() {
999
+ var p;
1000
+ p = {};
1001
+ beforeEach(function() {
1002
+ p = new bcv_parser();
1003
+ p.set_options({
1004
+ book_alone_strategy: "ignore",
1005
+ book_sequence_strategy: "ignore",
1006
+ osis_compaction_strategy: "bc",
1007
+ captive_end_digits_strategy: "delete"
1008
+ });
1009
+ p.include_apocrypha(true);
1010
+ });
1011
+ it("should handle book: Zech (ny)", function() {
1012
+ expect(p.parse("Zekariya 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zekariya 1:1'");
1013
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
1014
+ expect(p.parse("Zek 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zek 1:1'");
1015
+ p.include_apocrypha(false);
1016
+ expect(p.parse("ZEKARIYA 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZEKARIYA 1:1'");
1017
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1018
+ expect(p.parse("ZEK 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZEK 1:1'");
1019
+ });
1020
+ });
1021
+
1022
+ describe("Localized book Mal (ny)", 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: Mal (ny)", function() {
1036
+ expect(p.parse("Malaki 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Malaki 1:1'");
1037
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1038
+ p.include_apocrypha(false);
1039
+ expect(p.parse("MALAKI 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MALAKI 1:1'");
1040
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1041
+ });
1042
+ });
1043
+
1044
+ describe("Localized book Matt (ny)", function() {
1045
+ var p;
1046
+ p = {};
1047
+ beforeEach(function() {
1048
+ p = new bcv_parser();
1049
+ p.set_options({
1050
+ book_alone_strategy: "ignore",
1051
+ book_sequence_strategy: "ignore",
1052
+ osis_compaction_strategy: "bc",
1053
+ captive_end_digits_strategy: "delete"
1054
+ });
1055
+ p.include_apocrypha(true);
1056
+ });
1057
+ it("should handle book: Matt (ny)", function() {
1058
+ expect(p.parse("Mateyu 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mateyu 1:1'");
1059
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1060
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1061
+ p.include_apocrypha(false);
1062
+ expect(p.parse("MATEYU 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATEYU 1:1'");
1063
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1064
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1065
+ });
1066
+ });
1067
+
1068
+ describe("Localized book Mark (ny)", function() {
1069
+ var p;
1070
+ p = {};
1071
+ beforeEach(function() {
1072
+ p = new bcv_parser();
1073
+ p.set_options({
1074
+ book_alone_strategy: "ignore",
1075
+ book_sequence_strategy: "ignore",
1076
+ osis_compaction_strategy: "bc",
1077
+ captive_end_digits_strategy: "delete"
1078
+ });
1079
+ p.include_apocrypha(true);
1080
+ });
1081
+ it("should handle book: Mark (ny)", function() {
1082
+ expect(p.parse("Maliko 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Maliko 1:1'");
1083
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1084
+ expect(p.parse("Mlk 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mlk 1:1'");
1085
+ p.include_apocrypha(false);
1086
+ expect(p.parse("MALIKO 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MALIKO 1:1'");
1087
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1088
+ expect(p.parse("MLK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MLK 1:1'");
1089
+ });
1090
+ });
1091
+
1092
+ describe("Localized book Luke (ny)", function() {
1093
+ var p;
1094
+ p = {};
1095
+ beforeEach(function() {
1096
+ p = new bcv_parser();
1097
+ p.set_options({
1098
+ book_alone_strategy: "ignore",
1099
+ book_sequence_strategy: "ignore",
1100
+ osis_compaction_strategy: "bc",
1101
+ captive_end_digits_strategy: "delete"
1102
+ });
1103
+ p.include_apocrypha(true);
1104
+ });
1105
+ it("should handle book: Luke (ny)", function() {
1106
+ expect(p.parse("Luka 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luka 1:1'");
1107
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1108
+ expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luk 1:1'");
1109
+ p.include_apocrypha(false);
1110
+ expect(p.parse("LUKA 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKA 1:1'");
1111
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1112
+ expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUK 1:1'");
1113
+ });
1114
+ });
1115
+
1116
+ describe("Localized book 1John (ny)", function() {
1117
+ var p;
1118
+ p = {};
1119
+ beforeEach(function() {
1120
+ p = new bcv_parser();
1121
+ p.set_options({
1122
+ book_alone_strategy: "ignore",
1123
+ book_sequence_strategy: "ignore",
1124
+ osis_compaction_strategy: "bc",
1125
+ captive_end_digits_strategy: "delete"
1126
+ });
1127
+ p.include_apocrypha(true);
1128
+ });
1129
+ it("should handle book: 1John (ny)", function() {
1130
+ expect(p.parse("choyamba Yohane 1:1").osis()).toEqual("1John.1.1", "parsing: 'choyamba Yohane 1:1'");
1131
+ expect(p.parse("choyamba Yo 1:1").osis()).toEqual("1John.1.1", "parsing: 'choyamba Yo 1:1'");
1132
+ expect(p.parse("1. Yohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yohane 1:1'");
1133
+ expect(p.parse("1 Yohane 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yohane 1:1'");
1134
+ expect(p.parse("1. Yo 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yo 1:1'");
1135
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1136
+ expect(p.parse("1 Yo 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yo 1:1'");
1137
+ p.include_apocrypha(false);
1138
+ expect(p.parse("CHOYAMBA YOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: 'CHOYAMBA YOHANE 1:1'");
1139
+ expect(p.parse("CHOYAMBA YO 1:1").osis()).toEqual("1John.1.1", "parsing: 'CHOYAMBA YO 1:1'");
1140
+ expect(p.parse("1. YOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YOHANE 1:1'");
1141
+ expect(p.parse("1 YOHANE 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YOHANE 1:1'");
1142
+ expect(p.parse("1. YO 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YO 1:1'");
1143
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1144
+ expect(p.parse("1 YO 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YO 1:1'");
1145
+ });
1146
+ });
1147
+
1148
+ describe("Localized book 2John (ny)", function() {
1149
+ var p;
1150
+ p = {};
1151
+ beforeEach(function() {
1152
+ p = new bcv_parser();
1153
+ p.set_options({
1154
+ book_alone_strategy: "ignore",
1155
+ book_sequence_strategy: "ignore",
1156
+ osis_compaction_strategy: "bc",
1157
+ captive_end_digits_strategy: "delete"
1158
+ });
1159
+ p.include_apocrypha(true);
1160
+ });
1161
+ it("should handle book: 2John (ny)", function() {
1162
+ expect(p.parse("2. Yohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yohane 1:1'");
1163
+ expect(p.parse("2 Yohane 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yohane 1:1'");
1164
+ expect(p.parse("2. Yo 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yo 1:1'");
1165
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1166
+ expect(p.parse("2 Yo 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yo 1:1'");
1167
+ p.include_apocrypha(false);
1168
+ expect(p.parse("2. YOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YOHANE 1:1'");
1169
+ expect(p.parse("2 YOHANE 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YOHANE 1:1'");
1170
+ expect(p.parse("2. YO 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YO 1:1'");
1171
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1172
+ expect(p.parse("2 YO 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YO 1:1'");
1173
+ });
1174
+ });
1175
+
1176
+ describe("Localized book 3John (ny)", function() {
1177
+ var p;
1178
+ p = {};
1179
+ beforeEach(function() {
1180
+ p = new bcv_parser();
1181
+ p.set_options({
1182
+ book_alone_strategy: "ignore",
1183
+ book_sequence_strategy: "ignore",
1184
+ osis_compaction_strategy: "bc",
1185
+ captive_end_digits_strategy: "delete"
1186
+ });
1187
+ p.include_apocrypha(true);
1188
+ });
1189
+ it("should handle book: 3John (ny)", function() {
1190
+ expect(p.parse("3. Yohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yohane 1:1'");
1191
+ expect(p.parse("3 Yohane 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yohane 1:1'");
1192
+ expect(p.parse("3. Yo 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yo 1:1'");
1193
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1194
+ expect(p.parse("3 Yo 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yo 1:1'");
1195
+ p.include_apocrypha(false);
1196
+ expect(p.parse("3. YOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YOHANE 1:1'");
1197
+ expect(p.parse("3 YOHANE 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YOHANE 1:1'");
1198
+ expect(p.parse("3. YO 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YO 1:1'");
1199
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1200
+ expect(p.parse("3 YO 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YO 1:1'");
1201
+ });
1202
+ });
1203
+
1204
+ describe("Localized book John (ny)", function() {
1205
+ var p;
1206
+ p = {};
1207
+ beforeEach(function() {
1208
+ p = new bcv_parser();
1209
+ p.set_options({
1210
+ book_alone_strategy: "ignore",
1211
+ book_sequence_strategy: "ignore",
1212
+ osis_compaction_strategy: "bc",
1213
+ captive_end_digits_strategy: "delete"
1214
+ });
1215
+ p.include_apocrypha(true);
1216
+ });
1217
+ it("should handle book: John (ny)", function() {
1218
+ expect(p.parse("Yohane 1:1").osis()).toEqual("John.1.1", "parsing: 'Yohane 1:1'");
1219
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1220
+ expect(p.parse("Yoh 1:1").osis()).toEqual("John.1.1", "parsing: 'Yoh 1:1'");
1221
+ p.include_apocrypha(false);
1222
+ expect(p.parse("YOHANE 1:1").osis()).toEqual("John.1.1", "parsing: 'YOHANE 1:1'");
1223
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1224
+ expect(p.parse("YOH 1:1").osis()).toEqual("John.1.1", "parsing: 'YOH 1:1'");
1225
+ });
1226
+ });
1227
+
1228
+ describe("Localized book Acts (ny)", function() {
1229
+ var p;
1230
+ p = {};
1231
+ beforeEach(function() {
1232
+ p = new bcv_parser();
1233
+ p.set_options({
1234
+ book_alone_strategy: "ignore",
1235
+ book_sequence_strategy: "ignore",
1236
+ osis_compaction_strategy: "bc",
1237
+ captive_end_digits_strategy: "delete"
1238
+ });
1239
+ p.include_apocrypha(true);
1240
+ });
1241
+ it("should handle book: Acts (ny)", function() {
1242
+ expect(p.parse("Machitidwe 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Machitidwe 1:1'");
1243
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1244
+ expect(p.parse("Mac 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Mac 1:1'");
1245
+ p.include_apocrypha(false);
1246
+ expect(p.parse("MACHITIDWE 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MACHITIDWE 1:1'");
1247
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1248
+ expect(p.parse("MAC 1:1").osis()).toEqual("Acts.1.1", "parsing: 'MAC 1:1'");
1249
+ });
1250
+ });
1251
+
1252
+ describe("Localized book Rom (ny)", function() {
1253
+ var p;
1254
+ p = {};
1255
+ beforeEach(function() {
1256
+ p = new bcv_parser();
1257
+ p.set_options({
1258
+ book_alone_strategy: "ignore",
1259
+ book_sequence_strategy: "ignore",
1260
+ osis_compaction_strategy: "bc",
1261
+ captive_end_digits_strategy: "delete"
1262
+ });
1263
+ p.include_apocrypha(true);
1264
+ });
1265
+ it("should handle book: Rom (ny)", function() {
1266
+ expect(p.parse("Aroma 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Aroma 1:1'");
1267
+ expect(p.parse("Aro 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Aro 1:1'");
1268
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1269
+ p.include_apocrypha(false);
1270
+ expect(p.parse("AROMA 1:1").osis()).toEqual("Rom.1.1", "parsing: 'AROMA 1:1'");
1271
+ expect(p.parse("ARO 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ARO 1:1'");
1272
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1273
+ });
1274
+ });
1275
+
1276
+ describe("Localized book 2Cor (ny)", 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: 2Cor (ny)", function() {
1290
+ expect(p.parse("2. Akorinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Akorinto 1:1'");
1291
+ expect(p.parse("2 Akorinto 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Akorinto 1:1'");
1292
+ expect(p.parse("2. Ko 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Ko 1:1'");
1293
+ expect(p.parse("2 Ko 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Ko 1:1'");
1294
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1295
+ p.include_apocrypha(false);
1296
+ expect(p.parse("2. AKORINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. AKORINTO 1:1'");
1297
+ expect(p.parse("2 AKORINTO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 AKORINTO 1:1'");
1298
+ expect(p.parse("2. KO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KO 1:1'");
1299
+ expect(p.parse("2 KO 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KO 1:1'");
1300
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1301
+ });
1302
+ });
1303
+
1304
+ describe("Localized book 1Cor (ny)", 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: 1Cor (ny)", function() {
1318
+ expect(p.parse("choyamba Akorinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'choyamba Akorinto 1:1'");
1319
+ expect(p.parse("1. Akorinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Akorinto 1:1'");
1320
+ expect(p.parse("choyamba Ko 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'choyamba Ko 1:1'");
1321
+ expect(p.parse("1 Akorinto 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Akorinto 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
+ p.include_apocrypha(false);
1326
+ expect(p.parse("CHOYAMBA AKORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'CHOYAMBA AKORINTO 1:1'");
1327
+ expect(p.parse("1. AKORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. AKORINTO 1:1'");
1328
+ expect(p.parse("CHOYAMBA KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: 'CHOYAMBA KO 1:1'");
1329
+ expect(p.parse("1 AKORINTO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 AKORINTO 1:1'");
1330
+ expect(p.parse("1. KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KO 1:1'");
1331
+ expect(p.parse("1 KO 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KO 1:1'");
1332
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1333
+ });
1334
+ });
1335
+
1336
+ describe("Localized book Gal (ny)", function() {
1337
+ var p;
1338
+ p = {};
1339
+ beforeEach(function() {
1340
+ p = new bcv_parser();
1341
+ p.set_options({
1342
+ book_alone_strategy: "ignore",
1343
+ book_sequence_strategy: "ignore",
1344
+ osis_compaction_strategy: "bc",
1345
+ captive_end_digits_strategy: "delete"
1346
+ });
1347
+ p.include_apocrypha(true);
1348
+ });
1349
+ it("should handle book: Gal (ny)", function() {
1350
+ expect(p.parse("Agalatiya 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Agalatiya 1:1'");
1351
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1352
+ p.include_apocrypha(false);
1353
+ expect(p.parse("AGALATIYA 1:1").osis()).toEqual("Gal.1.1", "parsing: 'AGALATIYA 1:1'");
1354
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1355
+ });
1356
+ });
1357
+
1358
+ describe("Localized book Eph (ny)", function() {
1359
+ var p;
1360
+ p = {};
1361
+ beforeEach(function() {
1362
+ p = new bcv_parser();
1363
+ p.set_options({
1364
+ book_alone_strategy: "ignore",
1365
+ book_sequence_strategy: "ignore",
1366
+ osis_compaction_strategy: "bc",
1367
+ captive_end_digits_strategy: "delete"
1368
+ });
1369
+ p.include_apocrypha(true);
1370
+ });
1371
+ it("should handle book: Eph (ny)", function() {
1372
+ expect(p.parse("Aefeso 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Aefeso 1:1'");
1373
+ expect(p.parse("Efe 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efe 1:1'");
1374
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1375
+ p.include_apocrypha(false);
1376
+ expect(p.parse("AEFESO 1:1").osis()).toEqual("Eph.1.1", "parsing: 'AEFESO 1:1'");
1377
+ expect(p.parse("EFE 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFE 1:1'");
1378
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1379
+ });
1380
+ });
1381
+
1382
+ describe("Localized book Phil (ny)", function() {
1383
+ var p;
1384
+ p = {};
1385
+ beforeEach(function() {
1386
+ p = new bcv_parser();
1387
+ p.set_options({
1388
+ book_alone_strategy: "ignore",
1389
+ book_sequence_strategy: "ignore",
1390
+ osis_compaction_strategy: "bc",
1391
+ captive_end_digits_strategy: "delete"
1392
+ });
1393
+ p.include_apocrypha(true);
1394
+ });
1395
+ it("should handle book: Phil (ny)", function() {
1396
+ expect(p.parse("Afilipi 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Afilipi 1:1'");
1397
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1398
+ expect(p.parse("Fil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Fil 1:1'");
1399
+ p.include_apocrypha(false);
1400
+ expect(p.parse("AFILIPI 1:1").osis()).toEqual("Phil.1.1", "parsing: 'AFILIPI 1:1'");
1401
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1402
+ expect(p.parse("FIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FIL 1:1'");
1403
+ });
1404
+ });
1405
+
1406
+ describe("Localized book Col (ny)", function() {
1407
+ var p;
1408
+ p = {};
1409
+ beforeEach(function() {
1410
+ p = new bcv_parser();
1411
+ p.set_options({
1412
+ book_alone_strategy: "ignore",
1413
+ book_sequence_strategy: "ignore",
1414
+ osis_compaction_strategy: "bc",
1415
+ captive_end_digits_strategy: "delete"
1416
+ });
1417
+ p.include_apocrypha(true);
1418
+ });
1419
+ it("should handle book: Col (ny)", function() {
1420
+ expect(p.parse("Akolose 1:1").osis()).toEqual("Col.1.1", "parsing: 'Akolose 1:1'");
1421
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1422
+ expect(p.parse("Kol 1:1").osis()).toEqual("Col.1.1", "parsing: 'Kol 1:1'");
1423
+ p.include_apocrypha(false);
1424
+ expect(p.parse("AKOLOSE 1:1").osis()).toEqual("Col.1.1", "parsing: 'AKOLOSE 1:1'");
1425
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1426
+ expect(p.parse("KOL 1:1").osis()).toEqual("Col.1.1", "parsing: 'KOL 1:1'");
1427
+ });
1428
+ });
1429
+
1430
+ describe("Localized book 2Thess (ny)", function() {
1431
+ var p;
1432
+ p = {};
1433
+ beforeEach(function() {
1434
+ p = new bcv_parser();
1435
+ p.set_options({
1436
+ book_alone_strategy: "ignore",
1437
+ book_sequence_strategy: "ignore",
1438
+ osis_compaction_strategy: "bc",
1439
+ captive_end_digits_strategy: "delete"
1440
+ });
1441
+ p.include_apocrypha(true);
1442
+ });
1443
+ it("should handle book: 2Thess (ny)", function() {
1444
+ expect(p.parse("2. Atesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Atesalonika 1:1'");
1445
+ expect(p.parse("2 Atesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Atesalonika 1:1'");
1446
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1447
+ expect(p.parse("2. Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Te 1:1'");
1448
+ expect(p.parse("2 Te 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Te 1:1'");
1449
+ p.include_apocrypha(false);
1450
+ expect(p.parse("2. ATESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. ATESALONIKA 1:1'");
1451
+ expect(p.parse("2 ATESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 ATESALONIKA 1:1'");
1452
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1453
+ expect(p.parse("2. TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TE 1:1'");
1454
+ expect(p.parse("2 TE 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TE 1:1'");
1455
+ });
1456
+ });
1457
+
1458
+ describe("Localized book 1Thess (ny)", function() {
1459
+ var p;
1460
+ p = {};
1461
+ beforeEach(function() {
1462
+ p = new bcv_parser();
1463
+ p.set_options({
1464
+ book_alone_strategy: "ignore",
1465
+ book_sequence_strategy: "ignore",
1466
+ osis_compaction_strategy: "bc",
1467
+ captive_end_digits_strategy: "delete"
1468
+ });
1469
+ p.include_apocrypha(true);
1470
+ });
1471
+ it("should handle book: 1Thess (ny)", function() {
1472
+ expect(p.parse("choyamba Atesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'choyamba Atesalonika 1:1'");
1473
+ expect(p.parse("1. Atesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Atesalonika 1:1'");
1474
+ expect(p.parse("1 Atesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Atesalonika 1:1'");
1475
+ expect(p.parse("choyamba Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'choyamba Te 1:1'");
1476
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1477
+ expect(p.parse("1. Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Te 1:1'");
1478
+ expect(p.parse("1 Te 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Te 1:1'");
1479
+ p.include_apocrypha(false);
1480
+ expect(p.parse("CHOYAMBA ATESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'CHOYAMBA ATESALONIKA 1:1'");
1481
+ expect(p.parse("1. ATESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. ATESALONIKA 1:1'");
1482
+ expect(p.parse("1 ATESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 ATESALONIKA 1:1'");
1483
+ expect(p.parse("CHOYAMBA TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: 'CHOYAMBA TE 1:1'");
1484
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1485
+ expect(p.parse("1. TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TE 1:1'");
1486
+ expect(p.parse("1 TE 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TE 1:1'");
1487
+ });
1488
+ });
1489
+
1490
+ describe("Localized book 2Tim (ny)", function() {
1491
+ var p;
1492
+ p = {};
1493
+ beforeEach(function() {
1494
+ p = new bcv_parser();
1495
+ p.set_options({
1496
+ book_alone_strategy: "ignore",
1497
+ book_sequence_strategy: "ignore",
1498
+ osis_compaction_strategy: "bc",
1499
+ captive_end_digits_strategy: "delete"
1500
+ });
1501
+ p.include_apocrypha(true);
1502
+ });
1503
+ it("should handle book: 2Tim (ny)", function() {
1504
+ expect(p.parse("2. Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Timoteo 1:1'");
1505
+ expect(p.parse("2 Timoteo 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Timoteo 1:1'");
1506
+ expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Ti 1:1'");
1507
+ expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Ti 1:1'");
1508
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1509
+ p.include_apocrypha(false);
1510
+ expect(p.parse("2. TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIMOTEO 1:1'");
1511
+ expect(p.parse("2 TIMOTEO 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIMOTEO 1:1'");
1512
+ expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TI 1:1'");
1513
+ expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TI 1:1'");
1514
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1515
+ });
1516
+ });
1517
+
1518
+ describe("Localized book 1Tim (ny)", function() {
1519
+ var p;
1520
+ p = {};
1521
+ beforeEach(function() {
1522
+ p = new bcv_parser();
1523
+ p.set_options({
1524
+ book_alone_strategy: "ignore",
1525
+ book_sequence_strategy: "ignore",
1526
+ osis_compaction_strategy: "bc",
1527
+ captive_end_digits_strategy: "delete"
1528
+ });
1529
+ p.include_apocrypha(true);
1530
+ });
1531
+ it("should handle book: 1Tim (ny)", function() {
1532
+ expect(p.parse("choyamba Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'choyamba Timoteo 1:1'");
1533
+ expect(p.parse("choyamba Ti 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'choyamba Ti 1:1'");
1534
+ expect(p.parse("1. Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Timoteo 1:1'");
1535
+ expect(p.parse("1 Timoteo 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Timoteo 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
+ p.include_apocrypha(false);
1540
+ expect(p.parse("CHOYAMBA TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'CHOYAMBA TIMOTEO 1:1'");
1541
+ expect(p.parse("CHOYAMBA TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: 'CHOYAMBA TI 1:1'");
1542
+ expect(p.parse("1. TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIMOTEO 1:1'");
1543
+ expect(p.parse("1 TIMOTEO 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIMOTEO 1:1'");
1544
+ expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TI 1:1'");
1545
+ expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TI 1:1'");
1546
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1547
+ });
1548
+ });
1549
+
1550
+ describe("Localized book Titus (ny)", function() {
1551
+ var p;
1552
+ p = {};
1553
+ beforeEach(function() {
1554
+ p = new bcv_parser();
1555
+ p.set_options({
1556
+ book_alone_strategy: "ignore",
1557
+ book_sequence_strategy: "ignore",
1558
+ osis_compaction_strategy: "bc",
1559
+ captive_end_digits_strategy: "delete"
1560
+ });
1561
+ p.include_apocrypha(true);
1562
+ });
1563
+ it("should handle book: Titus (ny)", function() {
1564
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1565
+ expect(p.parse("Tito 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tito 1:1'");
1566
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1567
+ p.include_apocrypha(false);
1568
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1569
+ expect(p.parse("TITO 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITO 1:1'");
1570
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1571
+ });
1572
+ });
1573
+
1574
+ describe("Localized book Phlm (ny)", function() {
1575
+ var p;
1576
+ p = {};
1577
+ beforeEach(function() {
1578
+ p = new bcv_parser();
1579
+ p.set_options({
1580
+ book_alone_strategy: "ignore",
1581
+ book_sequence_strategy: "ignore",
1582
+ osis_compaction_strategy: "bc",
1583
+ captive_end_digits_strategy: "delete"
1584
+ });
1585
+ p.include_apocrypha(true);
1586
+ });
1587
+ it("should handle book: Phlm (ny)", function() {
1588
+ expect(p.parse("Filemoni 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Filemoni 1:1'");
1589
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1590
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1591
+ p.include_apocrypha(false);
1592
+ expect(p.parse("FILEMONI 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FILEMONI 1:1'");
1593
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1594
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1595
+ });
1596
+ });
1597
+
1598
+ describe("Localized book Heb (ny)", function() {
1599
+ var p;
1600
+ p = {};
1601
+ beforeEach(function() {
1602
+ p = new bcv_parser();
1603
+ p.set_options({
1604
+ book_alone_strategy: "ignore",
1605
+ book_sequence_strategy: "ignore",
1606
+ osis_compaction_strategy: "bc",
1607
+ captive_end_digits_strategy: "delete"
1608
+ });
1609
+ p.include_apocrypha(true);
1610
+ });
1611
+ it("should handle book: Heb (ny)", function() {
1612
+ expect(p.parse("Ahebri 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Ahebri 1:1'");
1613
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1614
+ p.include_apocrypha(false);
1615
+ expect(p.parse("AHEBRI 1:1").osis()).toEqual("Heb.1.1", "parsing: 'AHEBRI 1:1'");
1616
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1617
+ });
1618
+ });
1619
+
1620
+ describe("Localized book Jas (ny)", function() {
1621
+ var p;
1622
+ p = {};
1623
+ beforeEach(function() {
1624
+ p = new bcv_parser();
1625
+ p.set_options({
1626
+ book_alone_strategy: "ignore",
1627
+ book_sequence_strategy: "ignore",
1628
+ osis_compaction_strategy: "bc",
1629
+ captive_end_digits_strategy: "delete"
1630
+ });
1631
+ p.include_apocrypha(true);
1632
+ });
1633
+ it("should handle book: Jas (ny)", function() {
1634
+ expect(p.parse("Yakobo 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yakobo 1:1'");
1635
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1636
+ expect(p.parse("Yak 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yak 1:1'");
1637
+ p.include_apocrypha(false);
1638
+ expect(p.parse("YAKOBO 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAKOBO 1:1'");
1639
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1640
+ expect(p.parse("YAK 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAK 1:1'");
1641
+ });
1642
+ });
1643
+
1644
+ describe("Localized book 2Pet (ny)", function() {
1645
+ var p;
1646
+ p = {};
1647
+ beforeEach(function() {
1648
+ p = new bcv_parser();
1649
+ p.set_options({
1650
+ book_alone_strategy: "ignore",
1651
+ book_sequence_strategy: "ignore",
1652
+ osis_compaction_strategy: "bc",
1653
+ captive_end_digits_strategy: "delete"
1654
+ });
1655
+ p.include_apocrypha(true);
1656
+ });
1657
+ it("should handle book: 2Pet (ny)", function() {
1658
+ expect(p.parse("2. Petulo 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Petulo 1:1'");
1659
+ expect(p.parse("2 Petulo 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Petulo 1:1'");
1660
+ expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Pe 1:1'");
1661
+ expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Pe 1:1'");
1662
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1663
+ p.include_apocrypha(false);
1664
+ expect(p.parse("2. PETULO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PETULO 1:1'");
1665
+ expect(p.parse("2 PETULO 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PETULO 1:1'");
1666
+ expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PE 1:1'");
1667
+ expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PE 1:1'");
1668
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1669
+ });
1670
+ });
1671
+
1672
+ describe("Localized book 1Pet (ny)", function() {
1673
+ var p;
1674
+ p = {};
1675
+ beforeEach(function() {
1676
+ p = new bcv_parser();
1677
+ p.set_options({
1678
+ book_alone_strategy: "ignore",
1679
+ book_sequence_strategy: "ignore",
1680
+ osis_compaction_strategy: "bc",
1681
+ captive_end_digits_strategy: "delete"
1682
+ });
1683
+ p.include_apocrypha(true);
1684
+ });
1685
+ it("should handle book: 1Pet (ny)", function() {
1686
+ expect(p.parse("choyamba Petulo 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'choyamba Petulo 1:1'");
1687
+ expect(p.parse("choyamba Pe 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'choyamba Pe 1:1'");
1688
+ expect(p.parse("1. Petulo 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Petulo 1:1'");
1689
+ expect(p.parse("1 Petulo 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Petulo 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
+ p.include_apocrypha(false);
1694
+ expect(p.parse("CHOYAMBA PETULO 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'CHOYAMBA PETULO 1:1'");
1695
+ expect(p.parse("CHOYAMBA PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: 'CHOYAMBA PE 1:1'");
1696
+ expect(p.parse("1. PETULO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PETULO 1:1'");
1697
+ expect(p.parse("1 PETULO 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PETULO 1:1'");
1698
+ expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PE 1:1'");
1699
+ expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PE 1:1'");
1700
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1701
+ });
1702
+ });
1703
+
1704
+ describe("Localized book Jude (ny)", function() {
1705
+ var p;
1706
+ p = {};
1707
+ beforeEach(function() {
1708
+ p = new bcv_parser();
1709
+ p.set_options({
1710
+ book_alone_strategy: "ignore",
1711
+ book_sequence_strategy: "ignore",
1712
+ osis_compaction_strategy: "bc",
1713
+ captive_end_digits_strategy: "delete"
1714
+ });
1715
+ p.include_apocrypha(true);
1716
+ });
1717
+ it("should handle book: Jude (ny)", function() {
1718
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1719
+ expect(p.parse("Yuda 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yuda 1:1'");
1720
+ expect(p.parse("Yud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yud 1:1'");
1721
+ p.include_apocrypha(false);
1722
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1723
+ expect(p.parse("YUDA 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUDA 1:1'");
1724
+ expect(p.parse("YUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUD 1:1'");
1725
+ });
1726
+ });
1727
+
1728
+ describe("Miscellaneous tests", function() {
1729
+ var p;
1730
+ p = {};
1731
+ beforeEach(function() {
1732
+ p = new bcv_parser();
1733
+ p.set_options({
1734
+ book_alone_strategy: "ignore",
1735
+ book_sequence_strategy: "ignore",
1736
+ osis_compaction_strategy: "bc",
1737
+ captive_end_digits_strategy: "delete"
1738
+ });
1739
+ p.include_apocrypha(true);
1740
+ });
1741
+ it("should return the expected language", function() {
1742
+ expect(p.languages).toEqual(["ny"]);
1743
+ });
1744
+ it("should handle ranges (ny)", function() {
1745
+ expect(p.parse("Titus 1:1 ku 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 ku 2'");
1746
+ expect(p.parse("Matt 1ku2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1ku2'");
1747
+ expect(p.parse("Phlm 2 KU 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 KU 3'");
1748
+ });
1749
+ it("should handle chapters (ny)", function() {
1750
+ expect(p.parse("Titus 1:1, mutu 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, mutu 2'");
1751
+ expect(p.parse("Matt 3:4 MUTU 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 MUTU 6'");
1752
+ });
1753
+ it("should handle verses (ny)", function() {
1754
+ expect(p.parse("Exod 1:1 vesi 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 vesi 3'");
1755
+ expect(p.parse("Phlm VESI 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm VESI 6'");
1756
+ expect(p.parse("Exod 1:1 ndime 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 ndime 3'");
1757
+ expect(p.parse("Phlm NDIME 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm NDIME 6'");
1758
+ });
1759
+ it("should handle 'and' (ny)", function() {
1760
+ expect(p.parse("Exod 1:1 ndi 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 ndi 3'");
1761
+ expect(p.parse("Phlm 2 NDI 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 NDI 6'");
1762
+ });
1763
+ it("should handle titles (ny)", function() {
1764
+ expect(p.parse("Ps 3 mutu, 4:2, 5:mutu").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 mutu, 4:2, 5:mutu'");
1765
+ expect(p.parse("PS 3 MUTU, 4:2, 5:MUTU").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 MUTU, 4:2, 5:MUTU'");
1766
+ });
1767
+ it("should handle 'ff' (ny)", function() {
1768
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1769
+ 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'");
1770
+ });
1771
+ it("should handle translations (ny)", function() {
1772
+ expect(p.parse("Lev 1 (cblb)").osis_and_translations()).toEqual([["Lev.1", "cblb"]]);
1773
+ expect(p.parse("lev 1 cblb").osis_and_translations()).toEqual([["Lev.1", "cblb"]]);
1774
+ });
1775
+ it("should handle book ranges (ny)", function() {
1776
+ p.set_options({
1777
+ book_alone_strategy: "full",
1778
+ book_range_strategy: "include"
1779
+ });
1780
+ expect(p.parse("1 ku 3 Yo").osis()).toEqual("1John.1-3John.1", "parsing: '1 ku 3 Yo'");
1781
+ });
1782
+ return it("should handle boundaries (ny)", function() {
1783
+ p.set_options({
1784
+ book_alone_strategy: "full"
1785
+ });
1786
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1787
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1788
+ });
1789
+ });
1790
+
1791
+ }).call(this);