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,1757 @@
1
+ (function() {
2
+ var bcv_parser;
3
+
4
+ bcv_parser = require("../../dist/id-bcv-parser.js").bcv_parser;
5
+
6
+ describe("Parsing (id)", 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 (id)", 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 (id)", function() {
82
+ expect(p.parse("Kejadian 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Kejadian 1:1'");
83
+ expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Gen 1:1'");
84
+ expect(p.parse("Kej 1:1").osis()).toEqual("Gen.1.1", "parsing: 'Kej 1:1'");
85
+ p.include_apocrypha(false);
86
+ expect(p.parse("KEJADIAN 1:1").osis()).toEqual("Gen.1.1", "parsing: 'KEJADIAN 1:1'");
87
+ expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1", "parsing: 'GEN 1:1'");
88
+ expect(p.parse("KEJ 1:1").osis()).toEqual("Gen.1.1", "parsing: 'KEJ 1:1'");
89
+ });
90
+ });
91
+
92
+ describe("Localized book Exod (id)", function() {
93
+ var p;
94
+ p = {};
95
+ beforeEach(function() {
96
+ p = new bcv_parser();
97
+ p.set_options({
98
+ book_alone_strategy: "ignore",
99
+ book_sequence_strategy: "ignore",
100
+ osis_compaction_strategy: "bc",
101
+ captive_end_digits_strategy: "delete"
102
+ });
103
+ p.include_apocrypha(true);
104
+ });
105
+ it("should handle book: Exod (id)", function() {
106
+ expect(p.parse("Keluaran 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Keluaran 1:1'");
107
+ expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Exod 1:1'");
108
+ expect(p.parse("Kel 1:1").osis()).toEqual("Exod.1.1", "parsing: 'Kel 1:1'");
109
+ p.include_apocrypha(false);
110
+ expect(p.parse("KELUARAN 1:1").osis()).toEqual("Exod.1.1", "parsing: 'KELUARAN 1:1'");
111
+ expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1", "parsing: 'EXOD 1:1'");
112
+ expect(p.parse("KEL 1:1").osis()).toEqual("Exod.1.1", "parsing: 'KEL 1:1'");
113
+ });
114
+ });
115
+
116
+ describe("Localized book Lev (id)", function() {
117
+ var p;
118
+ p = {};
119
+ beforeEach(function() {
120
+ p = new bcv_parser();
121
+ p.set_options({
122
+ book_alone_strategy: "ignore",
123
+ book_sequence_strategy: "ignore",
124
+ osis_compaction_strategy: "bc",
125
+ captive_end_digits_strategy: "delete"
126
+ });
127
+ p.include_apocrypha(true);
128
+ });
129
+ it("should handle book: Lev (id)", function() {
130
+ expect(p.parse("Imamat 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Imamat 1:1'");
131
+ expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Lev 1:1'");
132
+ expect(p.parse("Im 1:1").osis()).toEqual("Lev.1.1", "parsing: 'Im 1:1'");
133
+ p.include_apocrypha(false);
134
+ expect(p.parse("IMAMAT 1:1").osis()).toEqual("Lev.1.1", "parsing: 'IMAMAT 1:1'");
135
+ expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1", "parsing: 'LEV 1:1'");
136
+ expect(p.parse("IM 1:1").osis()).toEqual("Lev.1.1", "parsing: 'IM 1:1'");
137
+ });
138
+ });
139
+
140
+ describe("Localized book Num (id)", function() {
141
+ var p;
142
+ p = {};
143
+ beforeEach(function() {
144
+ p = new bcv_parser();
145
+ p.set_options({
146
+ book_alone_strategy: "ignore",
147
+ book_sequence_strategy: "ignore",
148
+ osis_compaction_strategy: "bc",
149
+ captive_end_digits_strategy: "delete"
150
+ });
151
+ p.include_apocrypha(true);
152
+ });
153
+ it("should handle book: Num (id)", function() {
154
+ expect(p.parse("Bilangan 1:1").osis()).toEqual("Num.1.1", "parsing: 'Bilangan 1:1'");
155
+ expect(p.parse("Bil 1:1").osis()).toEqual("Num.1.1", "parsing: 'Bil 1:1'");
156
+ expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1", "parsing: 'Num 1:1'");
157
+ p.include_apocrypha(false);
158
+ expect(p.parse("BILANGAN 1:1").osis()).toEqual("Num.1.1", "parsing: 'BILANGAN 1:1'");
159
+ expect(p.parse("BIL 1:1").osis()).toEqual("Num.1.1", "parsing: 'BIL 1:1'");
160
+ expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1", "parsing: 'NUM 1:1'");
161
+ });
162
+ });
163
+
164
+ describe("Localized book Lam (id)", function() {
165
+ var p;
166
+ p = {};
167
+ beforeEach(function() {
168
+ p = new bcv_parser();
169
+ p.set_options({
170
+ book_alone_strategy: "ignore",
171
+ book_sequence_strategy: "ignore",
172
+ osis_compaction_strategy: "bc",
173
+ captive_end_digits_strategy: "delete"
174
+ });
175
+ p.include_apocrypha(true);
176
+ });
177
+ it("should handle book: Lam (id)", function() {
178
+ expect(p.parse("Ratapan 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Ratapan 1:1'");
179
+ expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Lam 1:1'");
180
+ expect(p.parse("Rat 1:1").osis()).toEqual("Lam.1.1", "parsing: 'Rat 1:1'");
181
+ p.include_apocrypha(false);
182
+ expect(p.parse("RATAPAN 1:1").osis()).toEqual("Lam.1.1", "parsing: 'RATAPAN 1:1'");
183
+ expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1", "parsing: 'LAM 1:1'");
184
+ expect(p.parse("RAT 1:1").osis()).toEqual("Lam.1.1", "parsing: 'RAT 1:1'");
185
+ });
186
+ });
187
+
188
+ describe("Localized book Rev (id)", function() {
189
+ var p;
190
+ p = {};
191
+ beforeEach(function() {
192
+ p = new bcv_parser();
193
+ p.set_options({
194
+ book_alone_strategy: "ignore",
195
+ book_sequence_strategy: "ignore",
196
+ osis_compaction_strategy: "bc",
197
+ captive_end_digits_strategy: "delete"
198
+ });
199
+ p.include_apocrypha(true);
200
+ });
201
+ it("should handle book: Rev (id)", function() {
202
+ expect(p.parse("Wahyu 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Wahyu 1:1'");
203
+ expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Rev 1:1'");
204
+ expect(p.parse("Why 1:1").osis()).toEqual("Rev.1.1", "parsing: 'Why 1:1'");
205
+ p.include_apocrypha(false);
206
+ expect(p.parse("WAHYU 1:1").osis()).toEqual("Rev.1.1", "parsing: 'WAHYU 1:1'");
207
+ expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1", "parsing: 'REV 1:1'");
208
+ expect(p.parse("WHY 1:1").osis()).toEqual("Rev.1.1", "parsing: 'WHY 1:1'");
209
+ });
210
+ });
211
+
212
+ describe("Localized book Deut (id)", function() {
213
+ var p;
214
+ p = {};
215
+ beforeEach(function() {
216
+ p = new bcv_parser();
217
+ p.set_options({
218
+ book_alone_strategy: "ignore",
219
+ book_sequence_strategy: "ignore",
220
+ osis_compaction_strategy: "bc",
221
+ captive_end_digits_strategy: "delete"
222
+ });
223
+ p.include_apocrypha(true);
224
+ });
225
+ it("should handle book: Deut (id)", function() {
226
+ expect(p.parse("Ulangan 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Ulangan 1:1'");
227
+ expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Deut 1:1'");
228
+ expect(p.parse("Ul 1:1").osis()).toEqual("Deut.1.1", "parsing: 'Ul 1:1'");
229
+ p.include_apocrypha(false);
230
+ expect(p.parse("ULANGAN 1:1").osis()).toEqual("Deut.1.1", "parsing: 'ULANGAN 1:1'");
231
+ expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1", "parsing: 'DEUT 1:1'");
232
+ expect(p.parse("UL 1:1").osis()).toEqual("Deut.1.1", "parsing: 'UL 1:1'");
233
+ });
234
+ });
235
+
236
+ describe("Localized book Josh (id)", function() {
237
+ var p;
238
+ p = {};
239
+ beforeEach(function() {
240
+ p = new bcv_parser();
241
+ p.set_options({
242
+ book_alone_strategy: "ignore",
243
+ book_sequence_strategy: "ignore",
244
+ osis_compaction_strategy: "bc",
245
+ captive_end_digits_strategy: "delete"
246
+ });
247
+ p.include_apocrypha(true);
248
+ });
249
+ it("should handle book: Josh (id)", function() {
250
+ expect(p.parse("Yosua 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Yosua 1:1'");
251
+ expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Josh 1:1'");
252
+ expect(p.parse("Yos 1:1").osis()).toEqual("Josh.1.1", "parsing: 'Yos 1:1'");
253
+ p.include_apocrypha(false);
254
+ expect(p.parse("YOSUA 1:1").osis()).toEqual("Josh.1.1", "parsing: 'YOSUA 1:1'");
255
+ expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1", "parsing: 'JOSH 1:1'");
256
+ expect(p.parse("YOS 1:1").osis()).toEqual("Josh.1.1", "parsing: 'YOS 1:1'");
257
+ });
258
+ });
259
+
260
+ describe("Localized book Judg (id)", function() {
261
+ var p;
262
+ p = {};
263
+ beforeEach(function() {
264
+ p = new bcv_parser();
265
+ p.set_options({
266
+ book_alone_strategy: "ignore",
267
+ book_sequence_strategy: "ignore",
268
+ osis_compaction_strategy: "bc",
269
+ captive_end_digits_strategy: "delete"
270
+ });
271
+ p.include_apocrypha(true);
272
+ });
273
+ it("should handle book: Judg (id)", function() {
274
+ expect(p.parse("Hakim hakim 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Hakim hakim 1:1'");
275
+ expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Judg 1:1'");
276
+ expect(p.parse("Hak 1:1").osis()).toEqual("Judg.1.1", "parsing: 'Hak 1:1'");
277
+ p.include_apocrypha(false);
278
+ expect(p.parse("HAKIM HAKIM 1:1").osis()).toEqual("Judg.1.1", "parsing: 'HAKIM HAKIM 1:1'");
279
+ expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1", "parsing: 'JUDG 1:1'");
280
+ expect(p.parse("HAK 1:1").osis()).toEqual("Judg.1.1", "parsing: 'HAK 1:1'");
281
+ });
282
+ });
283
+
284
+ describe("Localized book Ruth (id)", function() {
285
+ var p;
286
+ p = {};
287
+ beforeEach(function() {
288
+ p = new bcv_parser();
289
+ p.set_options({
290
+ book_alone_strategy: "ignore",
291
+ book_sequence_strategy: "ignore",
292
+ osis_compaction_strategy: "bc",
293
+ captive_end_digits_strategy: "delete"
294
+ });
295
+ p.include_apocrypha(true);
296
+ });
297
+ it("should handle book: Ruth (id)", function() {
298
+ expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Ruth 1:1'");
299
+ expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'Rut 1:1'");
300
+ p.include_apocrypha(false);
301
+ expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUTH 1:1'");
302
+ expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1", "parsing: 'RUT 1:1'");
303
+ });
304
+ });
305
+
306
+ describe("Localized book Isa (id)", function() {
307
+ var p;
308
+ p = {};
309
+ beforeEach(function() {
310
+ p = new bcv_parser();
311
+ p.set_options({
312
+ book_alone_strategy: "ignore",
313
+ book_sequence_strategy: "ignore",
314
+ osis_compaction_strategy: "bc",
315
+ captive_end_digits_strategy: "delete"
316
+ });
317
+ p.include_apocrypha(true);
318
+ });
319
+ it("should handle book: Isa (id)", function() {
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
+ p.include_apocrypha(false);
324
+ expect(p.parse("YESAYA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YESAYA 1:1'");
325
+ expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1", "parsing: 'ISA 1:1'");
326
+ expect(p.parse("YES 1:1").osis()).toEqual("Isa.1.1", "parsing: 'YES 1:1'");
327
+ });
328
+ });
329
+
330
+ describe("Localized book 2Sam (id)", function() {
331
+ var p;
332
+ p = {};
333
+ beforeEach(function() {
334
+ p = new bcv_parser();
335
+ p.set_options({
336
+ book_alone_strategy: "ignore",
337
+ book_sequence_strategy: "ignore",
338
+ osis_compaction_strategy: "bc",
339
+ captive_end_digits_strategy: "delete"
340
+ });
341
+ p.include_apocrypha(true);
342
+ });
343
+ it("should handle book: 2Sam (id)", function() {
344
+ expect(p.parse("2. Samuel 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Samuel 1:1'");
345
+ expect(p.parse("2 Samuel 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Samuel 1:1'");
346
+ expect(p.parse("2. Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. Sam 1:1'");
347
+ expect(p.parse("2 Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 Sam 1:1'");
348
+ expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2Sam 1:1'");
349
+ p.include_apocrypha(false);
350
+ expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SAMUEL 1:1'");
351
+ expect(p.parse("2 SAMUEL 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SAMUEL 1:1'");
352
+ expect(p.parse("2. SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2. SAM 1:1'");
353
+ expect(p.parse("2 SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2 SAM 1:1'");
354
+ expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1", "parsing: '2SAM 1:1'");
355
+ });
356
+ });
357
+
358
+ describe("Localized book 1Sam (id)", function() {
359
+ var p;
360
+ p = {};
361
+ beforeEach(function() {
362
+ p = new bcv_parser();
363
+ p.set_options({
364
+ book_alone_strategy: "ignore",
365
+ book_sequence_strategy: "ignore",
366
+ osis_compaction_strategy: "bc",
367
+ captive_end_digits_strategy: "delete"
368
+ });
369
+ p.include_apocrypha(true);
370
+ });
371
+ it("should handle book: 1Sam (id)", function() {
372
+ expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Samuel 1:1'");
373
+ expect(p.parse("1 Samuel 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Samuel 1:1'");
374
+ expect(p.parse("1. Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. Sam 1:1'");
375
+ expect(p.parse("1 Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 Sam 1:1'");
376
+ expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1Sam 1:1'");
377
+ p.include_apocrypha(false);
378
+ expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAMUEL 1:1'");
379
+ expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAMUEL 1:1'");
380
+ expect(p.parse("1. SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1. SAM 1:1'");
381
+ expect(p.parse("1 SAM 1:1").osis()).toEqual("1Sam.1.1", "parsing: '1 SAM 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 (id)", 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 (id)", function() {
400
+ expect(p.parse("2. Raja raja 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Raja raja 1:1'");
401
+ expect(p.parse("2 Raja raja 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Raja raja 1:1'");
402
+ expect(p.parse("2. Raj 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. Raj 1:1'");
403
+ expect(p.parse("2 Raj 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 Raj 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. RAJA RAJA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. RAJA RAJA 1:1'");
407
+ expect(p.parse("2 RAJA RAJA 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 RAJA RAJA 1:1'");
408
+ expect(p.parse("2. RAJ 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2. RAJ 1:1'");
409
+ expect(p.parse("2 RAJ 1:1").osis()).toEqual("2Kgs.1.1", "parsing: '2 RAJ 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 (id)", 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 (id)", function() {
428
+ expect(p.parse("1. Raja raja 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Raja raja 1:1'");
429
+ expect(p.parse("1 Raja raja 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Raja raja 1:1'");
430
+ expect(p.parse("1. Raj 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. Raj 1:1'");
431
+ expect(p.parse("1 Raj 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 Raj 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("1. RAJA RAJA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. RAJA RAJA 1:1'");
435
+ expect(p.parse("1 RAJA RAJA 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 RAJA RAJA 1:1'");
436
+ expect(p.parse("1. RAJ 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1. RAJ 1:1'");
437
+ expect(p.parse("1 RAJ 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1 RAJ 1:1'");
438
+ expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1", "parsing: '1KGS 1:1'");
439
+ });
440
+ });
441
+
442
+ describe("Localized book 2Chr (id)", function() {
443
+ var p;
444
+ p = {};
445
+ beforeEach(function() {
446
+ p = new bcv_parser();
447
+ p.set_options({
448
+ book_alone_strategy: "ignore",
449
+ book_sequence_strategy: "ignore",
450
+ osis_compaction_strategy: "bc",
451
+ captive_end_digits_strategy: "delete"
452
+ });
453
+ p.include_apocrypha(true);
454
+ });
455
+ it("should handle book: 2Chr (id)", function() {
456
+ expect(p.parse("2. Tawarikh 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Tawarikh 1:1'");
457
+ expect(p.parse("2 Tawarikh 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Tawarikh 1:1'");
458
+ expect(p.parse("2. Taw 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. Taw 1:1'");
459
+ expect(p.parse("2 Taw 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 Taw 1:1'");
460
+ expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2Chr 1:1'");
461
+ p.include_apocrypha(false);
462
+ expect(p.parse("2. TAWARIKH 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. TAWARIKH 1:1'");
463
+ expect(p.parse("2 TAWARIKH 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 TAWARIKH 1:1'");
464
+ expect(p.parse("2. TAW 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2. TAW 1:1'");
465
+ expect(p.parse("2 TAW 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2 TAW 1:1'");
466
+ expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1", "parsing: '2CHR 1:1'");
467
+ });
468
+ });
469
+
470
+ describe("Localized book 1Chr (id)", function() {
471
+ var p;
472
+ p = {};
473
+ beforeEach(function() {
474
+ p = new bcv_parser();
475
+ p.set_options({
476
+ book_alone_strategy: "ignore",
477
+ book_sequence_strategy: "ignore",
478
+ osis_compaction_strategy: "bc",
479
+ captive_end_digits_strategy: "delete"
480
+ });
481
+ p.include_apocrypha(true);
482
+ });
483
+ it("should handle book: 1Chr (id)", function() {
484
+ expect(p.parse("1. Tawarikh 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Tawarikh 1:1'");
485
+ expect(p.parse("1 Tawarikh 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Tawarikh 1:1'");
486
+ expect(p.parse("1. Taw 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. Taw 1:1'");
487
+ expect(p.parse("1 Taw 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 Taw 1:1'");
488
+ expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1Chr 1:1'");
489
+ p.include_apocrypha(false);
490
+ expect(p.parse("1. TAWARIKH 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. TAWARIKH 1:1'");
491
+ expect(p.parse("1 TAWARIKH 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 TAWARIKH 1:1'");
492
+ expect(p.parse("1. TAW 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1. TAW 1:1'");
493
+ expect(p.parse("1 TAW 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1 TAW 1:1'");
494
+ expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1", "parsing: '1CHR 1:1'");
495
+ });
496
+ });
497
+
498
+ describe("Localized book Ezra (id)", function() {
499
+ var p;
500
+ p = {};
501
+ beforeEach(function() {
502
+ p = new bcv_parser();
503
+ p.set_options({
504
+ book_alone_strategy: "ignore",
505
+ book_sequence_strategy: "ignore",
506
+ osis_compaction_strategy: "bc",
507
+ captive_end_digits_strategy: "delete"
508
+ });
509
+ p.include_apocrypha(true);
510
+ });
511
+ it("should handle book: Ezra (id)", function() {
512
+ expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezra 1:1'");
513
+ expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'Ezr 1:1'");
514
+ p.include_apocrypha(false);
515
+ expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZRA 1:1'");
516
+ expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1", "parsing: 'EZR 1:1'");
517
+ });
518
+ });
519
+
520
+ describe("Localized book Neh (id)", function() {
521
+ var p;
522
+ p = {};
523
+ beforeEach(function() {
524
+ p = new bcv_parser();
525
+ p.set_options({
526
+ book_alone_strategy: "ignore",
527
+ book_sequence_strategy: "ignore",
528
+ osis_compaction_strategy: "bc",
529
+ captive_end_digits_strategy: "delete"
530
+ });
531
+ p.include_apocrypha(true);
532
+ });
533
+ it("should handle book: Neh (id)", function() {
534
+ expect(p.parse("Nehemia 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Nehemia 1:1'");
535
+ expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1", "parsing: 'Neh 1:1'");
536
+ p.include_apocrypha(false);
537
+ expect(p.parse("NEHEMIA 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEHEMIA 1:1'");
538
+ expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1", "parsing: 'NEH 1:1'");
539
+ });
540
+ });
541
+
542
+ describe("Localized book Esth (id)", function() {
543
+ var p;
544
+ p = {};
545
+ beforeEach(function() {
546
+ p = new bcv_parser();
547
+ p.set_options({
548
+ book_alone_strategy: "ignore",
549
+ book_sequence_strategy: "ignore",
550
+ osis_compaction_strategy: "bc",
551
+ captive_end_digits_strategy: "delete"
552
+ });
553
+ p.include_apocrypha(true);
554
+ });
555
+ it("should handle book: Esth (id)", function() {
556
+ expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Ester 1:1'");
557
+ expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Esth 1:1'");
558
+ expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1", "parsing: 'Est 1:1'");
559
+ p.include_apocrypha(false);
560
+ expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTER 1:1'");
561
+ expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1", "parsing: 'ESTH 1:1'");
562
+ expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1", "parsing: 'EST 1:1'");
563
+ });
564
+ });
565
+
566
+ describe("Localized book Job (id)", function() {
567
+ var p;
568
+ p = {};
569
+ beforeEach(function() {
570
+ p = new bcv_parser();
571
+ p.set_options({
572
+ book_alone_strategy: "ignore",
573
+ book_sequence_strategy: "ignore",
574
+ osis_compaction_strategy: "bc",
575
+ captive_end_digits_strategy: "delete"
576
+ });
577
+ p.include_apocrypha(true);
578
+ });
579
+ it("should handle book: Job (id)", function() {
580
+ expect(p.parse("Ayub 1:1").osis()).toEqual("Job.1.1", "parsing: 'Ayub 1:1'");
581
+ expect(p.parse("Ayb 1:1").osis()).toEqual("Job.1.1", "parsing: 'Ayb 1:1'");
582
+ expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1", "parsing: 'Job 1:1'");
583
+ p.include_apocrypha(false);
584
+ expect(p.parse("AYUB 1:1").osis()).toEqual("Job.1.1", "parsing: 'AYUB 1:1'");
585
+ expect(p.parse("AYB 1:1").osis()).toEqual("Job.1.1", "parsing: 'AYB 1:1'");
586
+ expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1", "parsing: 'JOB 1:1'");
587
+ });
588
+ });
589
+
590
+ describe("Localized book Ps (id)", function() {
591
+ var p;
592
+ p = {};
593
+ beforeEach(function() {
594
+ p = new bcv_parser();
595
+ p.set_options({
596
+ book_alone_strategy: "ignore",
597
+ book_sequence_strategy: "ignore",
598
+ osis_compaction_strategy: "bc",
599
+ captive_end_digits_strategy: "delete"
600
+ });
601
+ p.include_apocrypha(true);
602
+ });
603
+ it("should handle book: Ps (id)", function() {
604
+ expect(p.parse("Mazmur 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Mazmur 1:1'");
605
+ expect(p.parse("Mzm 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Mzm 1:1'");
606
+ expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1", "parsing: 'Ps 1:1'");
607
+ p.include_apocrypha(false);
608
+ expect(p.parse("MAZMUR 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MAZMUR 1:1'");
609
+ expect(p.parse("MZM 1:1").osis()).toEqual("Ps.1.1", "parsing: 'MZM 1:1'");
610
+ expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1", "parsing: 'PS 1:1'");
611
+ });
612
+ });
613
+
614
+ describe("Localized book Prov (id)", function() {
615
+ var p;
616
+ p = {};
617
+ beforeEach(function() {
618
+ p = new bcv_parser();
619
+ p.set_options({
620
+ book_alone_strategy: "ignore",
621
+ book_sequence_strategy: "ignore",
622
+ osis_compaction_strategy: "bc",
623
+ captive_end_digits_strategy: "delete"
624
+ });
625
+ p.include_apocrypha(true);
626
+ });
627
+ it("should handle book: Prov (id)", function() {
628
+ expect(p.parse("Amsal 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Amsal 1:1'");
629
+ expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Prov 1:1'");
630
+ expect(p.parse("Ams 1:1").osis()).toEqual("Prov.1.1", "parsing: 'Ams 1:1'");
631
+ p.include_apocrypha(false);
632
+ expect(p.parse("AMSAL 1:1").osis()).toEqual("Prov.1.1", "parsing: 'AMSAL 1:1'");
633
+ expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1", "parsing: 'PROV 1:1'");
634
+ expect(p.parse("AMS 1:1").osis()).toEqual("Prov.1.1", "parsing: 'AMS 1:1'");
635
+ });
636
+ });
637
+
638
+ describe("Localized book Eccl (id)", function() {
639
+ var p;
640
+ p = {};
641
+ beforeEach(function() {
642
+ p = new bcv_parser();
643
+ p.set_options({
644
+ book_alone_strategy: "ignore",
645
+ book_sequence_strategy: "ignore",
646
+ osis_compaction_strategy: "bc",
647
+ captive_end_digits_strategy: "delete"
648
+ });
649
+ p.include_apocrypha(true);
650
+ });
651
+ it("should handle book: Eccl (id)", function() {
652
+ expect(p.parse("Pengkhotbah 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Pengkhotbah 1:1'");
653
+ expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Eccl 1:1'");
654
+ expect(p.parse("Pkh 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'Pkh 1:1'");
655
+ p.include_apocrypha(false);
656
+ expect(p.parse("PENGKHOTBAH 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'PENGKHOTBAH 1:1'");
657
+ expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'ECCL 1:1'");
658
+ expect(p.parse("PKH 1:1").osis()).toEqual("Eccl.1.1", "parsing: 'PKH 1:1'");
659
+ });
660
+ });
661
+
662
+ describe("Localized book Song (id)", function() {
663
+ var p;
664
+ p = {};
665
+ beforeEach(function() {
666
+ p = new bcv_parser();
667
+ p.set_options({
668
+ book_alone_strategy: "ignore",
669
+ book_sequence_strategy: "ignore",
670
+ osis_compaction_strategy: "bc",
671
+ captive_end_digits_strategy: "delete"
672
+ });
673
+ p.include_apocrypha(true);
674
+ });
675
+ it("should handle book: Song (id)", function() {
676
+ expect(p.parse("Kidung Agung 1:1").osis()).toEqual("Song.1.1", "parsing: 'Kidung Agung 1:1'");
677
+ expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1", "parsing: 'Song 1:1'");
678
+ expect(p.parse("Kid 1:1").osis()).toEqual("Song.1.1", "parsing: 'Kid 1:1'");
679
+ p.include_apocrypha(false);
680
+ expect(p.parse("KIDUNG AGUNG 1:1").osis()).toEqual("Song.1.1", "parsing: 'KIDUNG AGUNG 1:1'");
681
+ expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1", "parsing: 'SONG 1:1'");
682
+ expect(p.parse("KID 1:1").osis()).toEqual("Song.1.1", "parsing: 'KID 1:1'");
683
+ });
684
+ });
685
+
686
+ describe("Localized book Jer (id)", function() {
687
+ var p;
688
+ p = {};
689
+ beforeEach(function() {
690
+ p = new bcv_parser();
691
+ p.set_options({
692
+ book_alone_strategy: "ignore",
693
+ book_sequence_strategy: "ignore",
694
+ osis_compaction_strategy: "bc",
695
+ captive_end_digits_strategy: "delete"
696
+ });
697
+ p.include_apocrypha(true);
698
+ });
699
+ it("should handle book: Jer (id)", function() {
700
+ expect(p.parse("Yeremia 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yeremia 1:1'");
701
+ expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Jer 1:1'");
702
+ expect(p.parse("Yer 1:1").osis()).toEqual("Jer.1.1", "parsing: 'Yer 1:1'");
703
+ p.include_apocrypha(false);
704
+ expect(p.parse("YEREMIA 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YEREMIA 1:1'");
705
+ expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'JER 1:1'");
706
+ expect(p.parse("YER 1:1").osis()).toEqual("Jer.1.1", "parsing: 'YER 1:1'");
707
+ });
708
+ });
709
+
710
+ describe("Localized book Ezek (id)", function() {
711
+ var p;
712
+ p = {};
713
+ beforeEach(function() {
714
+ p = new bcv_parser();
715
+ p.set_options({
716
+ book_alone_strategy: "ignore",
717
+ book_sequence_strategy: "ignore",
718
+ osis_compaction_strategy: "bc",
719
+ captive_end_digits_strategy: "delete"
720
+ });
721
+ p.include_apocrypha(true);
722
+ });
723
+ it("should handle book: Ezek (id)", function() {
724
+ expect(p.parse("Yehezkiel 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Yehezkiel 1:1'");
725
+ expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Ezek 1:1'");
726
+ expect(p.parse("Yeh 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'Yeh 1:1'");
727
+ p.include_apocrypha(false);
728
+ expect(p.parse("YEHEZKIEL 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'YEHEZKIEL 1:1'");
729
+ expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'EZEK 1:1'");
730
+ expect(p.parse("YEH 1:1").osis()).toEqual("Ezek.1.1", "parsing: 'YEH 1:1'");
731
+ });
732
+ });
733
+
734
+ describe("Localized book Dan (id)", function() {
735
+ var p;
736
+ p = {};
737
+ beforeEach(function() {
738
+ p = new bcv_parser();
739
+ p.set_options({
740
+ book_alone_strategy: "ignore",
741
+ book_sequence_strategy: "ignore",
742
+ osis_compaction_strategy: "bc",
743
+ captive_end_digits_strategy: "delete"
744
+ });
745
+ p.include_apocrypha(true);
746
+ });
747
+ it("should handle book: Dan (id)", function() {
748
+ expect(p.parse("Daniel 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Daniel 1:1'");
749
+ expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1", "parsing: 'Dan 1:1'");
750
+ p.include_apocrypha(false);
751
+ expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DANIEL 1:1'");
752
+ expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1", "parsing: 'DAN 1:1'");
753
+ });
754
+ });
755
+
756
+ describe("Localized book Hos (id)", function() {
757
+ var p;
758
+ p = {};
759
+ beforeEach(function() {
760
+ p = new bcv_parser();
761
+ p.set_options({
762
+ book_alone_strategy: "ignore",
763
+ book_sequence_strategy: "ignore",
764
+ osis_compaction_strategy: "bc",
765
+ captive_end_digits_strategy: "delete"
766
+ });
767
+ p.include_apocrypha(true);
768
+ });
769
+ it("should handle book: Hos (id)", function() {
770
+ expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hosea 1:1'");
771
+ expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1", "parsing: 'Hos 1:1'");
772
+ p.include_apocrypha(false);
773
+ expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOSEA 1:1'");
774
+ expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1", "parsing: 'HOS 1:1'");
775
+ });
776
+ });
777
+
778
+ describe("Localized book Joel (id)", function() {
779
+ var p;
780
+ p = {};
781
+ beforeEach(function() {
782
+ p = new bcv_parser();
783
+ p.set_options({
784
+ book_alone_strategy: "ignore",
785
+ book_sequence_strategy: "ignore",
786
+ osis_compaction_strategy: "bc",
787
+ captive_end_digits_strategy: "delete"
788
+ });
789
+ p.include_apocrypha(true);
790
+ });
791
+ it("should handle book: Joel (id)", function() {
792
+ expect(p.parse("Kejadian 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Kejadian 1:1'");
793
+ expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Joel 1:1'");
794
+ expect(p.parse("Yl 1:1").osis()).toEqual("Joel.1.1", "parsing: 'Yl 1:1'");
795
+ p.include_apocrypha(false);
796
+ expect(p.parse("KEJADIAN 1:1").osis()).toEqual("Joel.1.1", "parsing: 'KEJADIAN 1:1'");
797
+ expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'JOEL 1:1'");
798
+ expect(p.parse("YL 1:1").osis()).toEqual("Joel.1.1", "parsing: 'YL 1:1'");
799
+ });
800
+ });
801
+
802
+ describe("Localized book Amos (id)", function() {
803
+ var p;
804
+ p = {};
805
+ beforeEach(function() {
806
+ p = new bcv_parser();
807
+ p.set_options({
808
+ book_alone_strategy: "ignore",
809
+ book_sequence_strategy: "ignore",
810
+ osis_compaction_strategy: "bc",
811
+ captive_end_digits_strategy: "delete"
812
+ });
813
+ p.include_apocrypha(true);
814
+ });
815
+ it("should handle book: Amos (id)", function() {
816
+ expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Amos 1:1'");
817
+ expect(p.parse("Am 1:1").osis()).toEqual("Amos.1.1", "parsing: 'Am 1:1'");
818
+ p.include_apocrypha(false);
819
+ expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AMOS 1:1'");
820
+ expect(p.parse("AM 1:1").osis()).toEqual("Amos.1.1", "parsing: 'AM 1:1'");
821
+ });
822
+ });
823
+
824
+ describe("Localized book Obad (id)", function() {
825
+ var p;
826
+ p = {};
827
+ beforeEach(function() {
828
+ p = new bcv_parser();
829
+ p.set_options({
830
+ book_alone_strategy: "ignore",
831
+ book_sequence_strategy: "ignore",
832
+ osis_compaction_strategy: "bc",
833
+ captive_end_digits_strategy: "delete"
834
+ });
835
+ p.include_apocrypha(true);
836
+ });
837
+ it("should handle book: Obad (id)", function() {
838
+ expect(p.parse("Obaja 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obaja 1:1'");
839
+ expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Obad 1:1'");
840
+ expect(p.parse("Ob 1:1").osis()).toEqual("Obad.1.1", "parsing: 'Ob 1:1'");
841
+ p.include_apocrypha(false);
842
+ expect(p.parse("OBAJA 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAJA 1:1'");
843
+ expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OBAD 1:1'");
844
+ expect(p.parse("OB 1:1").osis()).toEqual("Obad.1.1", "parsing: 'OB 1:1'");
845
+ });
846
+ });
847
+
848
+ describe("Localized book Jonah (id)", function() {
849
+ var p;
850
+ p = {};
851
+ beforeEach(function() {
852
+ p = new bcv_parser();
853
+ p.set_options({
854
+ book_alone_strategy: "ignore",
855
+ book_sequence_strategy: "ignore",
856
+ osis_compaction_strategy: "bc",
857
+ captive_end_digits_strategy: "delete"
858
+ });
859
+ p.include_apocrypha(true);
860
+ });
861
+ it("should handle book: Jonah (id)", function() {
862
+ expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Jonah 1:1'");
863
+ expect(p.parse("Yunus 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yunus 1:1'");
864
+ expect(p.parse("Yun 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'Yun 1:1'");
865
+ p.include_apocrypha(false);
866
+ expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'JONAH 1:1'");
867
+ expect(p.parse("YUNUS 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YUNUS 1:1'");
868
+ expect(p.parse("YUN 1:1").osis()).toEqual("Jonah.1.1", "parsing: 'YUN 1:1'");
869
+ });
870
+ });
871
+
872
+ describe("Localized book Mic (id)", function() {
873
+ var p;
874
+ p = {};
875
+ beforeEach(function() {
876
+ p = new bcv_parser();
877
+ p.set_options({
878
+ book_alone_strategy: "ignore",
879
+ book_sequence_strategy: "ignore",
880
+ osis_compaction_strategy: "bc",
881
+ captive_end_digits_strategy: "delete"
882
+ });
883
+ p.include_apocrypha(true);
884
+ });
885
+ it("should handle book: Mic (id)", function() {
886
+ expect(p.parse("Mikha 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mikha 1:1'");
887
+ expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mic 1:1'");
888
+ expect(p.parse("Mi 1:1").osis()).toEqual("Mic.1.1", "parsing: 'Mi 1:1'");
889
+ p.include_apocrypha(false);
890
+ expect(p.parse("MIKHA 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIKHA 1:1'");
891
+ expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MIC 1:1'");
892
+ expect(p.parse("MI 1:1").osis()).toEqual("Mic.1.1", "parsing: 'MI 1:1'");
893
+ });
894
+ });
895
+
896
+ describe("Localized book Nah (id)", function() {
897
+ var p;
898
+ p = {};
899
+ beforeEach(function() {
900
+ p = new bcv_parser();
901
+ p.set_options({
902
+ book_alone_strategy: "ignore",
903
+ book_sequence_strategy: "ignore",
904
+ osis_compaction_strategy: "bc",
905
+ captive_end_digits_strategy: "delete"
906
+ });
907
+ p.include_apocrypha(true);
908
+ });
909
+ it("should handle book: Nah (id)", function() {
910
+ expect(p.parse("Nahum 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nahum 1:1'");
911
+ expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1", "parsing: 'Nah 1:1'");
912
+ p.include_apocrypha(false);
913
+ expect(p.parse("NAHUM 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAHUM 1:1'");
914
+ expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1", "parsing: 'NAH 1:1'");
915
+ });
916
+ });
917
+
918
+ describe("Localized book Hab (id)", function() {
919
+ var p;
920
+ p = {};
921
+ beforeEach(function() {
922
+ p = new bcv_parser();
923
+ p.set_options({
924
+ book_alone_strategy: "ignore",
925
+ book_sequence_strategy: "ignore",
926
+ osis_compaction_strategy: "bc",
927
+ captive_end_digits_strategy: "delete"
928
+ });
929
+ p.include_apocrypha(true);
930
+ });
931
+ it("should handle book: Hab (id)", function() {
932
+ expect(p.parse("Habakuk 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Habakuk 1:1'");
933
+ expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1", "parsing: 'Hab 1:1'");
934
+ p.include_apocrypha(false);
935
+ expect(p.parse("HABAKUK 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HABAKUK 1:1'");
936
+ expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1", "parsing: 'HAB 1:1'");
937
+ });
938
+ });
939
+
940
+ describe("Localized book Zeph (id)", function() {
941
+ var p;
942
+ p = {};
943
+ beforeEach(function() {
944
+ p = new bcv_parser();
945
+ p.set_options({
946
+ book_alone_strategy: "ignore",
947
+ book_sequence_strategy: "ignore",
948
+ osis_compaction_strategy: "bc",
949
+ captive_end_digits_strategy: "delete"
950
+ });
951
+ p.include_apocrypha(true);
952
+ });
953
+ it("should handle book: Zeph (id)", function() {
954
+ expect(p.parse("Zefanya 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zefanya 1:1'");
955
+ expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zeph 1:1'");
956
+ expect(p.parse("Zef 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'Zef 1:1'");
957
+ p.include_apocrypha(false);
958
+ expect(p.parse("ZEFANYA 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEFANYA 1:1'");
959
+ expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEPH 1:1'");
960
+ expect(p.parse("ZEF 1:1").osis()).toEqual("Zeph.1.1", "parsing: 'ZEF 1:1'");
961
+ });
962
+ });
963
+
964
+ describe("Localized book Hag (id)", function() {
965
+ var p;
966
+ p = {};
967
+ beforeEach(function() {
968
+ p = new bcv_parser();
969
+ p.set_options({
970
+ book_alone_strategy: "ignore",
971
+ book_sequence_strategy: "ignore",
972
+ osis_compaction_strategy: "bc",
973
+ captive_end_digits_strategy: "delete"
974
+ });
975
+ p.include_apocrypha(true);
976
+ });
977
+ it("should handle book: Hag (id)", function() {
978
+ expect(p.parse("Hagai 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hagai 1:1'");
979
+ expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1", "parsing: 'Hag 1:1'");
980
+ p.include_apocrypha(false);
981
+ expect(p.parse("HAGAI 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAGAI 1:1'");
982
+ expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1", "parsing: 'HAG 1:1'");
983
+ });
984
+ });
985
+
986
+ describe("Localized book Zech (id)", function() {
987
+ var p;
988
+ p = {};
989
+ beforeEach(function() {
990
+ p = new bcv_parser();
991
+ p.set_options({
992
+ book_alone_strategy: "ignore",
993
+ book_sequence_strategy: "ignore",
994
+ osis_compaction_strategy: "bc",
995
+ captive_end_digits_strategy: "delete"
996
+ });
997
+ p.include_apocrypha(true);
998
+ });
999
+ it("should handle book: Zech (id)", function() {
1000
+ expect(p.parse("Zakharia 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zakharia 1:1'");
1001
+ expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Zech 1:1'");
1002
+ expect(p.parse("Za 1:1").osis()).toEqual("Zech.1.1", "parsing: 'Za 1:1'");
1003
+ p.include_apocrypha(false);
1004
+ expect(p.parse("ZAKHARIA 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZAKHARIA 1:1'");
1005
+ expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZECH 1:1'");
1006
+ expect(p.parse("ZA 1:1").osis()).toEqual("Zech.1.1", "parsing: 'ZA 1:1'");
1007
+ });
1008
+ });
1009
+
1010
+ describe("Localized book Mal (id)", function() {
1011
+ var p;
1012
+ p = {};
1013
+ beforeEach(function() {
1014
+ p = new bcv_parser();
1015
+ p.set_options({
1016
+ book_alone_strategy: "ignore",
1017
+ book_sequence_strategy: "ignore",
1018
+ osis_compaction_strategy: "bc",
1019
+ captive_end_digits_strategy: "delete"
1020
+ });
1021
+ p.include_apocrypha(true);
1022
+ });
1023
+ it("should handle book: Mal (id)", function() {
1024
+ expect(p.parse("Maleakhi 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Maleakhi 1:1'");
1025
+ expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1", "parsing: 'Mal 1:1'");
1026
+ p.include_apocrypha(false);
1027
+ expect(p.parse("MALEAKHI 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MALEAKHI 1:1'");
1028
+ expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1", "parsing: 'MAL 1:1'");
1029
+ });
1030
+ });
1031
+
1032
+ describe("Localized book Matt (id)", function() {
1033
+ var p;
1034
+ p = {};
1035
+ beforeEach(function() {
1036
+ p = new bcv_parser();
1037
+ p.set_options({
1038
+ book_alone_strategy: "ignore",
1039
+ book_sequence_strategy: "ignore",
1040
+ osis_compaction_strategy: "bc",
1041
+ captive_end_digits_strategy: "delete"
1042
+ });
1043
+ p.include_apocrypha(true);
1044
+ });
1045
+ it("should handle book: Matt (id)", function() {
1046
+ expect(p.parse("Matius 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matius 1:1'");
1047
+ expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Matt 1:1'");
1048
+ expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1", "parsing: 'Mat 1:1'");
1049
+ p.include_apocrypha(false);
1050
+ expect(p.parse("MATIUS 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATIUS 1:1'");
1051
+ expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MATT 1:1'");
1052
+ expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1", "parsing: 'MAT 1:1'");
1053
+ });
1054
+ });
1055
+
1056
+ describe("Localized book Mark (id)", function() {
1057
+ var p;
1058
+ p = {};
1059
+ beforeEach(function() {
1060
+ p = new bcv_parser();
1061
+ p.set_options({
1062
+ book_alone_strategy: "ignore",
1063
+ book_sequence_strategy: "ignore",
1064
+ osis_compaction_strategy: "bc",
1065
+ captive_end_digits_strategy: "delete"
1066
+ });
1067
+ p.include_apocrypha(true);
1068
+ });
1069
+ it("should handle book: Mark (id)", function() {
1070
+ expect(p.parse("Markus 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Markus 1:1'");
1071
+ expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mark 1:1'");
1072
+ expect(p.parse("Mrk 1:1").osis()).toEqual("Mark.1.1", "parsing: 'Mrk 1:1'");
1073
+ p.include_apocrypha(false);
1074
+ expect(p.parse("MARKUS 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARKUS 1:1'");
1075
+ expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MARK 1:1'");
1076
+ expect(p.parse("MRK 1:1").osis()).toEqual("Mark.1.1", "parsing: 'MRK 1:1'");
1077
+ });
1078
+ });
1079
+
1080
+ describe("Localized book Luke (id)", function() {
1081
+ var p;
1082
+ p = {};
1083
+ beforeEach(function() {
1084
+ p = new bcv_parser();
1085
+ p.set_options({
1086
+ book_alone_strategy: "ignore",
1087
+ book_sequence_strategy: "ignore",
1088
+ osis_compaction_strategy: "bc",
1089
+ captive_end_digits_strategy: "delete"
1090
+ });
1091
+ p.include_apocrypha(true);
1092
+ });
1093
+ it("should handle book: Luke (id)", function() {
1094
+ expect(p.parse("Lukas 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Lukas 1:1'");
1095
+ expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luke 1:1'");
1096
+ expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1", "parsing: 'Luk 1:1'");
1097
+ p.include_apocrypha(false);
1098
+ expect(p.parse("LUKAS 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKAS 1:1'");
1099
+ expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUKE 1:1'");
1100
+ expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1", "parsing: 'LUK 1:1'");
1101
+ });
1102
+ });
1103
+
1104
+ describe("Localized book 1John (id)", function() {
1105
+ var p;
1106
+ p = {};
1107
+ beforeEach(function() {
1108
+ p = new bcv_parser();
1109
+ p.set_options({
1110
+ book_alone_strategy: "ignore",
1111
+ book_sequence_strategy: "ignore",
1112
+ osis_compaction_strategy: "bc",
1113
+ captive_end_digits_strategy: "delete"
1114
+ });
1115
+ p.include_apocrypha(true);
1116
+ });
1117
+ it("should handle book: 1John (id)", function() {
1118
+ expect(p.parse("1. Yohanes 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yohanes 1:1'");
1119
+ expect(p.parse("1 Yohanes 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yohanes 1:1'");
1120
+ expect(p.parse("1. Yoh 1:1").osis()).toEqual("1John.1.1", "parsing: '1. Yoh 1:1'");
1121
+ expect(p.parse("1 Yoh 1:1").osis()).toEqual("1John.1.1", "parsing: '1 Yoh 1:1'");
1122
+ expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1", "parsing: '1John 1:1'");
1123
+ p.include_apocrypha(false);
1124
+ expect(p.parse("1. YOHANES 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YOHANES 1:1'");
1125
+ expect(p.parse("1 YOHANES 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YOHANES 1:1'");
1126
+ expect(p.parse("1. YOH 1:1").osis()).toEqual("1John.1.1", "parsing: '1. YOH 1:1'");
1127
+ expect(p.parse("1 YOH 1:1").osis()).toEqual("1John.1.1", "parsing: '1 YOH 1:1'");
1128
+ expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1", "parsing: '1JOHN 1:1'");
1129
+ });
1130
+ });
1131
+
1132
+ describe("Localized book 2John (id)", function() {
1133
+ var p;
1134
+ p = {};
1135
+ beforeEach(function() {
1136
+ p = new bcv_parser();
1137
+ p.set_options({
1138
+ book_alone_strategy: "ignore",
1139
+ book_sequence_strategy: "ignore",
1140
+ osis_compaction_strategy: "bc",
1141
+ captive_end_digits_strategy: "delete"
1142
+ });
1143
+ p.include_apocrypha(true);
1144
+ });
1145
+ it("should handle book: 2John (id)", function() {
1146
+ expect(p.parse("2. Yohanes 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yohanes 1:1'");
1147
+ expect(p.parse("2 Yohanes 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yohanes 1:1'");
1148
+ expect(p.parse("2. Yoh 1:1").osis()).toEqual("2John.1.1", "parsing: '2. Yoh 1:1'");
1149
+ expect(p.parse("2 Yoh 1:1").osis()).toEqual("2John.1.1", "parsing: '2 Yoh 1:1'");
1150
+ expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1", "parsing: '2John 1:1'");
1151
+ p.include_apocrypha(false);
1152
+ expect(p.parse("2. YOHANES 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YOHANES 1:1'");
1153
+ expect(p.parse("2 YOHANES 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YOHANES 1:1'");
1154
+ expect(p.parse("2. YOH 1:1").osis()).toEqual("2John.1.1", "parsing: '2. YOH 1:1'");
1155
+ expect(p.parse("2 YOH 1:1").osis()).toEqual("2John.1.1", "parsing: '2 YOH 1:1'");
1156
+ expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1", "parsing: '2JOHN 1:1'");
1157
+ });
1158
+ });
1159
+
1160
+ describe("Localized book 3John (id)", function() {
1161
+ var p;
1162
+ p = {};
1163
+ beforeEach(function() {
1164
+ p = new bcv_parser();
1165
+ p.set_options({
1166
+ book_alone_strategy: "ignore",
1167
+ book_sequence_strategy: "ignore",
1168
+ osis_compaction_strategy: "bc",
1169
+ captive_end_digits_strategy: "delete"
1170
+ });
1171
+ p.include_apocrypha(true);
1172
+ });
1173
+ it("should handle book: 3John (id)", function() {
1174
+ expect(p.parse("3. Yohanes 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yohanes 1:1'");
1175
+ expect(p.parse("3 Yohanes 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yohanes 1:1'");
1176
+ expect(p.parse("3. Yoh 1:1").osis()).toEqual("3John.1.1", "parsing: '3. Yoh 1:1'");
1177
+ expect(p.parse("3 Yoh 1:1").osis()).toEqual("3John.1.1", "parsing: '3 Yoh 1:1'");
1178
+ expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1", "parsing: '3John 1:1'");
1179
+ p.include_apocrypha(false);
1180
+ expect(p.parse("3. YOHANES 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YOHANES 1:1'");
1181
+ expect(p.parse("3 YOHANES 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YOHANES 1:1'");
1182
+ expect(p.parse("3. YOH 1:1").osis()).toEqual("3John.1.1", "parsing: '3. YOH 1:1'");
1183
+ expect(p.parse("3 YOH 1:1").osis()).toEqual("3John.1.1", "parsing: '3 YOH 1:1'");
1184
+ expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1", "parsing: '3JOHN 1:1'");
1185
+ });
1186
+ });
1187
+
1188
+ describe("Localized book John (id)", function() {
1189
+ var p;
1190
+ p = {};
1191
+ beforeEach(function() {
1192
+ p = new bcv_parser();
1193
+ p.set_options({
1194
+ book_alone_strategy: "ignore",
1195
+ book_sequence_strategy: "ignore",
1196
+ osis_compaction_strategy: "bc",
1197
+ captive_end_digits_strategy: "delete"
1198
+ });
1199
+ p.include_apocrypha(true);
1200
+ });
1201
+ it("should handle book: John (id)", function() {
1202
+ expect(p.parse("Yohanes 1:1").osis()).toEqual("John.1.1", "parsing: 'Yohanes 1:1'");
1203
+ expect(p.parse("John 1:1").osis()).toEqual("John.1.1", "parsing: 'John 1:1'");
1204
+ expect(p.parse("Yoh 1:1").osis()).toEqual("John.1.1", "parsing: 'Yoh 1:1'");
1205
+ p.include_apocrypha(false);
1206
+ expect(p.parse("YOHANES 1:1").osis()).toEqual("John.1.1", "parsing: 'YOHANES 1:1'");
1207
+ expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1", "parsing: 'JOHN 1:1'");
1208
+ expect(p.parse("YOH 1:1").osis()).toEqual("John.1.1", "parsing: 'YOH 1:1'");
1209
+ });
1210
+ });
1211
+
1212
+ describe("Localized book Acts (id)", function() {
1213
+ var p;
1214
+ p = {};
1215
+ beforeEach(function() {
1216
+ p = new bcv_parser();
1217
+ p.set_options({
1218
+ book_alone_strategy: "ignore",
1219
+ book_sequence_strategy: "ignore",
1220
+ osis_compaction_strategy: "bc",
1221
+ captive_end_digits_strategy: "delete"
1222
+ });
1223
+ p.include_apocrypha(true);
1224
+ });
1225
+ it("should handle book: Acts (id)", function() {
1226
+ expect(p.parse("Kisah Para Rasu 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Kisah Para Rasu 1:1'");
1227
+ expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Acts 1:1'");
1228
+ expect(p.parse("Kis 1:1").osis()).toEqual("Acts.1.1", "parsing: 'Kis 1:1'");
1229
+ p.include_apocrypha(false);
1230
+ expect(p.parse("KISAH PARA RASU 1:1").osis()).toEqual("Acts.1.1", "parsing: 'KISAH PARA RASU 1:1'");
1231
+ expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'ACTS 1:1'");
1232
+ expect(p.parse("KIS 1:1").osis()).toEqual("Acts.1.1", "parsing: 'KIS 1:1'");
1233
+ });
1234
+ });
1235
+
1236
+ describe("Localized book Rom (id)", function() {
1237
+ var p;
1238
+ p = {};
1239
+ beforeEach(function() {
1240
+ p = new bcv_parser();
1241
+ p.set_options({
1242
+ book_alone_strategy: "ignore",
1243
+ book_sequence_strategy: "ignore",
1244
+ osis_compaction_strategy: "bc",
1245
+ captive_end_digits_strategy: "delete"
1246
+ });
1247
+ p.include_apocrypha(true);
1248
+ });
1249
+ it("should handle book: Rom (id)", function() {
1250
+ expect(p.parse("Roma 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Roma 1:1'");
1251
+ expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rom 1:1'");
1252
+ expect(p.parse("Rm 1:1").osis()).toEqual("Rom.1.1", "parsing: 'Rm 1:1'");
1253
+ p.include_apocrypha(false);
1254
+ expect(p.parse("ROMA 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROMA 1:1'");
1255
+ expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'ROM 1:1'");
1256
+ expect(p.parse("RM 1:1").osis()).toEqual("Rom.1.1", "parsing: 'RM 1:1'");
1257
+ });
1258
+ });
1259
+
1260
+ describe("Localized book 2Cor (id)", function() {
1261
+ var p;
1262
+ p = {};
1263
+ beforeEach(function() {
1264
+ p = new bcv_parser();
1265
+ p.set_options({
1266
+ book_alone_strategy: "ignore",
1267
+ book_sequence_strategy: "ignore",
1268
+ osis_compaction_strategy: "bc",
1269
+ captive_end_digits_strategy: "delete"
1270
+ });
1271
+ p.include_apocrypha(true);
1272
+ });
1273
+ it("should handle book: 2Cor (id)", function() {
1274
+ expect(p.parse("2. Korintus 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Korintus 1:1'");
1275
+ expect(p.parse("2 Korintus 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Korintus 1:1'");
1276
+ expect(p.parse("2. Kor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. Kor 1:1'");
1277
+ expect(p.parse("2 Kor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 Kor 1:1'");
1278
+ expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2Cor 1:1'");
1279
+ p.include_apocrypha(false);
1280
+ expect(p.parse("2. KORINTUS 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KORINTUS 1:1'");
1281
+ expect(p.parse("2 KORINTUS 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KORINTUS 1:1'");
1282
+ expect(p.parse("2. KOR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2. KOR 1:1'");
1283
+ expect(p.parse("2 KOR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2 KOR 1:1'");
1284
+ expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1", "parsing: '2COR 1:1'");
1285
+ });
1286
+ });
1287
+
1288
+ describe("Localized book 1Cor (id)", function() {
1289
+ var p;
1290
+ p = {};
1291
+ beforeEach(function() {
1292
+ p = new bcv_parser();
1293
+ p.set_options({
1294
+ book_alone_strategy: "ignore",
1295
+ book_sequence_strategy: "ignore",
1296
+ osis_compaction_strategy: "bc",
1297
+ captive_end_digits_strategy: "delete"
1298
+ });
1299
+ p.include_apocrypha(true);
1300
+ });
1301
+ it("should handle book: 1Cor (id)", function() {
1302
+ expect(p.parse("1. Korintus 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Korintus 1:1'");
1303
+ expect(p.parse("1 Korintus 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Korintus 1:1'");
1304
+ expect(p.parse("1. Kor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. Kor 1:1'");
1305
+ expect(p.parse("1 Kor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 Kor 1:1'");
1306
+ expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1Cor 1:1'");
1307
+ p.include_apocrypha(false);
1308
+ expect(p.parse("1. KORINTUS 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KORINTUS 1:1'");
1309
+ expect(p.parse("1 KORINTUS 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KORINTUS 1:1'");
1310
+ expect(p.parse("1. KOR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1. KOR 1:1'");
1311
+ expect(p.parse("1 KOR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1 KOR 1:1'");
1312
+ expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1", "parsing: '1COR 1:1'");
1313
+ });
1314
+ });
1315
+
1316
+ describe("Localized book Gal (id)", function() {
1317
+ var p;
1318
+ p = {};
1319
+ beforeEach(function() {
1320
+ p = new bcv_parser();
1321
+ p.set_options({
1322
+ book_alone_strategy: "ignore",
1323
+ book_sequence_strategy: "ignore",
1324
+ osis_compaction_strategy: "bc",
1325
+ captive_end_digits_strategy: "delete"
1326
+ });
1327
+ p.include_apocrypha(true);
1328
+ });
1329
+ it("should handle book: Gal (id)", function() {
1330
+ expect(p.parse("Galatia 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Galatia 1:1'");
1331
+ expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1", "parsing: 'Gal 1:1'");
1332
+ p.include_apocrypha(false);
1333
+ expect(p.parse("GALATIA 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GALATIA 1:1'");
1334
+ expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1", "parsing: 'GAL 1:1'");
1335
+ });
1336
+ });
1337
+
1338
+ describe("Localized book Eph (id)", function() {
1339
+ var p;
1340
+ p = {};
1341
+ beforeEach(function() {
1342
+ p = new bcv_parser();
1343
+ p.set_options({
1344
+ book_alone_strategy: "ignore",
1345
+ book_sequence_strategy: "ignore",
1346
+ osis_compaction_strategy: "bc",
1347
+ captive_end_digits_strategy: "delete"
1348
+ });
1349
+ p.include_apocrypha(true);
1350
+ });
1351
+ it("should handle book: Eph (id)", function() {
1352
+ expect(p.parse("Efesus 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Efesus 1:1'");
1353
+ expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Eph 1:1'");
1354
+ expect(p.parse("Ef 1:1").osis()).toEqual("Eph.1.1", "parsing: 'Ef 1:1'");
1355
+ p.include_apocrypha(false);
1356
+ expect(p.parse("EFESUS 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EFESUS 1:1'");
1357
+ expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EPH 1:1'");
1358
+ expect(p.parse("EF 1:1").osis()).toEqual("Eph.1.1", "parsing: 'EF 1:1'");
1359
+ });
1360
+ });
1361
+
1362
+ describe("Localized book Phil (id)", function() {
1363
+ var p;
1364
+ p = {};
1365
+ beforeEach(function() {
1366
+ p = new bcv_parser();
1367
+ p.set_options({
1368
+ book_alone_strategy: "ignore",
1369
+ book_sequence_strategy: "ignore",
1370
+ osis_compaction_strategy: "bc",
1371
+ captive_end_digits_strategy: "delete"
1372
+ });
1373
+ p.include_apocrypha(true);
1374
+ });
1375
+ it("should handle book: Phil (id)", function() {
1376
+ expect(p.parse("Filipi 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Filipi 1:1'");
1377
+ expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Phil 1:1'");
1378
+ expect(p.parse("Flp 1:1").osis()).toEqual("Phil.1.1", "parsing: 'Flp 1:1'");
1379
+ p.include_apocrypha(false);
1380
+ expect(p.parse("FILIPI 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FILIPI 1:1'");
1381
+ expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1", "parsing: 'PHIL 1:1'");
1382
+ expect(p.parse("FLP 1:1").osis()).toEqual("Phil.1.1", "parsing: 'FLP 1:1'");
1383
+ });
1384
+ });
1385
+
1386
+ describe("Localized book Col (id)", function() {
1387
+ var p;
1388
+ p = {};
1389
+ beforeEach(function() {
1390
+ p = new bcv_parser();
1391
+ p.set_options({
1392
+ book_alone_strategy: "ignore",
1393
+ book_sequence_strategy: "ignore",
1394
+ osis_compaction_strategy: "bc",
1395
+ captive_end_digits_strategy: "delete"
1396
+ });
1397
+ p.include_apocrypha(true);
1398
+ });
1399
+ it("should handle book: Col (id)", function() {
1400
+ expect(p.parse("Kolose 1:1").osis()).toEqual("Col.1.1", "parsing: 'Kolose 1:1'");
1401
+ expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1", "parsing: 'Col 1:1'");
1402
+ expect(p.parse("Kol 1:1").osis()).toEqual("Col.1.1", "parsing: 'Kol 1:1'");
1403
+ p.include_apocrypha(false);
1404
+ expect(p.parse("KOLOSE 1:1").osis()).toEqual("Col.1.1", "parsing: 'KOLOSE 1:1'");
1405
+ expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1", "parsing: 'COL 1:1'");
1406
+ expect(p.parse("KOL 1:1").osis()).toEqual("Col.1.1", "parsing: 'KOL 1:1'");
1407
+ });
1408
+ });
1409
+
1410
+ describe("Localized book 2Thess (id)", function() {
1411
+ var p;
1412
+ p = {};
1413
+ beforeEach(function() {
1414
+ p = new bcv_parser();
1415
+ p.set_options({
1416
+ book_alone_strategy: "ignore",
1417
+ book_sequence_strategy: "ignore",
1418
+ osis_compaction_strategy: "bc",
1419
+ captive_end_digits_strategy: "delete"
1420
+ });
1421
+ p.include_apocrypha(true);
1422
+ });
1423
+ it("should handle book: 2Thess (id)", function() {
1424
+ expect(p.parse("2. Tesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Tesalonika 1:1'");
1425
+ expect(p.parse("2 Tesalonika 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Tesalonika 1:1'");
1426
+ expect(p.parse("2. Tes 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. Tes 1:1'");
1427
+ expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2Thess 1:1'");
1428
+ expect(p.parse("2 Tes 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 Tes 1:1'");
1429
+ p.include_apocrypha(false);
1430
+ expect(p.parse("2. TESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TESALONIKA 1:1'");
1431
+ expect(p.parse("2 TESALONIKA 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TESALONIKA 1:1'");
1432
+ expect(p.parse("2. TES 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2. TES 1:1'");
1433
+ expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2THESS 1:1'");
1434
+ expect(p.parse("2 TES 1:1").osis()).toEqual("2Thess.1.1", "parsing: '2 TES 1:1'");
1435
+ });
1436
+ });
1437
+
1438
+ describe("Localized book 1Thess (id)", function() {
1439
+ var p;
1440
+ p = {};
1441
+ beforeEach(function() {
1442
+ p = new bcv_parser();
1443
+ p.set_options({
1444
+ book_alone_strategy: "ignore",
1445
+ book_sequence_strategy: "ignore",
1446
+ osis_compaction_strategy: "bc",
1447
+ captive_end_digits_strategy: "delete"
1448
+ });
1449
+ p.include_apocrypha(true);
1450
+ });
1451
+ it("should handle book: 1Thess (id)", function() {
1452
+ expect(p.parse("1. Tesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Tesalonika 1:1'");
1453
+ expect(p.parse("1 Tesalonika 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Tesalonika 1:1'");
1454
+ expect(p.parse("1. Tes 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. Tes 1:1'");
1455
+ expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1Thess 1:1'");
1456
+ expect(p.parse("1 Tes 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 Tes 1:1'");
1457
+ p.include_apocrypha(false);
1458
+ expect(p.parse("1. TESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TESALONIKA 1:1'");
1459
+ expect(p.parse("1 TESALONIKA 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TESALONIKA 1:1'");
1460
+ expect(p.parse("1. TES 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1. TES 1:1'");
1461
+ expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1THESS 1:1'");
1462
+ expect(p.parse("1 TES 1:1").osis()).toEqual("1Thess.1.1", "parsing: '1 TES 1:1'");
1463
+ });
1464
+ });
1465
+
1466
+ describe("Localized book 2Tim (id)", function() {
1467
+ var p;
1468
+ p = {};
1469
+ beforeEach(function() {
1470
+ p = new bcv_parser();
1471
+ p.set_options({
1472
+ book_alone_strategy: "ignore",
1473
+ book_sequence_strategy: "ignore",
1474
+ osis_compaction_strategy: "bc",
1475
+ captive_end_digits_strategy: "delete"
1476
+ });
1477
+ p.include_apocrypha(true);
1478
+ });
1479
+ it("should handle book: 2Tim (id)", function() {
1480
+ expect(p.parse("2. Timotius 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Timotius 1:1'");
1481
+ expect(p.parse("2 Timotius 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Timotius 1:1'");
1482
+ expect(p.parse("2. Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. Tim 1:1'");
1483
+ expect(p.parse("2 Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 Tim 1:1'");
1484
+ expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2Tim 1:1'");
1485
+ p.include_apocrypha(false);
1486
+ expect(p.parse("2. TIMOTIUS 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIMOTIUS 1:1'");
1487
+ expect(p.parse("2 TIMOTIUS 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIMOTIUS 1:1'");
1488
+ expect(p.parse("2. TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2. TIM 1:1'");
1489
+ expect(p.parse("2 TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2 TIM 1:1'");
1490
+ expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1", "parsing: '2TIM 1:1'");
1491
+ });
1492
+ });
1493
+
1494
+ describe("Localized book 1Tim (id)", function() {
1495
+ var p;
1496
+ p = {};
1497
+ beforeEach(function() {
1498
+ p = new bcv_parser();
1499
+ p.set_options({
1500
+ book_alone_strategy: "ignore",
1501
+ book_sequence_strategy: "ignore",
1502
+ osis_compaction_strategy: "bc",
1503
+ captive_end_digits_strategy: "delete"
1504
+ });
1505
+ p.include_apocrypha(true);
1506
+ });
1507
+ it("should handle book: 1Tim (id)", function() {
1508
+ expect(p.parse("1. Timotius 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Timotius 1:1'");
1509
+ expect(p.parse("1 Timotius 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Timotius 1:1'");
1510
+ expect(p.parse("1. Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. Tim 1:1'");
1511
+ expect(p.parse("1 Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 Tim 1:1'");
1512
+ expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1Tim 1:1'");
1513
+ p.include_apocrypha(false);
1514
+ expect(p.parse("1. TIMOTIUS 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIMOTIUS 1:1'");
1515
+ expect(p.parse("1 TIMOTIUS 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIMOTIUS 1:1'");
1516
+ expect(p.parse("1. TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1. TIM 1:1'");
1517
+ expect(p.parse("1 TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1 TIM 1:1'");
1518
+ expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1", "parsing: '1TIM 1:1'");
1519
+ });
1520
+ });
1521
+
1522
+ describe("Localized book Titus (id)", function() {
1523
+ var p;
1524
+ p = {};
1525
+ beforeEach(function() {
1526
+ p = new bcv_parser();
1527
+ p.set_options({
1528
+ book_alone_strategy: "ignore",
1529
+ book_sequence_strategy: "ignore",
1530
+ osis_compaction_strategy: "bc",
1531
+ captive_end_digits_strategy: "delete"
1532
+ });
1533
+ p.include_apocrypha(true);
1534
+ });
1535
+ it("should handle book: Titus (id)", function() {
1536
+ expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Titus 1:1'");
1537
+ expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1", "parsing: 'Tit 1:1'");
1538
+ p.include_apocrypha(false);
1539
+ expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TITUS 1:1'");
1540
+ expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1", "parsing: 'TIT 1:1'");
1541
+ });
1542
+ });
1543
+
1544
+ describe("Localized book Phlm (id)", function() {
1545
+ var p;
1546
+ p = {};
1547
+ beforeEach(function() {
1548
+ p = new bcv_parser();
1549
+ p.set_options({
1550
+ book_alone_strategy: "ignore",
1551
+ book_sequence_strategy: "ignore",
1552
+ osis_compaction_strategy: "bc",
1553
+ captive_end_digits_strategy: "delete"
1554
+ });
1555
+ p.include_apocrypha(true);
1556
+ });
1557
+ it("should handle book: Phlm (id)", function() {
1558
+ expect(p.parse("Filemon 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Filemon 1:1'");
1559
+ expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Phlm 1:1'");
1560
+ expect(p.parse("Flm 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'Flm 1:1'");
1561
+ p.include_apocrypha(false);
1562
+ expect(p.parse("FILEMON 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FILEMON 1:1'");
1563
+ expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'PHLM 1:1'");
1564
+ expect(p.parse("FLM 1:1").osis()).toEqual("Phlm.1.1", "parsing: 'FLM 1:1'");
1565
+ });
1566
+ });
1567
+
1568
+ describe("Localized book Heb (id)", function() {
1569
+ var p;
1570
+ p = {};
1571
+ beforeEach(function() {
1572
+ p = new bcv_parser();
1573
+ p.set_options({
1574
+ book_alone_strategy: "ignore",
1575
+ book_sequence_strategy: "ignore",
1576
+ osis_compaction_strategy: "bc",
1577
+ captive_end_digits_strategy: "delete"
1578
+ });
1579
+ p.include_apocrypha(true);
1580
+ });
1581
+ it("should handle book: Heb (id)", function() {
1582
+ expect(p.parse("Ibrani 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Ibrani 1:1'");
1583
+ expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Heb 1:1'");
1584
+ expect(p.parse("Ibr 1:1").osis()).toEqual("Heb.1.1", "parsing: 'Ibr 1:1'");
1585
+ p.include_apocrypha(false);
1586
+ expect(p.parse("IBRANI 1:1").osis()).toEqual("Heb.1.1", "parsing: 'IBRANI 1:1'");
1587
+ expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1", "parsing: 'HEB 1:1'");
1588
+ expect(p.parse("IBR 1:1").osis()).toEqual("Heb.1.1", "parsing: 'IBR 1:1'");
1589
+ });
1590
+ });
1591
+
1592
+ describe("Localized book Jas (id)", function() {
1593
+ var p;
1594
+ p = {};
1595
+ beforeEach(function() {
1596
+ p = new bcv_parser();
1597
+ p.set_options({
1598
+ book_alone_strategy: "ignore",
1599
+ book_sequence_strategy: "ignore",
1600
+ osis_compaction_strategy: "bc",
1601
+ captive_end_digits_strategy: "delete"
1602
+ });
1603
+ p.include_apocrypha(true);
1604
+ });
1605
+ it("should handle book: Jas (id)", function() {
1606
+ expect(p.parse("Yakobus 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yakobus 1:1'");
1607
+ expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Jas 1:1'");
1608
+ expect(p.parse("Yak 1:1").osis()).toEqual("Jas.1.1", "parsing: 'Yak 1:1'");
1609
+ p.include_apocrypha(false);
1610
+ expect(p.parse("YAKOBUS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAKOBUS 1:1'");
1611
+ expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1", "parsing: 'JAS 1:1'");
1612
+ expect(p.parse("YAK 1:1").osis()).toEqual("Jas.1.1", "parsing: 'YAK 1:1'");
1613
+ });
1614
+ });
1615
+
1616
+ describe("Localized book 2Pet (id)", function() {
1617
+ var p;
1618
+ p = {};
1619
+ beforeEach(function() {
1620
+ p = new bcv_parser();
1621
+ p.set_options({
1622
+ book_alone_strategy: "ignore",
1623
+ book_sequence_strategy: "ignore",
1624
+ osis_compaction_strategy: "bc",
1625
+ captive_end_digits_strategy: "delete"
1626
+ });
1627
+ p.include_apocrypha(true);
1628
+ });
1629
+ it("should handle book: 2Pet (id)", function() {
1630
+ expect(p.parse("2. Petrus 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Petrus 1:1'");
1631
+ expect(p.parse("2 Petrus 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Petrus 1:1'");
1632
+ expect(p.parse("2. Ptr 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. Ptr 1:1'");
1633
+ expect(p.parse("2 Ptr 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 Ptr 1:1'");
1634
+ expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2Pet 1:1'");
1635
+ p.include_apocrypha(false);
1636
+ expect(p.parse("2. PETRUS 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PETRUS 1:1'");
1637
+ expect(p.parse("2 PETRUS 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PETRUS 1:1'");
1638
+ expect(p.parse("2. PTR 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2. PTR 1:1'");
1639
+ expect(p.parse("2 PTR 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2 PTR 1:1'");
1640
+ expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1", "parsing: '2PET 1:1'");
1641
+ });
1642
+ });
1643
+
1644
+ describe("Localized book 1Pet (id)", function() {
1645
+ var p;
1646
+ p = {};
1647
+ beforeEach(function() {
1648
+ p = new bcv_parser();
1649
+ p.set_options({
1650
+ book_alone_strategy: "ignore",
1651
+ book_sequence_strategy: "ignore",
1652
+ osis_compaction_strategy: "bc",
1653
+ captive_end_digits_strategy: "delete"
1654
+ });
1655
+ p.include_apocrypha(true);
1656
+ });
1657
+ it("should handle book: 1Pet (id)", function() {
1658
+ expect(p.parse("1. Petrus 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Petrus 1:1'");
1659
+ expect(p.parse("1 Petrus 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Petrus 1:1'");
1660
+ expect(p.parse("1. Ptr 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. Ptr 1:1'");
1661
+ expect(p.parse("1 Ptr 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 Ptr 1:1'");
1662
+ expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1Pet 1:1'");
1663
+ p.include_apocrypha(false);
1664
+ expect(p.parse("1. PETRUS 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PETRUS 1:1'");
1665
+ expect(p.parse("1 PETRUS 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PETRUS 1:1'");
1666
+ expect(p.parse("1. PTR 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1. PTR 1:1'");
1667
+ expect(p.parse("1 PTR 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1 PTR 1:1'");
1668
+ expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1", "parsing: '1PET 1:1'");
1669
+ });
1670
+ });
1671
+
1672
+ describe("Localized book Jude (id)", function() {
1673
+ var p;
1674
+ p = {};
1675
+ beforeEach(function() {
1676
+ p = new bcv_parser();
1677
+ p.set_options({
1678
+ book_alone_strategy: "ignore",
1679
+ book_sequence_strategy: "ignore",
1680
+ osis_compaction_strategy: "bc",
1681
+ captive_end_digits_strategy: "delete"
1682
+ });
1683
+ p.include_apocrypha(true);
1684
+ });
1685
+ it("should handle book: Jude (id)", function() {
1686
+ expect(p.parse("Yudas 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yudas 1:1'");
1687
+ expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Jude 1:1'");
1688
+ expect(p.parse("Yud 1:1").osis()).toEqual("Jude.1.1", "parsing: 'Yud 1:1'");
1689
+ p.include_apocrypha(false);
1690
+ expect(p.parse("YUDAS 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUDAS 1:1'");
1691
+ expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1", "parsing: 'JUDE 1:1'");
1692
+ expect(p.parse("YUD 1:1").osis()).toEqual("Jude.1.1", "parsing: 'YUD 1:1'");
1693
+ });
1694
+ });
1695
+
1696
+ describe("Miscellaneous tests", function() {
1697
+ var p;
1698
+ p = {};
1699
+ beforeEach(function() {
1700
+ p = new bcv_parser();
1701
+ p.set_options({
1702
+ book_alone_strategy: "ignore",
1703
+ book_sequence_strategy: "ignore",
1704
+ osis_compaction_strategy: "bc",
1705
+ captive_end_digits_strategy: "delete"
1706
+ });
1707
+ p.include_apocrypha(true);
1708
+ });
1709
+ it("should return the expected language", function() {
1710
+ expect(p.languages).toEqual(["id"]);
1711
+ });
1712
+ it("should handle ranges (id)", function() {
1713
+ expect(p.parse("Titus 1:1 sampai 2").osis()).toEqual("Titus.1.1-Titus.1.2", "parsing: 'Titus 1:1 sampai 2'");
1714
+ expect(p.parse("Matt 1sampai2").osis()).toEqual("Matt.1-Matt.2", "parsing: 'Matt 1sampai2'");
1715
+ expect(p.parse("Phlm 2 SAMPAI 3").osis()).toEqual("Phlm.1.2-Phlm.1.3", "parsing: 'Phlm 2 SAMPAI 3'");
1716
+ });
1717
+ it("should handle chapters (id)", function() {
1718
+ expect(p.parse("Titus 1:1, bab 2").osis()).toEqual("Titus.1.1,Titus.2", "parsing: 'Titus 1:1, bab 2'");
1719
+ expect(p.parse("Matt 3:4 BAB 6").osis()).toEqual("Matt.3.4,Matt.6", "parsing: 'Matt 3:4 BAB 6'");
1720
+ });
1721
+ it("should handle verses (id)", function() {
1722
+ expect(p.parse("Exod 1:1 ayat 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 ayat 3'");
1723
+ expect(p.parse("Phlm AYAT 6").osis()).toEqual("Phlm.1.6", "parsing: 'Phlm AYAT 6'");
1724
+ });
1725
+ it("should handle 'and' (id)", function() {
1726
+ expect(p.parse("Exod 1:1 dan 3").osis()).toEqual("Exod.1.1,Exod.1.3", "parsing: 'Exod 1:1 dan 3'");
1727
+ expect(p.parse("Phlm 2 DAN 6").osis()).toEqual("Phlm.1.2,Phlm.1.6", "parsing: 'Phlm 2 DAN 6'");
1728
+ });
1729
+ it("should handle titles (id)", function() {
1730
+ expect(p.parse("Ps 3 judul, 4:2, 5:judul").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'Ps 3 judul, 4:2, 5:judul'");
1731
+ expect(p.parse("PS 3 JUDUL, 4:2, 5:JUDUL").osis()).toEqual("Ps.3.1,Ps.4.2,Ps.5.1", "parsing: 'PS 3 JUDUL, 4:2, 5:JUDUL'");
1732
+ });
1733
+ it("should handle 'ff' (id)", function() {
1734
+ expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual("Rev.3-Rev.22,Rev.4.2-Rev.4.11", "parsing: 'Rev 3ff, 4:2ff'");
1735
+ 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'");
1736
+ });
1737
+ it("should handle translations (id)", function() {
1738
+ expect(p.parse("Lev 1 (atb)").osis_and_translations()).toEqual([["Lev.1", "atb"]]);
1739
+ expect(p.parse("lev 1 atb").osis_and_translations()).toEqual([["Lev.1", "atb"]]);
1740
+ });
1741
+ it("should handle book ranges (id)", function() {
1742
+ p.set_options({
1743
+ book_alone_strategy: "full",
1744
+ book_range_strategy: "include"
1745
+ });
1746
+ expect(p.parse("1 sampai 3 Yoh").osis()).toEqual("1John.1-3John.1", "parsing: '1 sampai 3 Yoh'");
1747
+ });
1748
+ return it("should handle boundaries (id)", function() {
1749
+ p.set_options({
1750
+ book_alone_strategy: "full"
1751
+ });
1752
+ expect(p.parse("\u2014Matt\u2014").osis()).toEqual("Matt.1-Matt.28", "parsing: '\u2014Matt\u2014'");
1753
+ expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual("Matt.1.1", "parsing: '\u201cMatt 1:1\u201d'");
1754
+ });
1755
+ });
1756
+
1757
+ }).call(this);