entities
listlengths
1
8.61k
max_stars_repo_path
stringlengths
7
172
max_stars_repo_name
stringlengths
5
89
max_stars_count
int64
0
82k
content
stringlengths
14
1.05M
id
stringlengths
2
6
new_content
stringlengths
15
1.05M
modified
bool
1 class
references
stringlengths
29
1.05M
[ { "context": "\n stream_config =\n key: \"test\"\n source_password: \"abc123\"\n roo", "end": 185, "score": 0.5439028143882751, "start": 181, "tag": "KEY", "value": "test" }, { "context": " \"test\"\n source_password: \"abc123\"\n root_route: true\n seconds", "end": 222, "score": 0.9984581470489502, "start": 216, "tag": "PASSWORD", "value": "abc123" }, { "context": " \"test\"\n source_password: \"abc123\"\n root_route: true\n ", "end": 4188, "score": 0.9992291331291199, "start": 4182, "tag": "PASSWORD", "value": "abc123" } ]
test/api/stream.coffee
firebrandv2/FirebrandNetwork.ga
342
MasterHelper = require "../helpers/master" request = require "request" _ = require "underscore" describe "API: Streams", -> stream_config = key: "test" source_password: "abc123" root_route: true seconds: 3600 format: "mp3" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() it "should return an empty array for GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(json).to.be.instanceof Array expect(json).to.have.length 0 done() it "rejects a POST to /streams that is missing a key", (done) -> invalid = {title:"Invalid Stream Config"} request.post url:"#{m.api_uri}/streams", json:true, body:invalid, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 422 expect(json.errors).to.have.length.gt 0 done() it "creates a stream via a valid POST to /streams", (done) -> request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # test that stream exists inside our master expect(m.master.master.streams).to.have.key stream_config.key done() it "returns that stream via GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql stream_config.key done() it "returns that stream via GET /stream/:stream", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json.key).to.eql stream_config.key done() it "returns config via GET /stream/:stream/config", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # it will have other default config settings, but it should # include all the config we gave it expect(json).to.contain.all.keys stream_config done() it "allows stream config update via PUT /streams/:stream/config", (done) -> update = seconds:7200 change_back = seconds:stream_config.seconds request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # should have all original config, except what we updated expect(json).to.contain.all.keys _.extend {}, stream_config, update # master should still know our stream expect(m.master.master.streams).to.have.key stream_config.key # now change it back request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() it "allows a stream to be deleted via DELETE /streams/:stream", (done) -> request.del url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # master should no longer know our stream expect(m.master.master.streams).to.not.have.key stream_config.key done() describe "Stream Key Change", -> stream_config = key: "test" source_password: "abc123" root_route: true seconds: 3600 format: "mp3" new_key = "testing" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() before (done) -> # create the stream request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err done() it "allows a key change via PUT /streams/#{stream_config.key}/config", (done) -> update = key:new_key request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys _.extend {}, update done() it "allows key to be changed back via PUT /streams/#{new_key}/config", (done) -> change_back = key:stream_config.key request.put url:"#{m.api_uri}/streams/#{new_key}/config", json:true, body:change_back, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() describe "Stream Groups", ->
82059
MasterHelper = require "../helpers/master" request = require "request" _ = require "underscore" describe "API: Streams", -> stream_config = key: "<KEY>" source_password: "<PASSWORD>" root_route: true seconds: 3600 format: "mp3" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() it "should return an empty array for GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(json).to.be.instanceof Array expect(json).to.have.length 0 done() it "rejects a POST to /streams that is missing a key", (done) -> invalid = {title:"Invalid Stream Config"} request.post url:"#{m.api_uri}/streams", json:true, body:invalid, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 422 expect(json.errors).to.have.length.gt 0 done() it "creates a stream via a valid POST to /streams", (done) -> request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # test that stream exists inside our master expect(m.master.master.streams).to.have.key stream_config.key done() it "returns that stream via GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql stream_config.key done() it "returns that stream via GET /stream/:stream", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json.key).to.eql stream_config.key done() it "returns config via GET /stream/:stream/config", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # it will have other default config settings, but it should # include all the config we gave it expect(json).to.contain.all.keys stream_config done() it "allows stream config update via PUT /streams/:stream/config", (done) -> update = seconds:7200 change_back = seconds:stream_config.seconds request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # should have all original config, except what we updated expect(json).to.contain.all.keys _.extend {}, stream_config, update # master should still know our stream expect(m.master.master.streams).to.have.key stream_config.key # now change it back request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() it "allows a stream to be deleted via DELETE /streams/:stream", (done) -> request.del url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # master should no longer know our stream expect(m.master.master.streams).to.not.have.key stream_config.key done() describe "Stream Key Change", -> stream_config = key: "test" source_password: "<PASSWORD>" root_route: true seconds: 3600 format: "mp3" new_key = "testing" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() before (done) -> # create the stream request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err done() it "allows a key change via PUT /streams/#{stream_config.key}/config", (done) -> update = key:new_key request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys _.extend {}, update done() it "allows key to be changed back via PUT /streams/#{new_key}/config", (done) -> change_back = key:stream_config.key request.put url:"#{m.api_uri}/streams/#{new_key}/config", json:true, body:change_back, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() describe "Stream Groups", ->
true
MasterHelper = require "../helpers/master" request = require "request" _ = require "underscore" describe "API: Streams", -> stream_config = key: "PI:KEY:<KEY>END_PI" source_password: "PI:PASSWORD:<PASSWORD>END_PI" root_route: true seconds: 3600 format: "mp3" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() it "should return an empty array for GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(json).to.be.instanceof Array expect(json).to.have.length 0 done() it "rejects a POST to /streams that is missing a key", (done) -> invalid = {title:"Invalid Stream Config"} request.post url:"#{m.api_uri}/streams", json:true, body:invalid, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 422 expect(json.errors).to.have.length.gt 0 done() it "creates a stream via a valid POST to /streams", (done) -> request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # test that stream exists inside our master expect(m.master.master.streams).to.have.key stream_config.key done() it "returns that stream via GET /streams", (done) -> request.get url:"#{m.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql stream_config.key done() it "returns that stream via GET /stream/:stream", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json.key).to.eql stream_config.key done() it "returns config via GET /stream/:stream/config", (done) -> request.get url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # it will have other default config settings, but it should # include all the config we gave it expect(json).to.contain.all.keys stream_config done() it "allows stream config update via PUT /streams/:stream/config", (done) -> update = seconds:7200 change_back = seconds:stream_config.seconds request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # should have all original config, except what we updated expect(json).to.contain.all.keys _.extend {}, stream_config, update # master should still know our stream expect(m.master.master.streams).to.have.key stream_config.key # now change it back request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() it "allows a stream to be deleted via DELETE /streams/:stream", (done) -> request.del url:"#{m.api_uri}/streams/#{stream_config.key}", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 # master should no longer know our stream expect(m.master.master.streams).to.not.have.key stream_config.key done() describe "Stream Key Change", -> stream_config = key: "test" source_password: "PI:PASSWORD:<PASSWORD>END_PI" root_route: true seconds: 3600 format: "mp3" new_key = "testing" m = null before (done) -> MasterHelper.startMaster null, (err,obj) -> throw err if err m = obj done() before (done) -> # create the stream request.post url:"#{m.api_uri}/streams", json:true, body:stream_config, (err,res,json) -> throw err if err done() it "allows a key change via PUT /streams/#{stream_config.key}/config", (done) -> update = key:new_key request.put url:"#{m.api_uri}/streams/#{stream_config.key}/config", json:true, body:update, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys _.extend {}, update done() it "allows key to be changed back via PUT /streams/#{new_key}/config", (done) -> change_back = key:stream_config.key request.put url:"#{m.api_uri}/streams/#{new_key}/config", json:true, body:change_back, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.contain.all.keys stream_config done() describe "Stream Groups", ->
[ { "context": " # unambiguously identify a source. E.g., “chomsky57”.\n\n address: '' # Usually the add", "end": 2244, "score": 0.9953088760375977, "start": 2235, "tag": "KEY", "value": "chomsky57" }, { "context": "ote']\n\n book:\n required: [['author', 'editor'], 'title', 'publisher', 'year']\n optional", "end": 15719, "score": 0.54958575963974, "start": 15713, "tag": "NAME", "value": "editor" }, { "context": "e']\n\n inbook:\n required: [['author', 'editor'], 'title', ['chapter', 'pages'],\n 'publ", "end": 16245, "score": 0.5885826945304871, "start": 16239, "tag": "NAME", "value": "editor" }, { "context": "sref[attr] else null\n\n # Return a string like \"Chomsky and Halle (1968)\"\n # Setting `crossref` to `false` will ", "end": 18461, "score": 0.9996891617774963, "start": 18444, "tag": "NAME", "value": "Chomsky and Halle" }, { "context": "Citation} (#{year})\"\n\n # Return a string like \"Chomsky and Halle (1968)\", using editor names if\n # authors are ", "end": 18952, "score": 0.9978621602058411, "start": 18935, "tag": "NAME", "value": "Chomsky and Halle" }, { "context": "r'\n name\n\n # Try to return a string like \"Chomsky and Halle (1968)\", but replace\n # either the author/edit", "end": 19591, "score": 0.9980237483978271, "start": 19574, "tag": "NAME", "value": "Chomsky and Halle" } ]
app/scripts/models/source.coffee
OpenSourceFieldlinguistics/dative
7
define [ './resource' './../utils/bibtex' ], (ResourceModel, BibTeXUtils) -> # Source Model # ------------ # # A Backbone model for Dative sources. class SourceModel extends ResourceModel resourceName: 'source' # Note that `crossref_source` is not in here because the user does not # specify it directly. It is by selecting a `crossref` value that the # `crossref_source` relational value gets specified server-side. manyToOneAttributes: [ 'file' ] ############################################################################ # Source Schema ############################################################################ defaults: -> file: null # a reference to a file (e.g., a pdf) for this source crossref_source: null # a reference to another source model for # cross-referencing, cf. the BibTeX spec crossref: '' # The `key` value of another source to be # cross-referenced. Any attribute values that # are missing from the source model are inherited # from the source cross-referenced via the # cross-reference attribute. Maximum length is # 1000 characters. Note: OLD will return an error # if a non-existent key value is supplied here. # QUESTION: how do `crossref_source` and # `crossref` interact? I think that specifying the # latter determines the former. type: '' # the BibTeX entry type, e.g., “article”, # “book”, etc. A valid type value is # obligatory for all source models. The chosen # type value will determine which other attributes # must also possess non-empty values. See p. 391 # of Dunham 2014. key: '' # the BibTeX key, i.e., the unique string used to # unambiguously identify a source. E.g., “chomsky57”. address: '' # Usually the address of the publisher or other # type of institution. Maximum length is 1000 # characters. annote: '' # An annotation. It is not used by the standard # bibliography styles, but may be used by others # that produce an annotated bibliography. author: '' # The name(s) of the author(s), in the format # described in Kopka and Daly (2004). There are # two basic formats: (1) Given Names Surname and # (2) Surname, Given Names. For multiple authors, # use the formats just specified and separate each # such formatted name by the word “and”. # Maximum length is 255 characters. booktitle: '' # Title of a book, part of which is being cited. # See Kopka and Daly (2004) for details on how to # type titles. For book entries, use the title # field instead. Maximum length is 255 characters. chapter: '' # A chapter (or section or whatever) number. # Maximum length is 255 characters. edition: '' # The edition of a book—for example, # “Second”. This should be an ordinal, and # should have the first letter capitalized, as # shown here; the standard styles convert to lower # case when necessary. Maximum length is 255 # characters. editor: '' # Name(s) of editor(s), typed as indicated in # Kopka and Daly (2004). At its most basic, this # means either as Given Names Surname or Surname, # Given Names and using “and” to separate # multiple editor names. If there is also a value # for the author attribute, then the editor # attribute gives the editor of the book or # collection in which the reference appears. # Maximum length is 255 characters. howpublished: '' # How something has been published. The first word # should be capitalized. Maximum length is 255 # characters. institution: '' # The sponsoring institution of a technical # report. Maximum length is 255 characters. journal: '' # A journal name. Abbreviations are provided for # many journals. Maximum length is 255 characters. key_field: '' # Used for alphabetizing, cross referencing, and # creating a label when the author information is # missing. This field should not be confused with # the source’s key attribute. Maximum length is # 255 characters. month: '' # The month in which the work was published or, # for an unpublished work, in which it was # written. Maximum length is 100 characters. note: '' # Any additional information that can help the # reader. The first word should be capitalized. # Maximum length is 1000 characters. number: '' # The number of a journal, magazine, technical # report, or of a work in a series. An issue of a # journal or magazine is usually identified by its # volume and number; the organization that issues # a technical report usually gives it a number; # and sometimes books are given numbers in a named # series. Maximum length is 100 characters. organization: '' # The organization that sponsors a conference or # that publishes a manual. Maximum length is 255 # characters. pages: '' # One or more page numbers or range of numbers, # such as 42–111 or 7,41,73– 97 or 43+ (the # “+” in this last example indicates pages # following that don’t form a simple range). # Maximum length is 100 characters. publisher: '' # The publisher’s name. Maximum length is 255 # characters. school: '' # The name of the school where a thesis was # written. Maximum length is 255 characters. series: '' # The name of a series or set of books. When # citing an entire book, the title attribute gives # its title and an optional series attribute gives # the name of a series or multi-volume set in # which the book is published. Maximum length is # 255 characters. title: '' # The work’s title, typed as explained in Kopka # and Daly (2004). Maximum length is 255 # characters. type_field: '' # The type of a technical report—for example, # “Research Note”. Maximum length is 255 # characters. url: '' # The universal resource locator for online # documents; this is not standard but supplied by # more modern bibliography styles. Maximum length # is 1000 characters. volume: '' # The volume of a journal or multi-volume book. # Maximum length is 100 characters. year: '' # The year of publication or, for an unpublished # work, the year it was written. Generally it # should consist of four numerals, such as 1984. affiliation: '' # The author’s affiliation. Maximum length is # 255 characters. abstract: '' # An abstract of the work. Maximum length is 1000 # characters. contents: '' # A table of contents. Maximum length is 255 # characters. copyright: '' # Copyright information. Maximum length is 255 # characters. ISBN: '' # The International Standard Book Number. Maximum # length is 20 characters. ISSN: '' # The International Standard Serial Number. Used # to identify a journal. Maximum length is 20 # characters. keywords: '' # Key words used for searching or possibly for # annotation. Maximum length is 255 characters. language: '' # The language the document is in. Maximum length # is 255 characters. location: '' # A location associated with the entry, such as # the city in which a conference took place. # Maximum length is 255 characters. LCCN: '' # The Library of Congress Call Number. Maximum # length is 20 characters. mrnumber: '' # The Mathematical Reviews number. Maximum length # is 25 characters. price: '' # The price of the document. Maximum length is 100 # characters. size: '' # The physical dimensions of a work. Maximum # length is 255 characters. id: null # <int> relational id datetime_modified: "" # <string> (datetime resource was last modified, # format and construction same as # `datetime_entered`.) editableAttributes: [ 'file' 'crossref_source' 'crossref' 'type' 'key' 'address' 'annote' 'author' 'booktitle' 'chapter' 'edition' 'editor' 'howpublished' 'institution' 'journal' 'key_field' 'month' 'note' 'number' 'organization' 'pages' 'publisher' 'school' 'series' 'title' 'type_field' 'url' 'volume' 'year' 'affiliation' 'abstract' 'contents' 'copyright' 'ISBN' 'ISSN' 'keywords' 'language' 'location' 'LCCN' 'mrnumber' 'price' 'size' ] getValidator: (attribute) -> switch attribute when 'name' then @requiredString when 'key' then @validBibTeXKey when 'type' then @validBibTeXType else null validBibTeXKey: (value) -> regex = /^([-!$%^&*()_+|~=`{}\[\]:";'<>?.\/]|[a-zA-Z0-9])+$/ if regex.test value null else 'Source keys can only contain letters, numerals and symbols (except the comma)' # Given the BibTeX entry type in `value`, make sure that all of the required # fields (as specified in `@entryTypes[value].required` are valuated. validBibTeXType: (value) -> if not value then return 'You must select a type for this source' invalid = false # BibTeX type determines required fields. Get them here. [requiredFields, disjunctivelyRequiredFields, msg] = @parseRequirements value # Here we set error messages on zero or more attributes, given the typed # requirements of BibTeX. requiredFieldsValues = (@getRequiredValue(rf) for rf in requiredFields) requiredFieldsValues = (rf for rf in requiredFieldsValues when rf) if requiredFieldsValues.length isnt requiredFields.length invalid = true else for dr in disjunctivelyRequiredFields drValues = (@getRequiredValue(rf) for rf in dr) drValues = (rf for rf in drValues when rf) if drValues.length is 0 then invalid = true if invalid errorObject = type: msg for field in requiredFields if not @getRequiredValue(field) errorObject[field] = "Please enter a value" for fieldsArray in disjunctivelyRequiredFields values = (@getRequiredValue(f) for f in fieldsArray) values = (v for v in values when v) if values.length is 0 for field in fieldsArray errorObject[field] = "Please enter a value for #{@coordinate fieldsArray, 'or'}" errorObject else null getRequiredValue: (requiredField) -> """Try to get a value for the required field `requiredField`; if it's not there, try the cross-referenced source model. """ val = @get requiredField if val val else crossReferencedSource = @get 'crossref_source' if crossReferencedSource val = crossReferencedSource[requiredField] if val then val else null else null coordinate: (array, coordinator='and') -> if array.length > 1 "#{array[...-1].join ', '} #{coordinator} #{array[array.length - 1]}" else if array.length is 1 array[0] else '' # Given a BibTeX `type` value, return a 3-tuple array consisting of the # required fields, the disjunctively required fields, and a text message # declaring those requirements. parseRequirements: (typeValue) -> conjugateValues = (requiredFields) -> if requiredFields.length > 1 then 'values' else 'a value' required = @entryTypes[typeValue].required requiredFields = (r for r in required when @utils.type(r) is 'string') disjunctivelyRequiredFields = (r for r in required when @utils.type(r) is 'array') msg = "Sources of type #{typeValue} require #{conjugateValues requiredFields} for #{@coordinate requiredFields}" if disjunctivelyRequiredFields.length > 0 tmp = ("at least one of #{@coordinate dr}" for dr in disjunctivelyRequiredFields) msg = "#{msg} as well as a value for #{@coordinate tmp}" [requiredFields, disjunctivelyRequiredFields, "#{msg}."] # Maps each BibTeX `type` value to the array of other attributes that must # (`required`) and may (`optional`) be valuated for that type. entryTypes: article: required: ['author', 'title', 'journal', 'year'] optional: ['volume', 'number', 'pages', 'month', 'note'] book: required: [['author', 'editor'], 'title', 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'address', 'edition', 'month', 'note'] booklet: required: ['title'] optional: ['author', 'howpublished', 'address', 'month', 'year', 'note'] conference: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] inbook: required: [['author', 'editor'], 'title', ['chapter', 'pages'], 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'type', 'address', 'edition', 'month', 'note'] incollection: required: ['author', 'title', 'booktitle', 'publisher', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'type', 'chapter', 'pages', 'address', 'edition', 'month', 'note'] inproceedings: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] manual: required: ['title'] optional: ['author', 'organization', 'address', 'edition', 'month', 'year', 'note'] mastersthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] misc: required: [] optional: ['author', 'title', 'howpublished', 'month', 'year', 'note'] phdthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] proceedings: required: ['title', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'address', 'month', 'publisher', 'organization', 'note'] techreport: required: ['author', 'title', 'institution', 'year'] optional: ['type', 'number', 'address', 'month', 'note'] unpublished: required: ['author', 'title', 'note'] optional: ['month', 'year'] ############################################################################ # String Conveniences ############################################################################ # # Call these methods to get string-like representations of the source; # needed because BibTeX ain't simple. getAuthor: -> BibTeXUtils.getAuthor @attributes getYear: -> BibTeXUtils.getYear @attributes # Get `attr` from this source's `crossref_source` value. getCrossrefAttr: (attr) -> crossref = @get 'crossref_source' if crossref then crossref[attr] else null # Return a string like "Chomsky and Halle (1968)" # Setting `crossref` to `false` will result in `crossref` not being used # for empty value. getAuthorYear: (crossref=true) -> author = @get 'author' if (not author) and crossref then author = @getCrossrefAttr 'author' authorCitation = BibTeXUtils.getNameInCitationForm author year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' "#{authorCitation} (#{year})" # Return a string like "Chomsky and Halle (1968)", using editor names if # authors are unavailable. getAuthorEditorYear: (crossref=true) -> name = @getAuthorEditor crossref nameCitation = BibTeXUtils.getNameInCitationForm name "#{nameCitation} (#{@get 'year'})" # Get author, else crossref.author, else editor, else crossref.editor getAuthorEditor: (crossref=true) -> name = @get 'author' if (not name) and crossref then name = @getCrossrefAttr 'author' if not name then name = @get 'editor' if (not name) and crossref then name = @getCrossrefAttr 'editor' name # Try to return a string like "Chomsky and Halle (1968)", but replace # either the author/editor or the year with filler text, if needed. getAuthorEditorYearDefaults: (crossref=true) -> auth = @getAuthorEditor crossref if auth auth = BibTeXUtils.getNameInCitationForm auth else auth = 'no author' year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' yr = if year then year else 'no year' "#{auth} (#{yr})"
53398
define [ './resource' './../utils/bibtex' ], (ResourceModel, BibTeXUtils) -> # Source Model # ------------ # # A Backbone model for Dative sources. class SourceModel extends ResourceModel resourceName: 'source' # Note that `crossref_source` is not in here because the user does not # specify it directly. It is by selecting a `crossref` value that the # `crossref_source` relational value gets specified server-side. manyToOneAttributes: [ 'file' ] ############################################################################ # Source Schema ############################################################################ defaults: -> file: null # a reference to a file (e.g., a pdf) for this source crossref_source: null # a reference to another source model for # cross-referencing, cf. the BibTeX spec crossref: '' # The `key` value of another source to be # cross-referenced. Any attribute values that # are missing from the source model are inherited # from the source cross-referenced via the # cross-reference attribute. Maximum length is # 1000 characters. Note: OLD will return an error # if a non-existent key value is supplied here. # QUESTION: how do `crossref_source` and # `crossref` interact? I think that specifying the # latter determines the former. type: '' # the BibTeX entry type, e.g., “article”, # “book”, etc. A valid type value is # obligatory for all source models. The chosen # type value will determine which other attributes # must also possess non-empty values. See p. 391 # of Dunham 2014. key: '' # the BibTeX key, i.e., the unique string used to # unambiguously identify a source. E.g., “<KEY>”. address: '' # Usually the address of the publisher or other # type of institution. Maximum length is 1000 # characters. annote: '' # An annotation. It is not used by the standard # bibliography styles, but may be used by others # that produce an annotated bibliography. author: '' # The name(s) of the author(s), in the format # described in Kopka and Daly (2004). There are # two basic formats: (1) Given Names Surname and # (2) Surname, Given Names. For multiple authors, # use the formats just specified and separate each # such formatted name by the word “and”. # Maximum length is 255 characters. booktitle: '' # Title of a book, part of which is being cited. # See Kopka and Daly (2004) for details on how to # type titles. For book entries, use the title # field instead. Maximum length is 255 characters. chapter: '' # A chapter (or section or whatever) number. # Maximum length is 255 characters. edition: '' # The edition of a book—for example, # “Second”. This should be an ordinal, and # should have the first letter capitalized, as # shown here; the standard styles convert to lower # case when necessary. Maximum length is 255 # characters. editor: '' # Name(s) of editor(s), typed as indicated in # Kopka and Daly (2004). At its most basic, this # means either as Given Names Surname or Surname, # Given Names and using “and” to separate # multiple editor names. If there is also a value # for the author attribute, then the editor # attribute gives the editor of the book or # collection in which the reference appears. # Maximum length is 255 characters. howpublished: '' # How something has been published. The first word # should be capitalized. Maximum length is 255 # characters. institution: '' # The sponsoring institution of a technical # report. Maximum length is 255 characters. journal: '' # A journal name. Abbreviations are provided for # many journals. Maximum length is 255 characters. key_field: '' # Used for alphabetizing, cross referencing, and # creating a label when the author information is # missing. This field should not be confused with # the source’s key attribute. Maximum length is # 255 characters. month: '' # The month in which the work was published or, # for an unpublished work, in which it was # written. Maximum length is 100 characters. note: '' # Any additional information that can help the # reader. The first word should be capitalized. # Maximum length is 1000 characters. number: '' # The number of a journal, magazine, technical # report, or of a work in a series. An issue of a # journal or magazine is usually identified by its # volume and number; the organization that issues # a technical report usually gives it a number; # and sometimes books are given numbers in a named # series. Maximum length is 100 characters. organization: '' # The organization that sponsors a conference or # that publishes a manual. Maximum length is 255 # characters. pages: '' # One or more page numbers or range of numbers, # such as 42–111 or 7,41,73– 97 or 43+ (the # “+” in this last example indicates pages # following that don’t form a simple range). # Maximum length is 100 characters. publisher: '' # The publisher’s name. Maximum length is 255 # characters. school: '' # The name of the school where a thesis was # written. Maximum length is 255 characters. series: '' # The name of a series or set of books. When # citing an entire book, the title attribute gives # its title and an optional series attribute gives # the name of a series or multi-volume set in # which the book is published. Maximum length is # 255 characters. title: '' # The work’s title, typed as explained in Kopka # and Daly (2004). Maximum length is 255 # characters. type_field: '' # The type of a technical report—for example, # “Research Note”. Maximum length is 255 # characters. url: '' # The universal resource locator for online # documents; this is not standard but supplied by # more modern bibliography styles. Maximum length # is 1000 characters. volume: '' # The volume of a journal or multi-volume book. # Maximum length is 100 characters. year: '' # The year of publication or, for an unpublished # work, the year it was written. Generally it # should consist of four numerals, such as 1984. affiliation: '' # The author’s affiliation. Maximum length is # 255 characters. abstract: '' # An abstract of the work. Maximum length is 1000 # characters. contents: '' # A table of contents. Maximum length is 255 # characters. copyright: '' # Copyright information. Maximum length is 255 # characters. ISBN: '' # The International Standard Book Number. Maximum # length is 20 characters. ISSN: '' # The International Standard Serial Number. Used # to identify a journal. Maximum length is 20 # characters. keywords: '' # Key words used for searching or possibly for # annotation. Maximum length is 255 characters. language: '' # The language the document is in. Maximum length # is 255 characters. location: '' # A location associated with the entry, such as # the city in which a conference took place. # Maximum length is 255 characters. LCCN: '' # The Library of Congress Call Number. Maximum # length is 20 characters. mrnumber: '' # The Mathematical Reviews number. Maximum length # is 25 characters. price: '' # The price of the document. Maximum length is 100 # characters. size: '' # The physical dimensions of a work. Maximum # length is 255 characters. id: null # <int> relational id datetime_modified: "" # <string> (datetime resource was last modified, # format and construction same as # `datetime_entered`.) editableAttributes: [ 'file' 'crossref_source' 'crossref' 'type' 'key' 'address' 'annote' 'author' 'booktitle' 'chapter' 'edition' 'editor' 'howpublished' 'institution' 'journal' 'key_field' 'month' 'note' 'number' 'organization' 'pages' 'publisher' 'school' 'series' 'title' 'type_field' 'url' 'volume' 'year' 'affiliation' 'abstract' 'contents' 'copyright' 'ISBN' 'ISSN' 'keywords' 'language' 'location' 'LCCN' 'mrnumber' 'price' 'size' ] getValidator: (attribute) -> switch attribute when 'name' then @requiredString when 'key' then @validBibTeXKey when 'type' then @validBibTeXType else null validBibTeXKey: (value) -> regex = /^([-!$%^&*()_+|~=`{}\[\]:";'<>?.\/]|[a-zA-Z0-9])+$/ if regex.test value null else 'Source keys can only contain letters, numerals and symbols (except the comma)' # Given the BibTeX entry type in `value`, make sure that all of the required # fields (as specified in `@entryTypes[value].required` are valuated. validBibTeXType: (value) -> if not value then return 'You must select a type for this source' invalid = false # BibTeX type determines required fields. Get them here. [requiredFields, disjunctivelyRequiredFields, msg] = @parseRequirements value # Here we set error messages on zero or more attributes, given the typed # requirements of BibTeX. requiredFieldsValues = (@getRequiredValue(rf) for rf in requiredFields) requiredFieldsValues = (rf for rf in requiredFieldsValues when rf) if requiredFieldsValues.length isnt requiredFields.length invalid = true else for dr in disjunctivelyRequiredFields drValues = (@getRequiredValue(rf) for rf in dr) drValues = (rf for rf in drValues when rf) if drValues.length is 0 then invalid = true if invalid errorObject = type: msg for field in requiredFields if not @getRequiredValue(field) errorObject[field] = "Please enter a value" for fieldsArray in disjunctivelyRequiredFields values = (@getRequiredValue(f) for f in fieldsArray) values = (v for v in values when v) if values.length is 0 for field in fieldsArray errorObject[field] = "Please enter a value for #{@coordinate fieldsArray, 'or'}" errorObject else null getRequiredValue: (requiredField) -> """Try to get a value for the required field `requiredField`; if it's not there, try the cross-referenced source model. """ val = @get requiredField if val val else crossReferencedSource = @get 'crossref_source' if crossReferencedSource val = crossReferencedSource[requiredField] if val then val else null else null coordinate: (array, coordinator='and') -> if array.length > 1 "#{array[...-1].join ', '} #{coordinator} #{array[array.length - 1]}" else if array.length is 1 array[0] else '' # Given a BibTeX `type` value, return a 3-tuple array consisting of the # required fields, the disjunctively required fields, and a text message # declaring those requirements. parseRequirements: (typeValue) -> conjugateValues = (requiredFields) -> if requiredFields.length > 1 then 'values' else 'a value' required = @entryTypes[typeValue].required requiredFields = (r for r in required when @utils.type(r) is 'string') disjunctivelyRequiredFields = (r for r in required when @utils.type(r) is 'array') msg = "Sources of type #{typeValue} require #{conjugateValues requiredFields} for #{@coordinate requiredFields}" if disjunctivelyRequiredFields.length > 0 tmp = ("at least one of #{@coordinate dr}" for dr in disjunctivelyRequiredFields) msg = "#{msg} as well as a value for #{@coordinate tmp}" [requiredFields, disjunctivelyRequiredFields, "#{msg}."] # Maps each BibTeX `type` value to the array of other attributes that must # (`required`) and may (`optional`) be valuated for that type. entryTypes: article: required: ['author', 'title', 'journal', 'year'] optional: ['volume', 'number', 'pages', 'month', 'note'] book: required: [['author', '<NAME>'], 'title', 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'address', 'edition', 'month', 'note'] booklet: required: ['title'] optional: ['author', 'howpublished', 'address', 'month', 'year', 'note'] conference: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] inbook: required: [['author', '<NAME>'], 'title', ['chapter', 'pages'], 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'type', 'address', 'edition', 'month', 'note'] incollection: required: ['author', 'title', 'booktitle', 'publisher', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'type', 'chapter', 'pages', 'address', 'edition', 'month', 'note'] inproceedings: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] manual: required: ['title'] optional: ['author', 'organization', 'address', 'edition', 'month', 'year', 'note'] mastersthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] misc: required: [] optional: ['author', 'title', 'howpublished', 'month', 'year', 'note'] phdthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] proceedings: required: ['title', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'address', 'month', 'publisher', 'organization', 'note'] techreport: required: ['author', 'title', 'institution', 'year'] optional: ['type', 'number', 'address', 'month', 'note'] unpublished: required: ['author', 'title', 'note'] optional: ['month', 'year'] ############################################################################ # String Conveniences ############################################################################ # # Call these methods to get string-like representations of the source; # needed because BibTeX ain't simple. getAuthor: -> BibTeXUtils.getAuthor @attributes getYear: -> BibTeXUtils.getYear @attributes # Get `attr` from this source's `crossref_source` value. getCrossrefAttr: (attr) -> crossref = @get 'crossref_source' if crossref then crossref[attr] else null # Return a string like "<NAME> (1968)" # Setting `crossref` to `false` will result in `crossref` not being used # for empty value. getAuthorYear: (crossref=true) -> author = @get 'author' if (not author) and crossref then author = @getCrossrefAttr 'author' authorCitation = BibTeXUtils.getNameInCitationForm author year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' "#{authorCitation} (#{year})" # Return a string like "<NAME> (1968)", using editor names if # authors are unavailable. getAuthorEditorYear: (crossref=true) -> name = @getAuthorEditor crossref nameCitation = BibTeXUtils.getNameInCitationForm name "#{nameCitation} (#{@get 'year'})" # Get author, else crossref.author, else editor, else crossref.editor getAuthorEditor: (crossref=true) -> name = @get 'author' if (not name) and crossref then name = @getCrossrefAttr 'author' if not name then name = @get 'editor' if (not name) and crossref then name = @getCrossrefAttr 'editor' name # Try to return a string like "<NAME> (1968)", but replace # either the author/editor or the year with filler text, if needed. getAuthorEditorYearDefaults: (crossref=true) -> auth = @getAuthorEditor crossref if auth auth = BibTeXUtils.getNameInCitationForm auth else auth = 'no author' year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' yr = if year then year else 'no year' "#{auth} (#{yr})"
true
define [ './resource' './../utils/bibtex' ], (ResourceModel, BibTeXUtils) -> # Source Model # ------------ # # A Backbone model for Dative sources. class SourceModel extends ResourceModel resourceName: 'source' # Note that `crossref_source` is not in here because the user does not # specify it directly. It is by selecting a `crossref` value that the # `crossref_source` relational value gets specified server-side. manyToOneAttributes: [ 'file' ] ############################################################################ # Source Schema ############################################################################ defaults: -> file: null # a reference to a file (e.g., a pdf) for this source crossref_source: null # a reference to another source model for # cross-referencing, cf. the BibTeX spec crossref: '' # The `key` value of another source to be # cross-referenced. Any attribute values that # are missing from the source model are inherited # from the source cross-referenced via the # cross-reference attribute. Maximum length is # 1000 characters. Note: OLD will return an error # if a non-existent key value is supplied here. # QUESTION: how do `crossref_source` and # `crossref` interact? I think that specifying the # latter determines the former. type: '' # the BibTeX entry type, e.g., “article”, # “book”, etc. A valid type value is # obligatory for all source models. The chosen # type value will determine which other attributes # must also possess non-empty values. See p. 391 # of Dunham 2014. key: '' # the BibTeX key, i.e., the unique string used to # unambiguously identify a source. E.g., “PI:KEY:<KEY>END_PI”. address: '' # Usually the address of the publisher or other # type of institution. Maximum length is 1000 # characters. annote: '' # An annotation. It is not used by the standard # bibliography styles, but may be used by others # that produce an annotated bibliography. author: '' # The name(s) of the author(s), in the format # described in Kopka and Daly (2004). There are # two basic formats: (1) Given Names Surname and # (2) Surname, Given Names. For multiple authors, # use the formats just specified and separate each # such formatted name by the word “and”. # Maximum length is 255 characters. booktitle: '' # Title of a book, part of which is being cited. # See Kopka and Daly (2004) for details on how to # type titles. For book entries, use the title # field instead. Maximum length is 255 characters. chapter: '' # A chapter (or section or whatever) number. # Maximum length is 255 characters. edition: '' # The edition of a book—for example, # “Second”. This should be an ordinal, and # should have the first letter capitalized, as # shown here; the standard styles convert to lower # case when necessary. Maximum length is 255 # characters. editor: '' # Name(s) of editor(s), typed as indicated in # Kopka and Daly (2004). At its most basic, this # means either as Given Names Surname or Surname, # Given Names and using “and” to separate # multiple editor names. If there is also a value # for the author attribute, then the editor # attribute gives the editor of the book or # collection in which the reference appears. # Maximum length is 255 characters. howpublished: '' # How something has been published. The first word # should be capitalized. Maximum length is 255 # characters. institution: '' # The sponsoring institution of a technical # report. Maximum length is 255 characters. journal: '' # A journal name. Abbreviations are provided for # many journals. Maximum length is 255 characters. key_field: '' # Used for alphabetizing, cross referencing, and # creating a label when the author information is # missing. This field should not be confused with # the source’s key attribute. Maximum length is # 255 characters. month: '' # The month in which the work was published or, # for an unpublished work, in which it was # written. Maximum length is 100 characters. note: '' # Any additional information that can help the # reader. The first word should be capitalized. # Maximum length is 1000 characters. number: '' # The number of a journal, magazine, technical # report, or of a work in a series. An issue of a # journal or magazine is usually identified by its # volume and number; the organization that issues # a technical report usually gives it a number; # and sometimes books are given numbers in a named # series. Maximum length is 100 characters. organization: '' # The organization that sponsors a conference or # that publishes a manual. Maximum length is 255 # characters. pages: '' # One or more page numbers or range of numbers, # such as 42–111 or 7,41,73– 97 or 43+ (the # “+” in this last example indicates pages # following that don’t form a simple range). # Maximum length is 100 characters. publisher: '' # The publisher’s name. Maximum length is 255 # characters. school: '' # The name of the school where a thesis was # written. Maximum length is 255 characters. series: '' # The name of a series or set of books. When # citing an entire book, the title attribute gives # its title and an optional series attribute gives # the name of a series or multi-volume set in # which the book is published. Maximum length is # 255 characters. title: '' # The work’s title, typed as explained in Kopka # and Daly (2004). Maximum length is 255 # characters. type_field: '' # The type of a technical report—for example, # “Research Note”. Maximum length is 255 # characters. url: '' # The universal resource locator for online # documents; this is not standard but supplied by # more modern bibliography styles. Maximum length # is 1000 characters. volume: '' # The volume of a journal or multi-volume book. # Maximum length is 100 characters. year: '' # The year of publication or, for an unpublished # work, the year it was written. Generally it # should consist of four numerals, such as 1984. affiliation: '' # The author’s affiliation. Maximum length is # 255 characters. abstract: '' # An abstract of the work. Maximum length is 1000 # characters. contents: '' # A table of contents. Maximum length is 255 # characters. copyright: '' # Copyright information. Maximum length is 255 # characters. ISBN: '' # The International Standard Book Number. Maximum # length is 20 characters. ISSN: '' # The International Standard Serial Number. Used # to identify a journal. Maximum length is 20 # characters. keywords: '' # Key words used for searching or possibly for # annotation. Maximum length is 255 characters. language: '' # The language the document is in. Maximum length # is 255 characters. location: '' # A location associated with the entry, such as # the city in which a conference took place. # Maximum length is 255 characters. LCCN: '' # The Library of Congress Call Number. Maximum # length is 20 characters. mrnumber: '' # The Mathematical Reviews number. Maximum length # is 25 characters. price: '' # The price of the document. Maximum length is 100 # characters. size: '' # The physical dimensions of a work. Maximum # length is 255 characters. id: null # <int> relational id datetime_modified: "" # <string> (datetime resource was last modified, # format and construction same as # `datetime_entered`.) editableAttributes: [ 'file' 'crossref_source' 'crossref' 'type' 'key' 'address' 'annote' 'author' 'booktitle' 'chapter' 'edition' 'editor' 'howpublished' 'institution' 'journal' 'key_field' 'month' 'note' 'number' 'organization' 'pages' 'publisher' 'school' 'series' 'title' 'type_field' 'url' 'volume' 'year' 'affiliation' 'abstract' 'contents' 'copyright' 'ISBN' 'ISSN' 'keywords' 'language' 'location' 'LCCN' 'mrnumber' 'price' 'size' ] getValidator: (attribute) -> switch attribute when 'name' then @requiredString when 'key' then @validBibTeXKey when 'type' then @validBibTeXType else null validBibTeXKey: (value) -> regex = /^([-!$%^&*()_+|~=`{}\[\]:";'<>?.\/]|[a-zA-Z0-9])+$/ if regex.test value null else 'Source keys can only contain letters, numerals and symbols (except the comma)' # Given the BibTeX entry type in `value`, make sure that all of the required # fields (as specified in `@entryTypes[value].required` are valuated. validBibTeXType: (value) -> if not value then return 'You must select a type for this source' invalid = false # BibTeX type determines required fields. Get them here. [requiredFields, disjunctivelyRequiredFields, msg] = @parseRequirements value # Here we set error messages on zero or more attributes, given the typed # requirements of BibTeX. requiredFieldsValues = (@getRequiredValue(rf) for rf in requiredFields) requiredFieldsValues = (rf for rf in requiredFieldsValues when rf) if requiredFieldsValues.length isnt requiredFields.length invalid = true else for dr in disjunctivelyRequiredFields drValues = (@getRequiredValue(rf) for rf in dr) drValues = (rf for rf in drValues when rf) if drValues.length is 0 then invalid = true if invalid errorObject = type: msg for field in requiredFields if not @getRequiredValue(field) errorObject[field] = "Please enter a value" for fieldsArray in disjunctivelyRequiredFields values = (@getRequiredValue(f) for f in fieldsArray) values = (v for v in values when v) if values.length is 0 for field in fieldsArray errorObject[field] = "Please enter a value for #{@coordinate fieldsArray, 'or'}" errorObject else null getRequiredValue: (requiredField) -> """Try to get a value for the required field `requiredField`; if it's not there, try the cross-referenced source model. """ val = @get requiredField if val val else crossReferencedSource = @get 'crossref_source' if crossReferencedSource val = crossReferencedSource[requiredField] if val then val else null else null coordinate: (array, coordinator='and') -> if array.length > 1 "#{array[...-1].join ', '} #{coordinator} #{array[array.length - 1]}" else if array.length is 1 array[0] else '' # Given a BibTeX `type` value, return a 3-tuple array consisting of the # required fields, the disjunctively required fields, and a text message # declaring those requirements. parseRequirements: (typeValue) -> conjugateValues = (requiredFields) -> if requiredFields.length > 1 then 'values' else 'a value' required = @entryTypes[typeValue].required requiredFields = (r for r in required when @utils.type(r) is 'string') disjunctivelyRequiredFields = (r for r in required when @utils.type(r) is 'array') msg = "Sources of type #{typeValue} require #{conjugateValues requiredFields} for #{@coordinate requiredFields}" if disjunctivelyRequiredFields.length > 0 tmp = ("at least one of #{@coordinate dr}" for dr in disjunctivelyRequiredFields) msg = "#{msg} as well as a value for #{@coordinate tmp}" [requiredFields, disjunctivelyRequiredFields, "#{msg}."] # Maps each BibTeX `type` value to the array of other attributes that must # (`required`) and may (`optional`) be valuated for that type. entryTypes: article: required: ['author', 'title', 'journal', 'year'] optional: ['volume', 'number', 'pages', 'month', 'note'] book: required: [['author', 'PI:NAME:<NAME>END_PI'], 'title', 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'address', 'edition', 'month', 'note'] booklet: required: ['title'] optional: ['author', 'howpublished', 'address', 'month', 'year', 'note'] conference: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] inbook: required: [['author', 'PI:NAME:<NAME>END_PI'], 'title', ['chapter', 'pages'], 'publisher', 'year'] optional: [['volume', 'number'], 'series', 'type', 'address', 'edition', 'month', 'note'] incollection: required: ['author', 'title', 'booktitle', 'publisher', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'type', 'chapter', 'pages', 'address', 'edition', 'month', 'note'] inproceedings: required: ['author', 'title', 'booktitle', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'pages', 'address', 'month', 'organization', 'publisher', 'note'] manual: required: ['title'] optional: ['author', 'organization', 'address', 'edition', 'month', 'year', 'note'] mastersthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] misc: required: [] optional: ['author', 'title', 'howpublished', 'month', 'year', 'note'] phdthesis: required: ['author', 'title', 'school', 'year'] optional: ['type', 'address', 'month', 'note'] proceedings: required: ['title', 'year'] optional: ['editor', ['volume', 'number'], 'series', 'address', 'month', 'publisher', 'organization', 'note'] techreport: required: ['author', 'title', 'institution', 'year'] optional: ['type', 'number', 'address', 'month', 'note'] unpublished: required: ['author', 'title', 'note'] optional: ['month', 'year'] ############################################################################ # String Conveniences ############################################################################ # # Call these methods to get string-like representations of the source; # needed because BibTeX ain't simple. getAuthor: -> BibTeXUtils.getAuthor @attributes getYear: -> BibTeXUtils.getYear @attributes # Get `attr` from this source's `crossref_source` value. getCrossrefAttr: (attr) -> crossref = @get 'crossref_source' if crossref then crossref[attr] else null # Return a string like "PI:NAME:<NAME>END_PI (1968)" # Setting `crossref` to `false` will result in `crossref` not being used # for empty value. getAuthorYear: (crossref=true) -> author = @get 'author' if (not author) and crossref then author = @getCrossrefAttr 'author' authorCitation = BibTeXUtils.getNameInCitationForm author year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' "#{authorCitation} (#{year})" # Return a string like "PI:NAME:<NAME>END_PI (1968)", using editor names if # authors are unavailable. getAuthorEditorYear: (crossref=true) -> name = @getAuthorEditor crossref nameCitation = BibTeXUtils.getNameInCitationForm name "#{nameCitation} (#{@get 'year'})" # Get author, else crossref.author, else editor, else crossref.editor getAuthorEditor: (crossref=true) -> name = @get 'author' if (not name) and crossref then name = @getCrossrefAttr 'author' if not name then name = @get 'editor' if (not name) and crossref then name = @getCrossrefAttr 'editor' name # Try to return a string like "PI:NAME:<NAME>END_PI (1968)", but replace # either the author/editor or the year with filler text, if needed. getAuthorEditorYearDefaults: (crossref=true) -> auth = @getAuthorEditor crossref if auth auth = BibTeXUtils.getNameInCitationForm auth else auth = 'no author' year = @get 'year' if (not year) and crossref then year = @getCrossrefAttr 'year' yr = if year then year else 'no year' "#{auth} (#{yr})"
[ { "context": "g pings on Slack.\n#\n# Commands:\n# @ping @mention [@mention ...] [message] - create a new ping\n# @ping log ", "end": 112, "score": 0.8000609874725342, "start": 103, "tag": "USERNAME", "value": "[@mention" }, { "context": " help - display available commands\n#\n# Author:\n# Raymond Xu\n\nclass PingEntry\n constructor: (@msg, @timestamp", "end": 359, "score": 0.9998513460159302, "start": 349, "tag": "NAME", "value": "Raymond Xu" }, { "context": "me\n\nmodule.exports = (robot) ->\n # @ping @mention [@mention ...] [message] - create a new ping\n robot.hear /", "end": 845, "score": 0.7065432071685791, "start": 836, "tag": "USERNAME", "value": "[@mention" } ]
scripts/ping.coffee
RaymondXu/hubot-ping
3
# Description: # A script that tracks your outgoing pings on Slack. # # Commands: # @ping @mention [@mention ...] [message] - create a new ping # @ping log - view your outgoing pings # @ping n [n ...] - re-ping an old ping by index # @ping close n [n ...] - close pings by index # @ping help - display available commands # # Author: # Raymond Xu class PingEntry constructor: (@msg, @timestamp, @channel) -> toString: -> return @msg + " [" + @timestamp + "]" getCurrentDatetime = () -> currentDate = new Date() datetime = (currentDate.getMonth() + 1) + "/" \ + currentDate.getDate() + "/" \ + currentDate.getFullYear() + " " \ + currentDate.getHours() + ":" \ + currentDate.getMinutes() + ":" \ + currentDate.getSeconds() return datetime module.exports = (robot) -> # @ping @mention [@mention ...] [message] - create a new ping robot.hear /@ping (@.+)/i, (res) -> pingEntry = new PingEntry res.message.text, getCurrentDatetime(), res.message.room sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if not pingLog pingLog = [] pingLog.push(pingEntry) robot.brain.set sender, pingLog # @ping log - view your outgoing pings robot.hear /@ping log\b/i, (res) -> sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if pingLog and pingLog.length > 0 pingLogString = "" pingLog.sort (a, b) -> return a.timestamp > b.timestamp for i, log of pingLog pingLogString += "(" + i + ") " + log.toString() + "\n" robot.messageRoom sender, pingLogString # @ping n [n ...] - re-ping an old ping by index robot.hear /@ping (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to re-ping words = res.match[0].split(" ") pingIndices = [] for i, word of words if i >= 1 and word pingIndices.push(word) # Re-ping and bump timestamp sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) for i, pingEntry of pingLog if i in pingIndices robot.messageRoom pingEntry.channel, pingEntry.msg pingEntry.timestamp = getCurrentDatetime() robot.brain.set sender, pingLog # @ping close n [n ...] - close pings by index robot.hear /@ping close (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to close words = res.match[0].split(" ") closeIndices = [] for i, word of words if i >= 2 and word closeIndices.push(word) # Remove the ping entries from the sender's log sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) newPingLog = (pingEntry for i, pingEntry of pingLog when i not in closeIndices) robot.brain.set sender, newPingLog
111640
# Description: # A script that tracks your outgoing pings on Slack. # # Commands: # @ping @mention [@mention ...] [message] - create a new ping # @ping log - view your outgoing pings # @ping n [n ...] - re-ping an old ping by index # @ping close n [n ...] - close pings by index # @ping help - display available commands # # Author: # <NAME> class PingEntry constructor: (@msg, @timestamp, @channel) -> toString: -> return @msg + " [" + @timestamp + "]" getCurrentDatetime = () -> currentDate = new Date() datetime = (currentDate.getMonth() + 1) + "/" \ + currentDate.getDate() + "/" \ + currentDate.getFullYear() + " " \ + currentDate.getHours() + ":" \ + currentDate.getMinutes() + ":" \ + currentDate.getSeconds() return datetime module.exports = (robot) -> # @ping @mention [@mention ...] [message] - create a new ping robot.hear /@ping (@.+)/i, (res) -> pingEntry = new PingEntry res.message.text, getCurrentDatetime(), res.message.room sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if not pingLog pingLog = [] pingLog.push(pingEntry) robot.brain.set sender, pingLog # @ping log - view your outgoing pings robot.hear /@ping log\b/i, (res) -> sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if pingLog and pingLog.length > 0 pingLogString = "" pingLog.sort (a, b) -> return a.timestamp > b.timestamp for i, log of pingLog pingLogString += "(" + i + ") " + log.toString() + "\n" robot.messageRoom sender, pingLogString # @ping n [n ...] - re-ping an old ping by index robot.hear /@ping (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to re-ping words = res.match[0].split(" ") pingIndices = [] for i, word of words if i >= 1 and word pingIndices.push(word) # Re-ping and bump timestamp sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) for i, pingEntry of pingLog if i in pingIndices robot.messageRoom pingEntry.channel, pingEntry.msg pingEntry.timestamp = getCurrentDatetime() robot.brain.set sender, pingLog # @ping close n [n ...] - close pings by index robot.hear /@ping close (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to close words = res.match[0].split(" ") closeIndices = [] for i, word of words if i >= 2 and word closeIndices.push(word) # Remove the ping entries from the sender's log sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) newPingLog = (pingEntry for i, pingEntry of pingLog when i not in closeIndices) robot.brain.set sender, newPingLog
true
# Description: # A script that tracks your outgoing pings on Slack. # # Commands: # @ping @mention [@mention ...] [message] - create a new ping # @ping log - view your outgoing pings # @ping n [n ...] - re-ping an old ping by index # @ping close n [n ...] - close pings by index # @ping help - display available commands # # Author: # PI:NAME:<NAME>END_PI class PingEntry constructor: (@msg, @timestamp, @channel) -> toString: -> return @msg + " [" + @timestamp + "]" getCurrentDatetime = () -> currentDate = new Date() datetime = (currentDate.getMonth() + 1) + "/" \ + currentDate.getDate() + "/" \ + currentDate.getFullYear() + " " \ + currentDate.getHours() + ":" \ + currentDate.getMinutes() + ":" \ + currentDate.getSeconds() return datetime module.exports = (robot) -> # @ping @mention [@mention ...] [message] - create a new ping robot.hear /@ping (@.+)/i, (res) -> pingEntry = new PingEntry res.message.text, getCurrentDatetime(), res.message.room sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if not pingLog pingLog = [] pingLog.push(pingEntry) robot.brain.set sender, pingLog # @ping log - view your outgoing pings robot.hear /@ping log\b/i, (res) -> sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) if pingLog and pingLog.length > 0 pingLogString = "" pingLog.sort (a, b) -> return a.timestamp > b.timestamp for i, log of pingLog pingLogString += "(" + i + ") " + log.toString() + "\n" robot.messageRoom sender, pingLogString # @ping n [n ...] - re-ping an old ping by index robot.hear /@ping (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to re-ping words = res.match[0].split(" ") pingIndices = [] for i, word of words if i >= 1 and word pingIndices.push(word) # Re-ping and bump timestamp sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) for i, pingEntry of pingLog if i in pingIndices robot.messageRoom pingEntry.channel, pingEntry.msg pingEntry.timestamp = getCurrentDatetime() robot.brain.set sender, pingLog # @ping close n [n ...] - close pings by index robot.hear /@ping close (\d+)(( \d*)*)/i, (res) -> # Parse the message for the ping entries to close words = res.match[0].split(" ") closeIndices = [] for i, word of words if i >= 2 and word closeIndices.push(word) # Remove the ping entries from the sender's log sender = "@" + res.message.user.name pingLog = robot.brain.get(sender) newPingLog = (pingEntry for i, pingEntry of pingLog when i not in closeIndices) robot.brain.set sender, newPingLog
[ { "context": "nds in a tuft of hairs.\n '''\n\n scientificName: 'Syncerus caffer'\n mainImage: 'assets/fieldguide-content/mammals/", "end": 588, "score": 0.9998810887336731, "start": 573, "tag": "NAME", "value": "Syncerus caffer" } ]
app/lib/field-guide-content/buffalo.coffee
zooniverse/wildcam-gorongosa
7
module.exports = label: 'African Buffalo' # taken from task choice if not provided description: ''' A massive animal, the African buffalo is Africa’s only wild cattle species and is recognized as one of the “Big Five” mammals by safari goers. It is an imposing animal with its oxlike barrel shape, broad chest, bulky limbs, sizable head, and thick horns. African buffalo can vary greatly in coloring, but generally are dark gray or black to reddish-brown. Soft hairs fringe the large ears and the long tail, which ends in a tuft of hairs. ''' scientificName: 'Syncerus caffer' mainImage: 'assets/fieldguide-content/mammals/buffalo/buffalo-feature.jpg' conservationStatus: 'Least Concern' # valid options: low, medium, high. Or you can exclude it information: [{ label: 'Length' value: '2.4-3.4 m' }, { label: 'Height' value: '1.4-1.6 m' }, { label: 'Weight' value: '500-700 kg' }, { label: 'Lifespan' value: '26 years' }, { label: 'Gestation' value: '11-12 months' }, { label: 'Avg. number of offspring' value: '1' }] sections: [{ title: 'Habitat' content: 'African buffalo can be found in a variety of habitats including the African savanna and tropical forests near the equator. ' }, { title: 'Diet' content: 'Grass forms the bulk of the African buffalo’s diet, but they also browse on bushes and trees. Because they can easily overheat, they generally feed during the cool of the early morning or at night.' }, { title: 'Predators' content: 'Humans, lions' }, { title: 'Behavior' content: ''' The African buffalo is a gregarious animal, found in large herds of up to thousands of individuals. Herds are aggregations of distinct clans with related females and offspring, plus a small number of mature bulls. Males not belonging to a herd are solitary, or they form bachelor herds with other bulls that are not yet sexually mature or bulls past their prime. Herds have a stable home range and individuals cooperatively protect herd members, especially calves. If a herd member feels vulnerable, it will bellow and others will come to its defense. African buffalo will charge as a unit when threatened to drive away large predators, including entire herds of lions. African buffalo do most of their feeding during the cool, early mornings and late afternoons. During the heat of the day, they are often found lying in the shade of trees or shrubs. The African buffalo has poor sight and hearing. They are quiet animals, but during the mating season they can be heard grunting and bellowing. ''' }, { title: 'Breeding' content: ''' Females have their first calves at age 4 or 5. After a gestation period of 11 to 12 months, they give birth to one calf. Calves are suckled for up to a year and during this time are completely dependent on their mothers. Generally females will calve once every two years. ''' }, { title: 'Fun Facts' style: 'focus-box' content: ''' <ol> <li>These formidable grazers are the only wild cattle species in Africa.</li> <li>Herds of female African buffalos seem to have a unique way of deciding what direction they want to move: they vote on it! When the herd is ready to move, individuals stand upright and face the direction they wish to move. When enough herd members have “voted,” the dominant female leads the herd off in the direction that most of the individuals have faced. </li> </ol> ''' }, { title: 'Distribution' content: ''' <img src="assets/fieldguide-content/mammals/buffalo/buffalo-map.jpg" /> ''' }]
37389
module.exports = label: 'African Buffalo' # taken from task choice if not provided description: ''' A massive animal, the African buffalo is Africa’s only wild cattle species and is recognized as one of the “Big Five” mammals by safari goers. It is an imposing animal with its oxlike barrel shape, broad chest, bulky limbs, sizable head, and thick horns. African buffalo can vary greatly in coloring, but generally are dark gray or black to reddish-brown. Soft hairs fringe the large ears and the long tail, which ends in a tuft of hairs. ''' scientificName: '<NAME>' mainImage: 'assets/fieldguide-content/mammals/buffalo/buffalo-feature.jpg' conservationStatus: 'Least Concern' # valid options: low, medium, high. Or you can exclude it information: [{ label: 'Length' value: '2.4-3.4 m' }, { label: 'Height' value: '1.4-1.6 m' }, { label: 'Weight' value: '500-700 kg' }, { label: 'Lifespan' value: '26 years' }, { label: 'Gestation' value: '11-12 months' }, { label: 'Avg. number of offspring' value: '1' }] sections: [{ title: 'Habitat' content: 'African buffalo can be found in a variety of habitats including the African savanna and tropical forests near the equator. ' }, { title: 'Diet' content: 'Grass forms the bulk of the African buffalo’s diet, but they also browse on bushes and trees. Because they can easily overheat, they generally feed during the cool of the early morning or at night.' }, { title: 'Predators' content: 'Humans, lions' }, { title: 'Behavior' content: ''' The African buffalo is a gregarious animal, found in large herds of up to thousands of individuals. Herds are aggregations of distinct clans with related females and offspring, plus a small number of mature bulls. Males not belonging to a herd are solitary, or they form bachelor herds with other bulls that are not yet sexually mature or bulls past their prime. Herds have a stable home range and individuals cooperatively protect herd members, especially calves. If a herd member feels vulnerable, it will bellow and others will come to its defense. African buffalo will charge as a unit when threatened to drive away large predators, including entire herds of lions. African buffalo do most of their feeding during the cool, early mornings and late afternoons. During the heat of the day, they are often found lying in the shade of trees or shrubs. The African buffalo has poor sight and hearing. They are quiet animals, but during the mating season they can be heard grunting and bellowing. ''' }, { title: 'Breeding' content: ''' Females have their first calves at age 4 or 5. After a gestation period of 11 to 12 months, they give birth to one calf. Calves are suckled for up to a year and during this time are completely dependent on their mothers. Generally females will calve once every two years. ''' }, { title: 'Fun Facts' style: 'focus-box' content: ''' <ol> <li>These formidable grazers are the only wild cattle species in Africa.</li> <li>Herds of female African buffalos seem to have a unique way of deciding what direction they want to move: they vote on it! When the herd is ready to move, individuals stand upright and face the direction they wish to move. When enough herd members have “voted,” the dominant female leads the herd off in the direction that most of the individuals have faced. </li> </ol> ''' }, { title: 'Distribution' content: ''' <img src="assets/fieldguide-content/mammals/buffalo/buffalo-map.jpg" /> ''' }]
true
module.exports = label: 'African Buffalo' # taken from task choice if not provided description: ''' A massive animal, the African buffalo is Africa’s only wild cattle species and is recognized as one of the “Big Five” mammals by safari goers. It is an imposing animal with its oxlike barrel shape, broad chest, bulky limbs, sizable head, and thick horns. African buffalo can vary greatly in coloring, but generally are dark gray or black to reddish-brown. Soft hairs fringe the large ears and the long tail, which ends in a tuft of hairs. ''' scientificName: 'PI:NAME:<NAME>END_PI' mainImage: 'assets/fieldguide-content/mammals/buffalo/buffalo-feature.jpg' conservationStatus: 'Least Concern' # valid options: low, medium, high. Or you can exclude it information: [{ label: 'Length' value: '2.4-3.4 m' }, { label: 'Height' value: '1.4-1.6 m' }, { label: 'Weight' value: '500-700 kg' }, { label: 'Lifespan' value: '26 years' }, { label: 'Gestation' value: '11-12 months' }, { label: 'Avg. number of offspring' value: '1' }] sections: [{ title: 'Habitat' content: 'African buffalo can be found in a variety of habitats including the African savanna and tropical forests near the equator. ' }, { title: 'Diet' content: 'Grass forms the bulk of the African buffalo’s diet, but they also browse on bushes and trees. Because they can easily overheat, they generally feed during the cool of the early morning or at night.' }, { title: 'Predators' content: 'Humans, lions' }, { title: 'Behavior' content: ''' The African buffalo is a gregarious animal, found in large herds of up to thousands of individuals. Herds are aggregations of distinct clans with related females and offspring, plus a small number of mature bulls. Males not belonging to a herd are solitary, or they form bachelor herds with other bulls that are not yet sexually mature or bulls past their prime. Herds have a stable home range and individuals cooperatively protect herd members, especially calves. If a herd member feels vulnerable, it will bellow and others will come to its defense. African buffalo will charge as a unit when threatened to drive away large predators, including entire herds of lions. African buffalo do most of their feeding during the cool, early mornings and late afternoons. During the heat of the day, they are often found lying in the shade of trees or shrubs. The African buffalo has poor sight and hearing. They are quiet animals, but during the mating season they can be heard grunting and bellowing. ''' }, { title: 'Breeding' content: ''' Females have their first calves at age 4 or 5. After a gestation period of 11 to 12 months, they give birth to one calf. Calves are suckled for up to a year and during this time are completely dependent on their mothers. Generally females will calve once every two years. ''' }, { title: 'Fun Facts' style: 'focus-box' content: ''' <ol> <li>These formidable grazers are the only wild cattle species in Africa.</li> <li>Herds of female African buffalos seem to have a unique way of deciding what direction they want to move: they vote on it! When the herd is ready to move, individuals stand upright and face the direction they wish to move. When enough herd members have “voted,” the dominant female leads the herd off in the direction that most of the individuals have faced. </li> </ol> ''' }, { title: 'Distribution' content: ''' <img src="assets/fieldguide-content/mammals/buffalo/buffalo-map.jpg" /> ''' }]
[ { "context": "up'\n\nmeryl.h 'GET /', (req, resp) ->\n people = ['bob', 'alice', 'meryl']\n resp.render 'layout', conte", "end": 115, "score": 0.8944886922836304, "start": 112, "tag": "USERNAME", "value": "bob" }, { "context": "ryl.h 'GET /', (req, resp) ->\n people = ['bob', 'alice', 'meryl']\n resp.render 'layout', content: 'inde", "end": 124, "score": 0.8154282569885254, "start": 119, "tag": "NAME", "value": "alice" }, { "context": "T /', (req, resp) ->\n people = ['bob', 'alice', 'meryl']\n resp.render 'layout', content: 'index', conte", "end": 133, "score": 0.9734858870506287, "start": 128, "tag": "NAME", "value": "meryl" } ]
node_modules/coffeekup/examples/meryl/app.coffee
brad-langshaw/project2
157
meryl = require 'meryl' coffeekup = require '../../src/coffeekup' meryl.h 'GET /', (req, resp) -> people = ['bob', 'alice', 'meryl'] resp.render 'layout', content: 'index', context: {people: people} meryl.run templateDir: 'templates' templateExt: '.coffee' templateFunc: coffeekup.adapters.meryl console.log 'Listening on 3000...'
204850
meryl = require 'meryl' coffeekup = require '../../src/coffeekup' meryl.h 'GET /', (req, resp) -> people = ['bob', '<NAME>', '<NAME>'] resp.render 'layout', content: 'index', context: {people: people} meryl.run templateDir: 'templates' templateExt: '.coffee' templateFunc: coffeekup.adapters.meryl console.log 'Listening on 3000...'
true
meryl = require 'meryl' coffeekup = require '../../src/coffeekup' meryl.h 'GET /', (req, resp) -> people = ['bob', 'PI:NAME:<NAME>END_PI', 'PI:NAME:<NAME>END_PI'] resp.render 'layout', content: 'index', context: {people: people} meryl.run templateDir: 'templates' templateExt: '.coffee' templateFunc: coffeekup.adapters.meryl console.log 'Listening on 3000...'
[ { "context": "###\n# @author Argi Karunia <arugikaru@yahoo.co.jp>\n# @author Originally by", "end": 28, "score": 0.9998787045478821, "start": 16, "tag": "NAME", "value": "Argi Karunia" }, { "context": "###\n# @author Argi Karunia <arugikaru@yahoo.co.jp>\n# @author Originally by Teddy Hong <teddy.hong", "end": 51, "score": 0.9999340772628784, "start": 30, "tag": "EMAIL", "value": "arugikaru@yahoo.co.jp" }, { "context": " <arugikaru@yahoo.co.jp>\n# @author Originally by Teddy Hong <teddy.hong11@gmail.com>\n# @link https://gith", "end": 89, "score": 0.9998980760574341, "start": 79, "tag": "NAME", "value": "Teddy Hong" }, { "context": "ahoo.co.jp>\n# @author Originally by Teddy Hong <teddy.hong11@gmail.com>\n# @link https://github.com/tokopedia/Nodame\n", "end": 113, "score": 0.9999355673789978, "start": 91, "tag": "EMAIL", "value": "teddy.hong11@gmail.com" }, { "context": "ng11@gmail.com>\n# @link https://github.com/tokopedia/Nodame\n# @license http://opensource.org/licenses", "end": 155, "score": 0.6233906745910645, "start": 149, "tag": "USERNAME", "value": "opedia" } ]
src/render.coffee
tokopedia/nodame
2
### # @author Argi Karunia <arugikaru@yahoo.co.jp> # @author Originally by Teddy Hong <teddy.hong11@gmail.com> # @link https://github.com/tokopedia/Nodame # @license http://opensource.org/licenses/MIT # # @version 1.2.0 ### Path = require('./path') UUID = require('node-uuid') Redis = require('./redis') Async = require('async') APP = nodame.config('app') VIEW = nodame.config('view') COOKIE = nodame.config('cookie') class Render ### # @constructor ### constructor: (@req, @res) -> # Local variables @__locals = {} # Locales variable @__locals.locales = [] # Set default page title @set('page_title', APP.title) # Set default file name @__file = 'index' # Cache data @__cache_data = false # Header sent @__sent = false return ### # @method Set local variable # @public # @param string key # @param object value ### set: (key, val, is_array = false) -> if is_array @__locals[key] = @__locals[key] ? [] @__locals[key].push(val) else @__locals[key] = val return @ ### # @method Set local variable # @public # @param string page title # @param int page number ### title: (title, page_num) -> separator = APP.title_separator default_title = APP.title # TODO: change with i18n page_text = 'Halaman' # Add separator title = "#{title} #{separator} #{default_title}" # Add page number if page exists title = "#{title}, #{page_text} #{page_num}" if page_num? # Assign title return @set('page_title', title) ### # @method Set menu # @public # @param string active menu ### menu: (active_menu) -> # Validate empty val throw new Error 'Missing active_menu args' unless active_menu? # Assign val return @set('active_menu', { active: active_menu }) ### # @method Set assets name # @public # @param string assets name ### assets: (assets_name) -> # Validate empty val throw new Error 'Missing assets_name args' unless assets_name? # Assign val return @set('assets_name', assets_name) ### # @method Set locale # @public # @param string locale ### locale: (name) -> # Validate empty val throw new Erorr 'Missing locale args' unless name? # Validate value @__locals.locales.push(name) if @__locals.locales.indexOf(name) is -1 return @ ### # @method Set locales # @public # @param object locales ### locales: (locales) -> # Validate empty val throw new Erorr 'Missing locales args' unless locales? # Check if is array if typeof locales is 'object' @locale(name) for name in locales else @locale(locales) return @ ### # @method Set module name # @public # @param string method name ### module: (@__module) -> # Validate empty val throw new Error 'Missing module args' unless @__module? return @ ### # @method Set file name # @public # @param string file name ### file: (@__file) -> # Validate empty val throw new Error 'Missing file args' unless @__file? return @ ### # @method Set view path # @public # @param string path ### path: (path) -> # Validate empty val throw new Error 'Missing path args' unless path? # Assign variables default_template = VIEW.default_template template = VIEW.template device = VIEW.default_device adaptive = VIEW.adaptive # Set 'phone' and 'tablet' as 'mobile' # TODO: Set to switchable if @req.device?.type? and @req.device.type isnt 'desktop' and adaptive device = 'mobile' # Set template to default when empty template = default_template unless template? # Set module and file # Get view path @__view_path = Path.join(device, template, path) return @ ### # @method set status code # @public # @param int status code ### code: (status_code) -> @res.status(status_code) return @ ### # @method Cache view # @public # @param str key # @param obj value ### cache: (key = '', is_cache = true, callback) -> build_time= nodame.settings.build.time time = Math.floor(Date.now() / 1000) purge_time= nodame.config('view.purge_time') time_diff = time - build_time is_purge = time_diff < purge_time # Redis key redis_key = "#{APP.name}::render::#{key}" # Gatekeeper if !is_cache or is_purge or !nodame.config('view.cache') if is_purge and is_cache and nodame.config('view.cache') # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) redis = Redis.client() redis_hash_key = "#{@req.device.type},#{@req.__device.type}" Async.waterfall [ (cb) => redis.hget(redis_key, redis_hash_key, cb) ], (err, data) => if data? @__cache_data = data.toString() return callback(null, true) # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) return ### # @method write JSON response # @public # @param str JSON ### json: (obj) -> # Block if header is sent if @__sent @res.end() return undefined # Convert object to string obj = JSON.stringify(obj) unless typeof obj is 'string' # Cache to Redis @__cache(obj) # Set header @res.set('Content-Type: application/json') # Set header sent status to true @__sent = true @res.send(obj) return undefined ### # @method write response # @public ### send: (callback) -> # Block if header is sent return @res.end() if @__sent # Asynchronously check interstitial Async.series [ (cb) => @__check_interstitial(cb) ], (err, data) => @res.clearCookie 'fm', domain: ".#{COOKIE.domain}" # Check if cache if @__cache_data @res.send(@__cache_data) return @res.end() # Throw error if path is not found unless @__view_path? @res.send('View path is undefined. Please report to us.') return @res.end() # Set header sent status to true @__sent = true # Render cache Async.waterfall [ (cb) => @res.render(@__view_path, @__locals, cb) ], (__err, html) => # Cache to redis @__cache(html) # Check if callback return callback(__err, html) if callback? # Otherwise just send the html to client @res.send(html) return @res.end() return return ### # @method cache to redis # @private # @params obj Object ### __cache: (obj) -> if @__cache_key # Set cache redis = Redis.client() redis.hmset(@__cache_key, "#{@req.device.type},#{@req.__device.type}", obj) # TODO: Get this works! redis.expire(@__cache_key, nodame.config('view.cache_time')) return undefined ### # @method Pass interstitial view # @public # @param str key # @param obj value ### interstitial: (key, val, url) -> fm = @req.cookies.fm unless fm fm = UUID.v4() @res.cookie 'fm', fm, domain: ".#{COOKIE.domain}" expires: new Date(Date.now() + 600000) httpOnly: true redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.set(keyFm, JSON.stringify({type:key,text:val})) redis.expire(keyFm, 600) @res.redirect(url) return undefined ### # @method Check interstitial # @private # @param callback ### __check_interstitial: (cb) -> try fm = @req.cookies.fm redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.get keyFm, (err, reply) => if reply redis.del(keyFm) reply = JSON.parse(reply) @message(reply.type, reply.text) cb(null) return catch e cb(e) console.log(e) return ### # @method Pass message # @public # @param str key # @param obj value ### message: (key, val) -> messages = type: key text: val @set('messages', messages, true) return undefined ### # @method Render 404 # @public ### error_404: -> @path('errors/404') return @send() module.exports = Render
85317
### # @author <NAME> <<EMAIL>> # @author Originally by <NAME> <<EMAIL>> # @link https://github.com/tokopedia/Nodame # @license http://opensource.org/licenses/MIT # # @version 1.2.0 ### Path = require('./path') UUID = require('node-uuid') Redis = require('./redis') Async = require('async') APP = nodame.config('app') VIEW = nodame.config('view') COOKIE = nodame.config('cookie') class Render ### # @constructor ### constructor: (@req, @res) -> # Local variables @__locals = {} # Locales variable @__locals.locales = [] # Set default page title @set('page_title', APP.title) # Set default file name @__file = 'index' # Cache data @__cache_data = false # Header sent @__sent = false return ### # @method Set local variable # @public # @param string key # @param object value ### set: (key, val, is_array = false) -> if is_array @__locals[key] = @__locals[key] ? [] @__locals[key].push(val) else @__locals[key] = val return @ ### # @method Set local variable # @public # @param string page title # @param int page number ### title: (title, page_num) -> separator = APP.title_separator default_title = APP.title # TODO: change with i18n page_text = 'Halaman' # Add separator title = "#{title} #{separator} #{default_title}" # Add page number if page exists title = "#{title}, #{page_text} #{page_num}" if page_num? # Assign title return @set('page_title', title) ### # @method Set menu # @public # @param string active menu ### menu: (active_menu) -> # Validate empty val throw new Error 'Missing active_menu args' unless active_menu? # Assign val return @set('active_menu', { active: active_menu }) ### # @method Set assets name # @public # @param string assets name ### assets: (assets_name) -> # Validate empty val throw new Error 'Missing assets_name args' unless assets_name? # Assign val return @set('assets_name', assets_name) ### # @method Set locale # @public # @param string locale ### locale: (name) -> # Validate empty val throw new Erorr 'Missing locale args' unless name? # Validate value @__locals.locales.push(name) if @__locals.locales.indexOf(name) is -1 return @ ### # @method Set locales # @public # @param object locales ### locales: (locales) -> # Validate empty val throw new Erorr 'Missing locales args' unless locales? # Check if is array if typeof locales is 'object' @locale(name) for name in locales else @locale(locales) return @ ### # @method Set module name # @public # @param string method name ### module: (@__module) -> # Validate empty val throw new Error 'Missing module args' unless @__module? return @ ### # @method Set file name # @public # @param string file name ### file: (@__file) -> # Validate empty val throw new Error 'Missing file args' unless @__file? return @ ### # @method Set view path # @public # @param string path ### path: (path) -> # Validate empty val throw new Error 'Missing path args' unless path? # Assign variables default_template = VIEW.default_template template = VIEW.template device = VIEW.default_device adaptive = VIEW.adaptive # Set 'phone' and 'tablet' as 'mobile' # TODO: Set to switchable if @req.device?.type? and @req.device.type isnt 'desktop' and adaptive device = 'mobile' # Set template to default when empty template = default_template unless template? # Set module and file # Get view path @__view_path = Path.join(device, template, path) return @ ### # @method set status code # @public # @param int status code ### code: (status_code) -> @res.status(status_code) return @ ### # @method Cache view # @public # @param str key # @param obj value ### cache: (key = '', is_cache = true, callback) -> build_time= nodame.settings.build.time time = Math.floor(Date.now() / 1000) purge_time= nodame.config('view.purge_time') time_diff = time - build_time is_purge = time_diff < purge_time # Redis key redis_key = "#{APP.name}::render::#{key}" # Gatekeeper if !is_cache or is_purge or !nodame.config('view.cache') if is_purge and is_cache and nodame.config('view.cache') # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) redis = Redis.client() redis_hash_key = "#{@req.device.type},#{@req.__device.type}" Async.waterfall [ (cb) => redis.hget(redis_key, redis_hash_key, cb) ], (err, data) => if data? @__cache_data = data.toString() return callback(null, true) # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) return ### # @method write JSON response # @public # @param str JSON ### json: (obj) -> # Block if header is sent if @__sent @res.end() return undefined # Convert object to string obj = JSON.stringify(obj) unless typeof obj is 'string' # Cache to Redis @__cache(obj) # Set header @res.set('Content-Type: application/json') # Set header sent status to true @__sent = true @res.send(obj) return undefined ### # @method write response # @public ### send: (callback) -> # Block if header is sent return @res.end() if @__sent # Asynchronously check interstitial Async.series [ (cb) => @__check_interstitial(cb) ], (err, data) => @res.clearCookie 'fm', domain: ".#{COOKIE.domain}" # Check if cache if @__cache_data @res.send(@__cache_data) return @res.end() # Throw error if path is not found unless @__view_path? @res.send('View path is undefined. Please report to us.') return @res.end() # Set header sent status to true @__sent = true # Render cache Async.waterfall [ (cb) => @res.render(@__view_path, @__locals, cb) ], (__err, html) => # Cache to redis @__cache(html) # Check if callback return callback(__err, html) if callback? # Otherwise just send the html to client @res.send(html) return @res.end() return return ### # @method cache to redis # @private # @params obj Object ### __cache: (obj) -> if @__cache_key # Set cache redis = Redis.client() redis.hmset(@__cache_key, "#{@req.device.type},#{@req.__device.type}", obj) # TODO: Get this works! redis.expire(@__cache_key, nodame.config('view.cache_time')) return undefined ### # @method Pass interstitial view # @public # @param str key # @param obj value ### interstitial: (key, val, url) -> fm = @req.cookies.fm unless fm fm = UUID.v4() @res.cookie 'fm', fm, domain: ".#{COOKIE.domain}" expires: new Date(Date.now() + 600000) httpOnly: true redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.set(keyFm, JSON.stringify({type:key,text:val})) redis.expire(keyFm, 600) @res.redirect(url) return undefined ### # @method Check interstitial # @private # @param callback ### __check_interstitial: (cb) -> try fm = @req.cookies.fm redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.get keyFm, (err, reply) => if reply redis.del(keyFm) reply = JSON.parse(reply) @message(reply.type, reply.text) cb(null) return catch e cb(e) console.log(e) return ### # @method Pass message # @public # @param str key # @param obj value ### message: (key, val) -> messages = type: key text: val @set('messages', messages, true) return undefined ### # @method Render 404 # @public ### error_404: -> @path('errors/404') return @send() module.exports = Render
true
### # @author PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> # @author Originally by PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> # @link https://github.com/tokopedia/Nodame # @license http://opensource.org/licenses/MIT # # @version 1.2.0 ### Path = require('./path') UUID = require('node-uuid') Redis = require('./redis') Async = require('async') APP = nodame.config('app') VIEW = nodame.config('view') COOKIE = nodame.config('cookie') class Render ### # @constructor ### constructor: (@req, @res) -> # Local variables @__locals = {} # Locales variable @__locals.locales = [] # Set default page title @set('page_title', APP.title) # Set default file name @__file = 'index' # Cache data @__cache_data = false # Header sent @__sent = false return ### # @method Set local variable # @public # @param string key # @param object value ### set: (key, val, is_array = false) -> if is_array @__locals[key] = @__locals[key] ? [] @__locals[key].push(val) else @__locals[key] = val return @ ### # @method Set local variable # @public # @param string page title # @param int page number ### title: (title, page_num) -> separator = APP.title_separator default_title = APP.title # TODO: change with i18n page_text = 'Halaman' # Add separator title = "#{title} #{separator} #{default_title}" # Add page number if page exists title = "#{title}, #{page_text} #{page_num}" if page_num? # Assign title return @set('page_title', title) ### # @method Set menu # @public # @param string active menu ### menu: (active_menu) -> # Validate empty val throw new Error 'Missing active_menu args' unless active_menu? # Assign val return @set('active_menu', { active: active_menu }) ### # @method Set assets name # @public # @param string assets name ### assets: (assets_name) -> # Validate empty val throw new Error 'Missing assets_name args' unless assets_name? # Assign val return @set('assets_name', assets_name) ### # @method Set locale # @public # @param string locale ### locale: (name) -> # Validate empty val throw new Erorr 'Missing locale args' unless name? # Validate value @__locals.locales.push(name) if @__locals.locales.indexOf(name) is -1 return @ ### # @method Set locales # @public # @param object locales ### locales: (locales) -> # Validate empty val throw new Erorr 'Missing locales args' unless locales? # Check if is array if typeof locales is 'object' @locale(name) for name in locales else @locale(locales) return @ ### # @method Set module name # @public # @param string method name ### module: (@__module) -> # Validate empty val throw new Error 'Missing module args' unless @__module? return @ ### # @method Set file name # @public # @param string file name ### file: (@__file) -> # Validate empty val throw new Error 'Missing file args' unless @__file? return @ ### # @method Set view path # @public # @param string path ### path: (path) -> # Validate empty val throw new Error 'Missing path args' unless path? # Assign variables default_template = VIEW.default_template template = VIEW.template device = VIEW.default_device adaptive = VIEW.adaptive # Set 'phone' and 'tablet' as 'mobile' # TODO: Set to switchable if @req.device?.type? and @req.device.type isnt 'desktop' and adaptive device = 'mobile' # Set template to default when empty template = default_template unless template? # Set module and file # Get view path @__view_path = Path.join(device, template, path) return @ ### # @method set status code # @public # @param int status code ### code: (status_code) -> @res.status(status_code) return @ ### # @method Cache view # @public # @param str key # @param obj value ### cache: (key = '', is_cache = true, callback) -> build_time= nodame.settings.build.time time = Math.floor(Date.now() / 1000) purge_time= nodame.config('view.purge_time') time_diff = time - build_time is_purge = time_diff < purge_time # Redis key redis_key = "#{APP.name}::render::#{key}" # Gatekeeper if !is_cache or is_purge or !nodame.config('view.cache') if is_purge and is_cache and nodame.config('view.cache') # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) redis = Redis.client() redis_hash_key = "#{@req.device.type},#{@req.__device.type}" Async.waterfall [ (cb) => redis.hget(redis_key, redis_hash_key, cb) ], (err, data) => if data? @__cache_data = data.toString() return callback(null, true) # Send cache key for re-caching @__cache_key = redis_key return callback(null, false) return ### # @method write JSON response # @public # @param str JSON ### json: (obj) -> # Block if header is sent if @__sent @res.end() return undefined # Convert object to string obj = JSON.stringify(obj) unless typeof obj is 'string' # Cache to Redis @__cache(obj) # Set header @res.set('Content-Type: application/json') # Set header sent status to true @__sent = true @res.send(obj) return undefined ### # @method write response # @public ### send: (callback) -> # Block if header is sent return @res.end() if @__sent # Asynchronously check interstitial Async.series [ (cb) => @__check_interstitial(cb) ], (err, data) => @res.clearCookie 'fm', domain: ".#{COOKIE.domain}" # Check if cache if @__cache_data @res.send(@__cache_data) return @res.end() # Throw error if path is not found unless @__view_path? @res.send('View path is undefined. Please report to us.') return @res.end() # Set header sent status to true @__sent = true # Render cache Async.waterfall [ (cb) => @res.render(@__view_path, @__locals, cb) ], (__err, html) => # Cache to redis @__cache(html) # Check if callback return callback(__err, html) if callback? # Otherwise just send the html to client @res.send(html) return @res.end() return return ### # @method cache to redis # @private # @params obj Object ### __cache: (obj) -> if @__cache_key # Set cache redis = Redis.client() redis.hmset(@__cache_key, "#{@req.device.type},#{@req.__device.type}", obj) # TODO: Get this works! redis.expire(@__cache_key, nodame.config('view.cache_time')) return undefined ### # @method Pass interstitial view # @public # @param str key # @param obj value ### interstitial: (key, val, url) -> fm = @req.cookies.fm unless fm fm = UUID.v4() @res.cookie 'fm', fm, domain: ".#{COOKIE.domain}" expires: new Date(Date.now() + 600000) httpOnly: true redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.set(keyFm, JSON.stringify({type:key,text:val})) redis.expire(keyFm, 600) @res.redirect(url) return undefined ### # @method Check interstitial # @private # @param callback ### __check_interstitial: (cb) -> try fm = @req.cookies.fm redis = Redis.client() keyFm = "#{APP.name}:flashMessages:#{fm}" redis.get keyFm, (err, reply) => if reply redis.del(keyFm) reply = JSON.parse(reply) @message(reply.type, reply.text) cb(null) return catch e cb(e) console.log(e) return ### # @method Pass message # @public # @param str key # @param obj value ### message: (key, val) -> messages = type: key text: val @set('messages', messages, true) return undefined ### # @method Render 404 # @public ### error_404: -> @path('errors/404') return @send() module.exports = Render
[ { "context": ": user\n snap: snap\n snaps: snaps\n author: author\n active: active\n\nroutes.markdown = ->\n post =", "end": 1620, "score": 0.4957241714000702, "start": 1614, "tag": "NAME", "value": "author" } ]
coffee/routes.coffee
touka0/snaply
0
Model = require './models' parse = require 'co-body' emoji = require 'emojione' bcrypt = require 'co-bcryptjs' routes = module.exports = {} render = require './render' routes.index = -> user = this.req.user if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for snap, i in snaps snaps[i] = snap.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snaps: snaps active: 'home' routes.text = -> this.body = yield render 'text', bg:'' routes.p = -> moment = require 'moment' id = this.params.id user = this.req.user active = if id is 'KPIRnKORlet' then 'about' else '' snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes author = yield Model.DB.users.where('id', snap.uid).findOne() author = author.attributes snap.content = H.xss emoji.toImage H.md snap.content snap.title = H.title H.stripTags snap.content timestamp = Date.parse(snap.created_at) / 1000; snap.timeAgo = moment(timestamp, 'X').fromNow(); snap.count = H.count snap.content if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'p', user: user snap: snap snaps: snaps author: author active: active routes.markdown = -> post = yield parse this, limit: '8000kb' markdown = post.markdown html = H.xss emoji.toImage H.md markdown # todo: count length output = html: html this.body = output routes.p_raw = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/x-markdown' this.body = snap.content routes.p_html = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/plain' this.body = require('marked')(snap.content) routes.create = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content random_id = H.string 11 snap = new Model.DB.snaps ( content: post.content, uid: this.req.user.id random_id: random_id type: 'text' ) snap = yield snap.save() this.body = snap routes.update = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content id = post.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() login = yield Model.DB.users.where('id', user.id).findOne() recent_updated = login.attributes.recent_updated updated = id: id title: H.title H.stripTags post.content if not recent_updated recent_updated = [] recent_updated[0] = updated login.set 'recent_updated', recent_updated yield login.save() else listed = false for r, i in recent_updated if r.id is id listed = true break if not listed if recent_updated.length is 5 recent_updated.splice(0, 1) recent_updated[recent_updated.length] = updated login.set 'recent_updated', recent_updated yield login.save() if this.req.user.id isnt snap.attributes.uid this.redirect('/') return snap.set 'content', post.content snap = yield snap.save() this.body = snap routes.remove = -> post = yield parse this id = post.id snap = yield Model.DB.snaps.where('_id', id).findOne() #return if this.req.user.id isnt snap.uid snap = yield snap.remove() this.body = snap routes.edit = -> id = this.params.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() snap = snap.attributes if this.req.user.id isnt snap.uid this.redirect('/') return snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snap: snap snaps: snaps routes.password = -> post = yield parse this currentPassword = post.currentPassword password = post.password salt = yield bcrypt.genSalt(10) hash = yield bcrypt.hash(password, salt) user = yield Model.DB.users.where('id', this.req.user.id).findOne() if currentPassword checkPassword = yield bcrypt.compare(currentPassword, user.attributes.password) if user.attributes.password and not checkPassword this.body = status: 'bad' detail: 'Wrong password' return user.set('password', hash) user = yield user.save() this.body = user
49371
Model = require './models' parse = require 'co-body' emoji = require 'emojione' bcrypt = require 'co-bcryptjs' routes = module.exports = {} render = require './render' routes.index = -> user = this.req.user if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for snap, i in snaps snaps[i] = snap.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snaps: snaps active: 'home' routes.text = -> this.body = yield render 'text', bg:'' routes.p = -> moment = require 'moment' id = this.params.id user = this.req.user active = if id is 'KPIRnKORlet' then 'about' else '' snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes author = yield Model.DB.users.where('id', snap.uid).findOne() author = author.attributes snap.content = H.xss emoji.toImage H.md snap.content snap.title = H.title H.stripTags snap.content timestamp = Date.parse(snap.created_at) / 1000; snap.timeAgo = moment(timestamp, 'X').fromNow(); snap.count = H.count snap.content if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'p', user: user snap: snap snaps: snaps author: <NAME> active: active routes.markdown = -> post = yield parse this, limit: '8000kb' markdown = post.markdown html = H.xss emoji.toImage H.md markdown # todo: count length output = html: html this.body = output routes.p_raw = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/x-markdown' this.body = snap.content routes.p_html = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/plain' this.body = require('marked')(snap.content) routes.create = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content random_id = H.string 11 snap = new Model.DB.snaps ( content: post.content, uid: this.req.user.id random_id: random_id type: 'text' ) snap = yield snap.save() this.body = snap routes.update = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content id = post.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() login = yield Model.DB.users.where('id', user.id).findOne() recent_updated = login.attributes.recent_updated updated = id: id title: H.title H.stripTags post.content if not recent_updated recent_updated = [] recent_updated[0] = updated login.set 'recent_updated', recent_updated yield login.save() else listed = false for r, i in recent_updated if r.id is id listed = true break if not listed if recent_updated.length is 5 recent_updated.splice(0, 1) recent_updated[recent_updated.length] = updated login.set 'recent_updated', recent_updated yield login.save() if this.req.user.id isnt snap.attributes.uid this.redirect('/') return snap.set 'content', post.content snap = yield snap.save() this.body = snap routes.remove = -> post = yield parse this id = post.id snap = yield Model.DB.snaps.where('_id', id).findOne() #return if this.req.user.id isnt snap.uid snap = yield snap.remove() this.body = snap routes.edit = -> id = this.params.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() snap = snap.attributes if this.req.user.id isnt snap.uid this.redirect('/') return snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snap: snap snaps: snaps routes.password = -> post = yield parse this currentPassword = post.currentPassword password = post.password salt = yield bcrypt.genSalt(10) hash = yield bcrypt.hash(password, salt) user = yield Model.DB.users.where('id', this.req.user.id).findOne() if currentPassword checkPassword = yield bcrypt.compare(currentPassword, user.attributes.password) if user.attributes.password and not checkPassword this.body = status: 'bad' detail: 'Wrong password' return user.set('password', hash) user = yield user.save() this.body = user
true
Model = require './models' parse = require 'co-body' emoji = require 'emojione' bcrypt = require 'co-bcryptjs' routes = module.exports = {} render = require './render' routes.index = -> user = this.req.user if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for snap, i in snaps snaps[i] = snap.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snaps: snaps active: 'home' routes.text = -> this.body = yield render 'text', bg:'' routes.p = -> moment = require 'moment' id = this.params.id user = this.req.user active = if id is 'KPIRnKORlet' then 'about' else '' snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes author = yield Model.DB.users.where('id', snap.uid).findOne() author = author.attributes snap.content = H.xss emoji.toImage H.md snap.content snap.title = H.title H.stripTags snap.content timestamp = Date.parse(snap.created_at) / 1000; snap.timeAgo = moment(timestamp, 'X').fromNow(); snap.count = H.count snap.content if typeof user isnt 'undefined' snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'p', user: user snap: snap snaps: snaps author: PI:NAME:<NAME>END_PI active: active routes.markdown = -> post = yield parse this, limit: '8000kb' markdown = post.markdown html = H.xss emoji.toImage H.md markdown # todo: count length output = html: html this.body = output routes.p_raw = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/x-markdown' this.body = snap.content routes.p_html = -> id = this.params.id snap = yield Model.DB.snaps.where('random_id', id).findOne() if typeof snap is 'undefined' this.body = 'not found' return snap = snap.attributes this.type = 'text/plain' this.body = require('marked')(snap.content) routes.create = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content random_id = H.string 11 snap = new Model.DB.snaps ( content: post.content, uid: this.req.user.id random_id: random_id type: 'text' ) snap = yield snap.save() this.body = snap routes.update = -> post = yield parse this, limit: '8000kb' post.content = decodeURIComponent post.content id = post.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() login = yield Model.DB.users.where('id', user.id).findOne() recent_updated = login.attributes.recent_updated updated = id: id title: H.title H.stripTags post.content if not recent_updated recent_updated = [] recent_updated[0] = updated login.set 'recent_updated', recent_updated yield login.save() else listed = false for r, i in recent_updated if r.id is id listed = true break if not listed if recent_updated.length is 5 recent_updated.splice(0, 1) recent_updated[recent_updated.length] = updated login.set 'recent_updated', recent_updated yield login.save() if this.req.user.id isnt snap.attributes.uid this.redirect('/') return snap.set 'content', post.content snap = yield snap.save() this.body = snap routes.remove = -> post = yield parse this id = post.id snap = yield Model.DB.snaps.where('_id', id).findOne() #return if this.req.user.id isnt snap.uid snap = yield snap.remove() this.body = snap routes.edit = -> id = this.params.id user = this.req.user snap = yield Model.DB.snaps.where('random_id', id).findOne() snap = snap.attributes if this.req.user.id isnt snap.uid this.redirect('/') return snaps = yield Model.DB.snaps.where('uid', user.id).sort( created_at: -1 ).find() for s, i in snaps snaps[i] = s.attributes snaps[i].title = H.title H.stripTags require('marked')(snaps[i].content) this.body = yield render 'index', user: user snap: snap snaps: snaps routes.password = -> post = yield parse this currentPassword = post.currentPassword password = post.password salt = yield bcrypt.genSalt(10) hash = yield bcrypt.hash(password, salt) user = yield Model.DB.users.where('id', this.req.user.id).findOne() if currentPassword checkPassword = yield bcrypt.compare(currentPassword, user.attributes.password) if user.attributes.password and not checkPassword this.body = status: 'bad' detail: 'Wrong password' return user.set('password', hash) user = yield user.save() this.body = user
[ { "context": "s\",\"Prov\",\"Eccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"", "end": 505, "score": 0.7774911522865295, "start": 502, "tag": "NAME", "value": "Dan" }, { "context": "ov\",\"Eccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"", "end": 511, "score": 0.6748850345611572, "start": 508, "tag": "NAME", "value": "Hos" }, { "context": "ccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"", "end": 518, "score": 0.8595581650733948, "start": 514, "tag": "NAME", "value": "Joel" }, { "context": "ong\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\"", "end": 522, "score": 0.5770003199577332, "start": 521, "tag": "NAME", "value": "A" }, { "context": "sa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",", "end": 530, "score": 0.5686720609664917, "start": 528, "tag": "NAME", "value": "Ob" }, { "context": "r\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Mat", "end": 540, "score": 0.8670546412467957, "start": 535, "tag": "NAME", "value": "Jonah" }, { "context": ",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Ma", "end": 546, "score": 0.8282396197319031, "start": 543, "tag": "NAME", "value": "Mic" }, { "context": "\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",", "end": 550, "score": 0.6405734419822693, "start": 549, "tag": "NAME", "value": "N" }, { "context": "d\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",", "end": 584, "score": 0.6144196391105652, "start": 581, "tag": "NAME", "value": "Mal" }, { "context": "nah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",", "end": 591, "score": 0.9278932809829712, "start": 587, "tag": "NAME", "value": "Matt" }, { "context": "ic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"", "end": 598, "score": 0.9509367942810059, "start": 594, "tag": "NAME", "value": "Mark" }, { "context": "h\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"Eph\",\"P", "end": 605, "score": 0.8713827729225159, "start": 601, "tag": "NAME", "value": "Luke" }, { "context": "\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"Eph\",\"Phil\",\"C", "end": 612, "score": 0.7256042957305908, "start": 608, "tag": "NAME", "value": "John" }, { "context": "al(\"Deut.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Josh (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 16768, "score": 0.9763487577438354, "start": 16767, "tag": "NAME", "value": "J" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Josh (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Yahoshoo 1:1\").os", "end": 17030, "score": 0.7413657903671265, "start": 17026, "tag": "NAME", "value": "Josh" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Shamooael 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 24610, "score": 0.6079743504524231, "start": 24601, "tag": "NAME", "value": "Shamooael" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Shamooael 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 25422, "score": 0.9842648506164551, "start": 25413, "tag": "NAME", "value": "Shamooael" }, { "context": "osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1 Shamooael 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 25486, "score": 0.8431652188301086, "start": 25479, "tag": "NAME", "value": "amooael" }, { "context": "al(\"Ezek.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Dan (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 47301, "score": 0.9960662722587585, "start": 47298, "tag": "NAME", "value": "Dan" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Dan (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Daaniyyel 1:1\").o", "end": 47559, "score": 0.9981486201286316, "start": 47556, "tag": "NAME", "value": "Dan" }, { "context": "\ttrue\n\tit \"should handle non-Latin digits in book: Dan (hi)\", ->\n\t\tp.set_options non_latin_digits_strate", "end": 48040, "score": 0.998519241809845, "start": 48037, "tag": "NAME", "value": "Dan" }, { "context": "al(\"Obad.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Jonah (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 52088, "score": 0.9270079731941223, "start": 52083, "tag": "NAME", "value": "Jonah" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Jonah (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jonah 1:1\").osis(", "end": 52348, "score": 0.9453300833702087, "start": 52343, "tag": "NAME", "value": "Jonah" }, { "context": "andle book: Jonah (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jonah 1:1\").osis()).toEqual(\"Jonah.1.1\")\n\t\texpect(p.par", "end": 52386, "score": 0.6522802114486694, "start": 52381, "tag": "NAME", "value": "Jonah" }, { "context": "l(\"Jonah.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Mic (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 52781, "score": 0.8111311197280884, "start": 52778, "tag": "NAME", "value": "Mic" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Mic (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Meeka 1:1\").osi", "end": 53037, "score": 0.842766284942627, "start": 53036, "tag": "NAME", "value": "M" }, { "context": "ual(\"Mal.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 58050, "score": 0.9186648726463318, "start": 58049, "tag": "NAME", "value": "M" }, { "context": "l(\"Mal.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 58053, "score": 0.346640020608902, "start": 58050, "tag": "NAME", "value": "att" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Matt (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Mattee 1:1\").osis", "end": 58312, "score": 0.6809420585632324, "start": 58308, "tag": "NAME", "value": "Matt" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Mark (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Marakus 1:1\").osi", "end": 59003, "score": 0.9917868971824646, "start": 58999, "tag": "NAME", "value": "Mark" }, { "context": "al(\"Mark.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Luke (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 59553, "score": 0.9760385155677795, "start": 59549, "tag": "NAME", "value": "Luke" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Luke (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Looka 1:1\").osis(", "end": 59812, "score": 0.9925733804702759, "start": 59808, "tag": "NAME", "value": "Luke" }, { "context": "(\"2John.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book 3John (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bc", "end": 62695, "score": 0.8496960401535034, "start": 62694, "tag": "NAME", "value": "3" }, { "context": "p.include_apocrypha true\n\tit \"should handle book: 3John (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"3. Yoohanna 1", "end": 62955, "score": 0.8376802206039429, "start": 62954, "tag": "NAME", "value": "3" }, { "context": "l(\"3John.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book John (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 63927, "score": 0.9986582398414612, "start": 63923, "tag": "NAME", "value": "John" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: John (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"Yuhanna 1:1\").osi", "end": 64186, "score": 0.9993945360183716, "start": 64182, "tag": "NAME", "value": "John" }, { "context": "1\").osis()).toEqual(\"John.1.1\")\n\t\texpect(p.parse(\"JOHN 1:1\").osis()).toEqual(\"John.1.1\")\n\t\t`\n\t\ttrue\ndesc", "end": 64669, "score": 0.9986025094985962, "start": 64665, "tag": "NAME", "value": "JOHN" }, { "context": "1\").osis()).toEqual(\"Acts.1.1\")\n\t\texpect(p.parse(\"Praeriton Ke Kam 1:1\").osis()).toEqual(\"Acts.1.1\")\n\t\texpect(p.pars", "end": 65930, "score": 0.9783646464347839, "start": 65914, "tag": "NAME", "value": "Praeriton Ke Kam" }, { "context": "le book: 2Cor (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"2. Kurinthiayon 1:1\").osis()).toEqual(\"2Cor.1.1\")\n\t\texpect(p.pars", "end": 69566, "score": 0.7753829956054688, "start": 69555, "tag": "NAME", "value": "urinthiayon" }, { "context": "igits_strategy: \"replace\"\n\t\t`\n\t\texpect(p.parse(\"2. Kurinthiayon 1:1\").osis()).toEqual(\"2Cor.1.1\")\n\t\texpect(p.pars", "end": 70788, "score": 0.8720178008079529, "start": 70776, "tag": "NAME", "value": "Kurinthiayon" }, { "context": "igits_strategy: \"replace\"\n\t\t`\n\t\texpect(p.parse(\"1. Kurinthiayon 1:1\").osis()).toEqual(\"1Cor.1.1\")\n\t\texpect(p.pars", "end": 74541, "score": 0.9540421366691589, "start": 74529, "tag": "NAME", "value": "Kurinthiayon" }, { "context": "le book: 1Thess (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"1. Thaissaluneekiyon 1:1\").osis()).toEqual(\"1Thess.1.1\")", "end": 84037, "score": 0.5692205429077148, "start": 84034, "tag": "NAME", "value": "Tha" }, { "context": "(hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"1. Thaissaluneekiyon 1:1\").osis()).toEqual(\"1Thess.1.1\")\n\t\texpect(p.pa", "end": 84051, "score": 0.5296341776847839, "start": 84049, "tag": "NAME", "value": "on" }, { "context": "\"1Thess.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book 2Tim (hi)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 85301, "score": 0.764788031578064, "start": 85300, "tag": "NAME", "value": "2" }, { "context": "p.include_apocrypha true\n\tit \"should handle book: 2Tim (hi)\", ->\n\t\t`\n\t\texpect(p.parse(\"2. Teemuathaiy", "end": 85560, "score": 0.7171744704246521, "start": 85559, "tag": "NAME", "value": "2" } ]
lib/bible-tools/lib/Bible-Passage-Reference-Parser/src/hi/spec.coffee
saiba-mais/bible-lessons
0
bcv_parser = require("../../js/hi_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (hi)", -> ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") ` true it "should handle non-Latin digits in book: Gen (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("UTPAATI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (hi)", -> ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") ` true it "should handle non-Latin digits in book: Exod (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("NIRGAMAN 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (hi)", -> ` expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (hi)", -> ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") ` true it "should handle non-Latin digits in book: Lev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LAAIVYAVYAVASTHA 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (hi)", -> ` expect(p.parse("Ginatee 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("GINATEE 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (hi)", -> ` expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (hi)", -> ` expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (hi)", -> ` expect(p.parse("Vilapageet 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("VILAPAGEET 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (hi)", -> ` expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (hi)", -> ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") ` true it "should handle non-Latin digits in book: Rev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("PRAKASHAITAVAKYA 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (hi)", -> ` expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (hi)", -> ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") ` true it "should handle non-Latin digits in book: Deut (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("VYAVASTHAAVIVARAN 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book Josh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Josh (hi)", -> ` expect(p.parse("Yahoshoo 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("YAHOSHOO 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (hi)", -> ` expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Nyayiyon 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("NYAYIYON 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (hi)", -> ` expect(p.parse("Root 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("ROOT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (hi)", -> ` expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (hi)", -> ` expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (hi)", -> ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true it "should handle non-Latin digits in book: Isa (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("YASHAAYAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (hi)", -> ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") ` true it "should handle non-Latin digits in book: 2Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (hi)", -> ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") ` true it "should handle non-Latin digits in book: 1Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") ` true it "should handle non-Latin digits in book: 2Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") ` true it "should handle non-Latin digits in book: 1Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (hi)", -> ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") ` true it "should handle non-Latin digits in book: 2Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (hi)", -> ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") ` true it "should handle non-Latin digits in book: 1Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (hi)", -> ` expect(p.parse("Aejra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("AEJRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (hi)", -> ` expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nahemyah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NAHEMYAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (hi)", -> ` expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (hi)", -> ` expect(p.parse("Aester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("AESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (hi)", -> ` expect(p.parse("Ayyoob 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("AYYOOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (hi)", -> ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") ` true it "should handle non-Latin digits in book: Ps (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("BHJAN 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (hi)", -> ` expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (hi)", -> ` expect(p.parse("Neetivachan 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("NEETIVACHAN 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (hi)", -> ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true it "should handle non-Latin digits in book: Eccl (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("SABHOPADESHAK 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (hi)", -> ` expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (hi)", -> ` expect(p.parse("Reshthageet 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("RESHTHAGEET 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (hi)", -> ` expect(p.parse("Yirmayah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("YIRMAYAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (hi)", -> ` expect(p.parse("Yahejakel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("YAHEJAKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Dan (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Dan (hi)", -> ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") ` true it "should handle non-Latin digits in book: Dan (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DAANIYYEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (hi)", -> ` expect(p.parse("Hosho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSHO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (hi)", -> ` expect(p.parse("Yoael 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("YOAEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (hi)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (hi)", -> ` expect(p.parse("Obadhah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADHAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book Jonah (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jonah (hi)", -> ` expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Yona 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("YONA 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book Mic (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mic (hi)", -> ` expect(p.parse("Meeka 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MEEKA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (hi)", -> ` expect(p.parse("Nahoom 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHOOM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (hi)", -> ` expect(p.parse("Habakkook 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABAKKOOK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (hi)", -> ` expect(p.parse("Sapanyah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("SAPANYAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (hi)", -> ` expect(p.parse("Haggaai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGAAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (hi)", -> ` expect(p.parse("Jakaryah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("JAKARYAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (hi)", -> ` expect(p.parse("Malakee 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALAKEE 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book Matt (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Matt (hi)", -> ` expect(p.parse("Mattee 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MATTEE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mark (hi)", -> ` expect(p.parse("Marakus 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("MARAKUS 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book Luke (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Luke (hi)", -> ` expect(p.parse("Looka 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("LOOKA 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (hi)", -> ` expect(p.parse("1. Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("1. YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (hi)", -> ` expect(p.parse("2. Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("2. YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book 3John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3John (hi)", -> ` expect(p.parse("3. Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("3. YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: John (hi)", -> ` expect(p.parse("Yuhanna 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("YUHANNA 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (hi)", -> ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Praeriton Ke Kam 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true it "should handle non-Latin digits in book: Acts (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Praeriton Ke Kam 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("PRAERITON KE KAM 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (hi)", -> ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") ` true it "should handle non-Latin digits in book: Rom (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMIYON 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (hi)", -> ` expect(p.parse("2. Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") ` true it "should handle non-Latin digits in book: 2Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("2. Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("2. KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (hi)", -> ` expect(p.parse("1. Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") ` true it "should handle non-Latin digits in book: 1Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("1. Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("1. KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (hi)", -> ` expect(p.parse("Galatiyon 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATIYON 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (hi)", -> ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") ` true it "should handle non-Latin digits in book: Eph (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("IAFISIYON 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (hi)", -> ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") ` true it "should handle non-Latin digits in book: Phil (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("FILIPPAIYON 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (hi)", -> ` expect(p.parse("Kulussaiyon 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("KULUSSAIYON 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (hi)", -> ` expect(p.parse("2. Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("2. THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (hi)", -> ` expect(p.parse("1. Thaissaluneekiyon 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thaissaluneekiyon 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("1. THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book 2Tim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Tim (hi)", -> ` expect(p.parse("2. Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("2. TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (hi)", -> ` expect(p.parse("1. Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("1. TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (hi)", -> ` expect(p.parse("Teetus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TEETUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (hi)", -> ` expect(p.parse("Filemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("FILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (hi)", -> ` expect(p.parse("Ibraaaniyon 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("IBRAAANIYON 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (hi)", -> ` expect(p.parse("Yakoob 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("YAKOOB 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (hi)", -> ` expect(p.parse("2. Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("2. PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (hi)", -> ` expect(p.parse("1. Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("1. PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (hi)", -> ` expect(p.parse("Yahooda 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("YAHOODA 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (hi)", -> ` expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (hi)", -> ` expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (hi)", -> ` expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (hi)", -> ` expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (hi)", -> ` expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (hi)", -> ` expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (hi)", -> ` expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (hi)", -> ` expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["hi"] it "should handle ranges (hi)", -> expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (hi)", -> expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (hi)", -> expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (hi)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (hi)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (hi)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (hi)", -> expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] it "should handle book ranges (hi)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1 to 3 Yoohanna").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (hi)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
178458
bcv_parser = require("../../js/hi_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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","<NAME>","<NAME>","<NAME>","<NAME>mos","<NAME>ad","<NAME>","<NAME>","<NAME>ah","Hab","Zeph","Hag","Zech","<NAME>","<NAME>","<NAME>","<NAME>","<NAME>","Acts","Rom","1Cor","2Cor","Gal","Eph","Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas","1Pet","2Pet","1John","2John","3John","Jude","Rev"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (hi)", -> ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") ` true it "should handle non-Latin digits in book: Gen (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("UTPAATI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (hi)", -> ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") ` true it "should handle non-Latin digits in book: Exod (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("NIRGAMAN 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (hi)", -> ` expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (hi)", -> ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") ` true it "should handle non-Latin digits in book: Lev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LAAIVYAVYAVASTHA 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (hi)", -> ` expect(p.parse("Ginatee 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("GINATEE 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (hi)", -> ` expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (hi)", -> ` expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (hi)", -> ` expect(p.parse("Vilapageet 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("VILAPAGEET 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (hi)", -> ` expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (hi)", -> ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") ` true it "should handle non-Latin digits in book: Rev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("PRAKASHAITAVAKYA 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (hi)", -> ` expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (hi)", -> ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") ` true it "should handle non-Latin digits in book: Deut (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("VYAVASTHAAVIVARAN 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book <NAME>osh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Yahoshoo 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("YAHOSHOO 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (hi)", -> ` expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Nyayiyon 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("NYAYIYON 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (hi)", -> ` expect(p.parse("Root 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("ROOT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (hi)", -> ` expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (hi)", -> ` expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (hi)", -> ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true it "should handle non-Latin digits in book: Isa (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("YASHAAYAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (hi)", -> ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") ` true it "should handle non-Latin digits in book: 2Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (hi)", -> ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") ` true it "should handle non-Latin digits in book: 1Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sh<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") ` true it "should handle non-Latin digits in book: 2Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") ` true it "should handle non-Latin digits in book: 1Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (hi)", -> ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") ` true it "should handle non-Latin digits in book: 2Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (hi)", -> ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") ` true it "should handle non-Latin digits in book: 1Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (hi)", -> ` expect(p.parse("Aejra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("AEJRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (hi)", -> ` expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nahemyah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NAHEMYAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (hi)", -> ` expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (hi)", -> ` expect(p.parse("Aester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("AESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (hi)", -> ` expect(p.parse("Ayyoob 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("AYYOOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (hi)", -> ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") ` true it "should handle non-Latin digits in book: Ps (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("BHJAN 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (hi)", -> ` expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (hi)", -> ` expect(p.parse("Neetivachan 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("NEETIVACHAN 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (hi)", -> ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true it "should handle non-Latin digits in book: Eccl (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("SABHOPADESHAK 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (hi)", -> ` expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (hi)", -> ` expect(p.parse("Reshthageet 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("RESHTHAGEET 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (hi)", -> ` expect(p.parse("Yirmayah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("YIRMAYAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (hi)", -> ` expect(p.parse("Yahejakel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("YAHEJAKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") ` true it "should handle non-Latin digits in book: <NAME> (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DAANIYYEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (hi)", -> ` expect(p.parse("Hosho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSHO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (hi)", -> ` expect(p.parse("Yoael 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("YOAEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (hi)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (hi)", -> ` expect(p.parse("Obadhah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADHAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("<NAME> 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Yona 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("YONA 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>ic (hi)", -> ` expect(p.parse("Meeka 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MEEKA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (hi)", -> ` expect(p.parse("Nahoom 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHOOM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (hi)", -> ` expect(p.parse("Habakkook 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABAKKOOK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (hi)", -> ` expect(p.parse("Sapanyah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("SAPANYAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (hi)", -> ` expect(p.parse("Haggaai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGAAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (hi)", -> ` expect(p.parse("Jakaryah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("JAKARYAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (hi)", -> ` expect(p.parse("Malakee 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALAKEE 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book <NAME> <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Mattee 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MATTEE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Marakus 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("MARAKUS 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Looka 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("LOOKA 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (hi)", -> ` expect(p.parse("1. Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("1. YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (hi)", -> ` expect(p.parse("2. Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("2. YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book <NAME>John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>John (hi)", -> ` expect(p.parse("3. Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("3. YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book <NAME> (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (hi)", -> ` expect(p.parse("Yuhanna 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("YUHANNA 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (hi)", -> ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Praeriton Ke Kam 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true it "should handle non-Latin digits in book: Acts (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("PRAERITON KE KAM 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (hi)", -> ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") ` true it "should handle non-Latin digits in book: Rom (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMIYON 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (hi)", -> ` expect(p.parse("2. K<NAME> 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") ` true it "should handle non-Latin digits in book: 2Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("2. <NAME> 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("2. KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (hi)", -> ` expect(p.parse("1. Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") ` true it "should handle non-Latin digits in book: 1Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("1. KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (hi)", -> ` expect(p.parse("Galatiyon 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATIYON 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (hi)", -> ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") ` true it "should handle non-Latin digits in book: Eph (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("IAFISIYON 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (hi)", -> ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") ` true it "should handle non-Latin digits in book: Phil (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("FILIPPAIYON 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (hi)", -> ` expect(p.parse("Kulussaiyon 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("KULUSSAIYON 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (hi)", -> ` expect(p.parse("2. Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("2. THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (hi)", -> ` expect(p.parse("1. <NAME>issaluneekiy<NAME> 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thaissaluneekiyon 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("1. THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book <NAME>Tim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>Tim (hi)", -> ` expect(p.parse("2. Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("2. TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (hi)", -> ` expect(p.parse("1. Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("1. TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (hi)", -> ` expect(p.parse("Teetus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TEETUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (hi)", -> ` expect(p.parse("Filemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("FILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (hi)", -> ` expect(p.parse("Ibraaaniyon 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("IBRAAANIYON 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (hi)", -> ` expect(p.parse("Yakoob 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("YAKOOB 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (hi)", -> ` expect(p.parse("2. Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("2. PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (hi)", -> ` expect(p.parse("1. Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("1. PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (hi)", -> ` expect(p.parse("Yahooda 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("YAHOODA 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (hi)", -> ` expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (hi)", -> ` expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (hi)", -> ` expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (hi)", -> ` expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (hi)", -> ` expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (hi)", -> ` expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (hi)", -> ` expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (hi)", -> ` expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["hi"] it "should handle ranges (hi)", -> expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (hi)", -> expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (hi)", -> expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (hi)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (hi)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (hi)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (hi)", -> expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] it "should handle book ranges (hi)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1 to 3 Yoohanna").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (hi)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
true
bcv_parser = require("../../js/hi_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PImos","PI:NAME:<NAME>END_PIad","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PIah","Hab","Zeph","Hag","Zech","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","Acts","Rom","1Cor","2Cor","Gal","Eph","Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas","1Pet","2Pet","1John","2John","3John","Jude","Rev"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (hi)", -> ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") ` true it "should handle non-Latin digits in book: Gen (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Utpaati 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("उत्पत्ति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("UTPAATI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्पाति 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प0 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प० 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("उत्प॰ 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (hi)", -> ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") ` true it "should handle non-Latin digits in book: Exod (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Nirgaman 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("NIRGAMAN 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्गमन 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग0 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("निर्ग० 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (hi)", -> ` expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (hi)", -> ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") ` true it "should handle non-Latin digits in book: Lev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Laaivyavyavastha 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LAAIVYAVYAVASTHA 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य्व्य्वस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यव्यवस्थ 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्यवस्था 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै0व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य0 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लै०व्य० 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("लैव्य 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (hi)", -> ` expect(p.parse("Ginatee 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("GINATEE 1:1").osis()).toEqual("Num.1.1") expect(p.parse("गिनती 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (hi)", -> ` expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (hi)", -> ` expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (hi)", -> ` expect(p.parse("Vilapageet 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("VILAPAGEET 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगीत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलापगेत 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("विलाप 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (hi)", -> ` expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (hi)", -> ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") ` true it "should handle non-Latin digits in book: Rev (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Prakashaitavakya 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("PRAKASHAITAVAKYA 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित-वाक्‍य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशित वाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रकाशितवाक्य 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका0 वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा0 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्रका० वा० 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र. व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("प्र व 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (hi)", -> ` expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (hi)", -> ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") ` true it "should handle non-Latin digits in book: Deut (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Vyavasthaavivaran 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("VYAVASTHAAVIVARAN 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था विवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य्वस्थाविवरन 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्थाविवरण 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य0 वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव0वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यवस्था 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्यव०वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि0 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("व्य० वि० 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PIosh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Yahoshoo 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("YAHOSHOO 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशु 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("यहोशू 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (hi)", -> ` expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Nyayiyon 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("न्यायिय का विर्तान्त 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("न्यायियों 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("NYAYIYON 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (hi)", -> ` expect(p.parse("Root 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("ROOT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रुत 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("रूत 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (hi)", -> ` expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (hi)", -> ` expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (hi)", -> ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true it "should handle non-Latin digits in book: Isa (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("yashaayaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("YASHAAYAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशायाह 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशाया 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा0 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा० 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("यशा 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (hi)", -> ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") ` true it "should handle non-Latin digits in book: 2Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Shamooael 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐयल की 2री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("शमुऐयल की २री पुस्तक 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SHAMOOAEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमूएल 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 शमू 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू0 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2शमू० 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (hi)", -> ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Shamooael 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") ` true it "should handle non-Latin digits in book: 1Sam (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 ShPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("शमुऐल की 1ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("शमुऐल की १ली पुस्तक 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SHAMOOAEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमूएल 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 शमू 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू0 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1शमू० 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") ` true it "should handle non-Latin digits in book: 2Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Raja 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 2रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त २रा भाग 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजाओं 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 RAJA 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 राजा 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (hi)", -> ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") ` true it "should handle non-Latin digits in book: 1Kgs (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Raja 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("राजाओ का विर्तान्त 1ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("राजाओ का विर्तान्त १ला भाग् 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजाओं 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 RAJA 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 राजा 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (hi)", -> ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") ` true it "should handle non-Latin digits in book: 2Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Itihas 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 2रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("इतिहास २रा भाग 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 ITIHAS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इतिहास 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 इति 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (hi)", -> ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") ` true it "should handle non-Latin digits in book: 1Chr (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Itihas 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("इतिहास 1ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("इतिहास १ला भाग 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 ITIHAS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इतिहास 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 इति 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (hi)", -> ` expect(p.parse("Aejra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("AEJRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("एज्रा 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (hi)", -> ` expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nahemyah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("न्हेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NAHEMYAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमायाह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेम्याह 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("नहेमा 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (hi)", -> ` expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (hi)", -> ` expect(p.parse("Aester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("AESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("एस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ऐस्तेर 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (hi)", -> ` expect(p.parse("Ayyoob 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("AYYOOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अय्यूब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("अययुब 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (hi)", -> ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") ` true it "should handle non-Latin digits in book: Ps (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Bhjan 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("पढ़ें भजन सं0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("पढ़ें भजन सं० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन-सहिन्ता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन संहिता 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स0 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन स० 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("BHJAN 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("भजन 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (hi)", -> ` expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (hi)", -> ` expect(p.parse("Neetivachan 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("NEETIVACHAN 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति वचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिबचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिवचन 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति व 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीतिव 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("नीति 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (hi)", -> ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true it "should handle non-Latin digits in book: Eccl (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Sabhopadeshak 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("SABHOPADESHAK 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोपदेशक 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप0 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभोप० 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("सभो 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (hi)", -> ` expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (hi)", -> ` expect(p.parse("Reshthageet 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("RESHTHAGEET 1:1").osis()).toEqual("Song.1.1") expect(p.parse("स्रेस्ट गीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठगीत 1:1").osis()).toEqual("Song.1.1") expect(p.parse("श्रेष्ठ 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (hi)", -> ` expect(p.parse("Yirmayah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("YIRMAYAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्मयाह 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("यिर्म 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (hi)", -> ` expect(p.parse("Yahejakel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("YAHEJAKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेजकेल 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("यहेज 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") ` true it "should handle non-Latin digits in book: PI:NAME:<NAME>END_PI (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Daaniyyel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DAANIYYEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्येल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानिय्यल 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि0 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि० 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("दानि 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (hi)", -> ` expect(p.parse("Hosho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSHO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("होशे 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (hi)", -> ` expect(p.parse("Yoael 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("YOAEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("योएल 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (hi)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("आमोस 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (hi)", -> ` expect(p.parse("Obadhah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADHAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्दाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबद्याह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबेधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओबधाह 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("ओब 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Yona 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("YONA 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("योना 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PIic (hi)", -> ` expect(p.parse("Meeka 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MEEKA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("मीका 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (hi)", -> ` expect(p.parse("Nahoom 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHOOM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("नहूम 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (hi)", -> ` expect(p.parse("Habakkook 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABAKKOOK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक्कूक 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("हबक 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (hi)", -> ` expect(p.parse("Sapanyah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("SAPANYAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन्याह 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("सपन 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (hi)", -> ` expect(p.parse("Haggaai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGAAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गे 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("हाग्गै 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (hi)", -> ` expect(p.parse("Jakaryah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("JAKARYAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकयार्ह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("जकर्याह 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (hi)", -> ` expect(p.parse("Malakee 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALAKEE 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("मलाकी 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Mattee 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MATTEE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("मत्ती 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Marakus 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("MARAKUS 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मरकुस 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("मार्क 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Looka 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("LOOKA 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("लूका 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (hi)", -> ` expect(p.parse("1. Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Yoohanna 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("1. YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 YOOHANNA 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 युहत्रा 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 यूहन्ना 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (hi)", -> ` expect(p.parse("2. Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Yoohanna 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("2. YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 YOOHANNA 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 युहत्रा 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 यूहन्ना 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PIJohn (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PIJohn (hi)", -> ` expect(p.parse("3. Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Yoohanna 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("3. YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 YOOHANNA 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 युहत्रा 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 यूहन्ना 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (hi)", -> ` expect(p.parse("Yuhanna 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("YUHANNA 1:1").osis()).toEqual("John.1.1") expect(p.parse("युहत्रा 1:1").osis()).toEqual("John.1.1") expect(p.parse("यूहन्ना 1:1").osis()).toEqual("John.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (hi)", -> ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Praeriton Ke Kam 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true it "should handle non-Latin digits in book: Acts (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("प्रेरितों के कामों 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("PRAERITON KE KAM 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरितों के काम 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("मसीह-दूत 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि0 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रेरि० 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र. क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्र.क 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("प्रक 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (hi)", -> ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") ` true it "should handle non-Latin digits in book: Rom (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Romiyon 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMIYON 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियों 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमियो 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमि० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम0 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोमी 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("रोम० 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (hi)", -> ` expect(p.parse("2. KPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") ` true it "should handle non-Latin digits in book: 2Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("2. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Kurinthiayon 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("2. KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 KURINTHIAYON 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्यि़यों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरन्थियों 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थियो 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कोरिन्‍थी 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 कुरिन्थ 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि0 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2कुरि० 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (hi)", -> ` expect(p.parse("1. Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") ` true it "should handle non-Latin digits in book: 1Cor (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Kurinthiayon 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("1. KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 KURINTHIAYON 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्यि़यों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरन्थियों 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थियो 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कोरिन्‍थी 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 कुरिन्थ 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि0 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1कुरि० 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (hi)", -> ` expect(p.parse("Galatiyon 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATIYON 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलातियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलतियों 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाति 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("गलाती 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (hi)", -> ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") ` true it "should handle non-Latin digits in book: Eph (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Iafisiyon 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("IAFISIYON 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसियों 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसि 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफिसी 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि0 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("इफि० 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (hi)", -> ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") ` true it "should handle non-Latin digits in book: Phil (hi)", -> p.set_options non_latin_digits_strategy: "replace" ` expect(p.parse("Filippaiyon 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("FILIPPAIYON 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पियों 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्‍पी 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलिप्पि 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि0 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("फिलि० 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (hi)", -> ` expect(p.parse("Kulussaiyon 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("KULUSSAIYON 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सियों 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्‍सी 1:1").osis()).toEqual("Col.1.1") expect(p.parse("कुलुस्सि 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (hi)", -> ` expect(p.parse("2. Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thaissaluneekiyon 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("2. THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THAISSALUNEEKIYON 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्सलुनीकियों 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिसलुनिकी 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 थिस्स 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (hi)", -> ` expect(p.parse("1. PI:NAME:<NAME>END_PIissaluneekiyPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thaissaluneekiyon 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("1. THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THAISSALUNEEKIYON 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्सलुनीकियों 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिसलुनिकी 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 थिस्स 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PITim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PITim (hi)", -> ` expect(p.parse("2. Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Teemuathaiyus 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("2. TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TEEMUATHAIYUS 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुाथैयुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तिमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीमुथियुस 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 तीम 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (hi)", -> ` expect(p.parse("1. Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Teemuathaiyus 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("1. TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TEEMUATHAIYUS 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुाथैयुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तिमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीमुथियुस 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 तीम 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (hi)", -> ` expect(p.parse("Teetus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TEETUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("तीतुस 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (hi)", -> ` expect(p.parse("Filemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("FILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फिलेमोन 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("फले 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (hi)", -> ` expect(p.parse("Ibraaaniyon 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("IBRAAANIYON 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानियों 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानि 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("इब्रानी 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (hi)", -> ` expect(p.parse("Yakoob 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("YAKOOB 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("याकूब 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (hi)", -> ` expect(p.parse("2. Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pataras 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("2. PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PATARAS 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पत्रुस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतरस 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 पतर 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (hi)", -> ` expect(p.parse("1. Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pataras 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("1. PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PATARAS 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पत्रुस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतरस 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 पतर 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (hi)", -> ` expect(p.parse("Yahooda 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("YAHOODA 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("यहूदा 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (hi)", -> ` expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (hi)", -> ` expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (hi)", -> ` expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (hi)", -> ` expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (hi)", -> ` expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (hi)", -> ` expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (hi)", -> ` expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (hi)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (hi)", -> ` expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["hi"] it "should handle ranges (hi)", -> expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (hi)", -> expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (hi)", -> expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (hi)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (hi)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (hi)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (hi)", -> expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] it "should handle book ranges (hi)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1 to 3 Yoohanna").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (hi)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
[ { "context": " if evt.key is 't' or evt.keyIdentifier is 'U+0054'\n @setState\n label_show", "end": 10406, "score": 0.6891576647758484, "start": 10400, "tag": "KEY", "value": "U+0054" } ]
cjsx/table.cjsx
ChengCat/lovecat
0
React = require('react') widgets = require('./widgets') _ = require('lodash') utils = require('./utils') DPR = window.devicePixelRatio TablePage = React.createClass getInitialState: -> hover: null hover_touch: null selected: null selected_in_box: null select_shift: null select_box_A: null select_box_B: null table_left: null table_top: null table_width: null table_height: null label_show: true place_canvas: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 @refs.canvas.getDOMNode().style.height = view_height + 'px' @refs.canvas.getDOMNode().style.width = view_width + 'px' @refs.canvas.getDOMNode().height = view_height * DPR @refs.canvas.getDOMNode().width = view_width * DPR console.log @refs.canvas.getDOMNode().height, view_height, view_height * 1.5 [L,T,W,H] = @props.table_position( DPR, view_width, view_height) @setState table_left: L table_top: T table_width: W table_height: H redraw: -> do @update_bg canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.clearRect(0, 0, canvas.width, canvas.height) do @draw_data do @draw_select_box data_to_screen: (data) -> return @props.data_to_screen( data.v, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) draw_data: -> canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') now_selected = @get_selected() for data in @props.data [x, y] = @data_to_screen(data) hover = null if _.isEqual @state.hover, data.k if @state.hover_touch hover = 'touch' else hover = 'mouse' selected = _.contains(now_selected, data.k) ctx.save() @props.draw_data_point( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() if @state.label_show ctx.save() @props.draw_data_label( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() update_bg: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 canvas = @refs.canvas_bg.getDOMNode() hover_data = null if @state.hover? hover_data = _.find(@props.data, (d) => _.isEqual(d.k, @state.hover)) return if not @props.bg_need_redraw? will_redraw = @props.bg_need_redraw(view_width*DPR, view_height*DPR, canvas, hover_data) return if not will_redraw? canvas.style.height = view_height + 'px' canvas.style.width = view_width + 'px' canvas.height = view_height * DPR canvas.width = view_width * DPR switch will_redraw when '2d' ctx = canvas.getContext('2d') ctx.save() @props.draw_bg(ctx, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) ctx.restore() when 'webgl' gl = canvas.getContext('webgl') or canvas.getContext('experimental-webgl') gl.viewport(0, 0, view_width*DPR, view_height*DPR) gl.clear(gl.COLOR_BUFFER_BIT) @props.draw_bg(gl, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) draw_select_box: -> return if not @state.select_box_A? canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.save() [x1,y1,x2,y2] = @get_select_box() if @props.draw_select_box? @props.draw_select_box(ctx, DPR, x1, y1, x2-x1, y2-y1, @state) ctx.restore() get_select_box: -> [x1, y1] = @state.select_box_A [x2, y2] = @state.select_box_B if x1 > x2 then [x1, x2] = [x2, x1] if y1 > y2 then [y1, y2] = [y2, y1] return [x1, y1, x2, y2] get_selected: -> ori_selected = @state.selected or [] new_selected = @state.selected_in_box or [] if @state.select_shift is null res = ori_selected else if @state.select_shift res = _.xor(ori_selected, new_selected) else res = new_selected if _.isEmpty(res) then null else res componentWillMount: -> @moving_x0 = null @moving_y0 = null @moving_points0 = null componentDidMount: -> do @place_canvas window.addEventListener('resize', @place_canvas) window.addEventListener('mousemove', @onmousemove) window.addEventListener('mousedown', @onmousedown) window.addEventListener('mouseup', @onmouseup) window.addEventListener('touchmove', @ontouchmove) window.addEventListener('touchstart', @ontouchstart) window.addEventListener('touchend', @ontouchend) window.addEventListener('keydown', @onkeydown) componentDidUpdate: -> do @redraw componentWillUnmount: -> window.removeEventListener('resize', @place_canvas) window.removeEventListener('mousemove', @onmousemove) window.removeEventListener('mousedown', @onmousedown) window.removeEventListener('mouseup', @onmouseup) window.removeEventListener('touchmove', @ontouchmove) window.removeEventListener('touchstart', @ontouchstart) window.removeEventListener('touchend', @ontouchend) window.removeEventListener('keydown', @onkeydown) event_fix_retina: (evt) -> pageX: Math.floor(evt.pageX * DPR) pageY: Math.floor(evt.pageY * DPR) clientX: Math.floor(evt.clientX * DPR) clientY: Math.floor(evt.clientY * DPR) shiftKey: evt.shiftKey ontouchmove: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousemove(proxy_evt, true) evt.preventDefault() ontouchstart: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousedown(proxy_evt, true) ontouchend: (evt) -> @onmouseup({}, true) if @state.hover isnt null @setState hover: null onmousedown: (evt, touch) -> evt = @event_fix_retina(evt) @update_hover(evt, touch) if not @state.hover? @setState select_box_A: [evt.pageX, evt.pageY] select_box_B: [evt.pageX, evt.pageY] select_shift: evt.shiftKey selected_in_box: [] else if not _.isEmpty(@state.selected) and not _.contains(@state.selected, @state.hover) @setState selected: null else @moving_x0 = evt.pageX @moving_y0 = evt.pageY moving = [@state.hover] moving = @state.selected if @state.selected? @moving_points0 = [] for k in moving data = _.find(@props.data, (x) -> _.isEqual(x.k, k)).v @moving_points0.push({k:k, v:data}) onmouseup: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? selected = @get_selected() @setState select_box_A: null select_box_B: null selected_in_box: null select_shift: null selected: selected else if @moving_x0? @moving_x0 = null @moving_y0 = null @moving_points0 = null onmousemove: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? @setState select_box_B: [evt.clientX, evt.clientY] [x1,y1, x2,y2] = @get_select_box() selected = [] for point in @props.data [vx, vy] = @data_to_screen(point) if x1 <= vx and vx <= x2 and y1 <= vy and vy <= y2 selected.push(point.k) @setState selected_in_box: selected else if @moving_x0? for point in @moving_points0 new_data = @props.move_data(point.v, @moving_x0, @moving_y0, evt.clientX, evt.clientY, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) @props.onchange point.k, new_data else @update_hover(evt) update_hover: (evt, touch) -> x = evt.clientX y = evt.clientY hover = null threshold = @props.select_threshold(touch, DPR) for m in @props.data [vx, vy] = @data_to_screen(m) if Math.abs(vx - x) < threshold and Math.abs(vy - y) < threshold hover = m.k break if hover isnt @state.hover @setState hover: hover hover_touch: touch onkeydown: (evt) -> return if evt.target.nodeName is 'INPUT' if evt.key is 't' or evt.keyIdentifier is 'U+0054' @setState label_show: not @state.label_show evt.preventDefault() render: -> <div> <canvas className='canvas bg' ref='canvas_bg'/> <canvas className='canvas' ref='canvas'/> </div> module.exports = TablePage
210818
React = require('react') widgets = require('./widgets') _ = require('lodash') utils = require('./utils') DPR = window.devicePixelRatio TablePage = React.createClass getInitialState: -> hover: null hover_touch: null selected: null selected_in_box: null select_shift: null select_box_A: null select_box_B: null table_left: null table_top: null table_width: null table_height: null label_show: true place_canvas: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 @refs.canvas.getDOMNode().style.height = view_height + 'px' @refs.canvas.getDOMNode().style.width = view_width + 'px' @refs.canvas.getDOMNode().height = view_height * DPR @refs.canvas.getDOMNode().width = view_width * DPR console.log @refs.canvas.getDOMNode().height, view_height, view_height * 1.5 [L,T,W,H] = @props.table_position( DPR, view_width, view_height) @setState table_left: L table_top: T table_width: W table_height: H redraw: -> do @update_bg canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.clearRect(0, 0, canvas.width, canvas.height) do @draw_data do @draw_select_box data_to_screen: (data) -> return @props.data_to_screen( data.v, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) draw_data: -> canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') now_selected = @get_selected() for data in @props.data [x, y] = @data_to_screen(data) hover = null if _.isEqual @state.hover, data.k if @state.hover_touch hover = 'touch' else hover = 'mouse' selected = _.contains(now_selected, data.k) ctx.save() @props.draw_data_point( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() if @state.label_show ctx.save() @props.draw_data_label( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() update_bg: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 canvas = @refs.canvas_bg.getDOMNode() hover_data = null if @state.hover? hover_data = _.find(@props.data, (d) => _.isEqual(d.k, @state.hover)) return if not @props.bg_need_redraw? will_redraw = @props.bg_need_redraw(view_width*DPR, view_height*DPR, canvas, hover_data) return if not will_redraw? canvas.style.height = view_height + 'px' canvas.style.width = view_width + 'px' canvas.height = view_height * DPR canvas.width = view_width * DPR switch will_redraw when '2d' ctx = canvas.getContext('2d') ctx.save() @props.draw_bg(ctx, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) ctx.restore() when 'webgl' gl = canvas.getContext('webgl') or canvas.getContext('experimental-webgl') gl.viewport(0, 0, view_width*DPR, view_height*DPR) gl.clear(gl.COLOR_BUFFER_BIT) @props.draw_bg(gl, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) draw_select_box: -> return if not @state.select_box_A? canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.save() [x1,y1,x2,y2] = @get_select_box() if @props.draw_select_box? @props.draw_select_box(ctx, DPR, x1, y1, x2-x1, y2-y1, @state) ctx.restore() get_select_box: -> [x1, y1] = @state.select_box_A [x2, y2] = @state.select_box_B if x1 > x2 then [x1, x2] = [x2, x1] if y1 > y2 then [y1, y2] = [y2, y1] return [x1, y1, x2, y2] get_selected: -> ori_selected = @state.selected or [] new_selected = @state.selected_in_box or [] if @state.select_shift is null res = ori_selected else if @state.select_shift res = _.xor(ori_selected, new_selected) else res = new_selected if _.isEmpty(res) then null else res componentWillMount: -> @moving_x0 = null @moving_y0 = null @moving_points0 = null componentDidMount: -> do @place_canvas window.addEventListener('resize', @place_canvas) window.addEventListener('mousemove', @onmousemove) window.addEventListener('mousedown', @onmousedown) window.addEventListener('mouseup', @onmouseup) window.addEventListener('touchmove', @ontouchmove) window.addEventListener('touchstart', @ontouchstart) window.addEventListener('touchend', @ontouchend) window.addEventListener('keydown', @onkeydown) componentDidUpdate: -> do @redraw componentWillUnmount: -> window.removeEventListener('resize', @place_canvas) window.removeEventListener('mousemove', @onmousemove) window.removeEventListener('mousedown', @onmousedown) window.removeEventListener('mouseup', @onmouseup) window.removeEventListener('touchmove', @ontouchmove) window.removeEventListener('touchstart', @ontouchstart) window.removeEventListener('touchend', @ontouchend) window.removeEventListener('keydown', @onkeydown) event_fix_retina: (evt) -> pageX: Math.floor(evt.pageX * DPR) pageY: Math.floor(evt.pageY * DPR) clientX: Math.floor(evt.clientX * DPR) clientY: Math.floor(evt.clientY * DPR) shiftKey: evt.shiftKey ontouchmove: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousemove(proxy_evt, true) evt.preventDefault() ontouchstart: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousedown(proxy_evt, true) ontouchend: (evt) -> @onmouseup({}, true) if @state.hover isnt null @setState hover: null onmousedown: (evt, touch) -> evt = @event_fix_retina(evt) @update_hover(evt, touch) if not @state.hover? @setState select_box_A: [evt.pageX, evt.pageY] select_box_B: [evt.pageX, evt.pageY] select_shift: evt.shiftKey selected_in_box: [] else if not _.isEmpty(@state.selected) and not _.contains(@state.selected, @state.hover) @setState selected: null else @moving_x0 = evt.pageX @moving_y0 = evt.pageY moving = [@state.hover] moving = @state.selected if @state.selected? @moving_points0 = [] for k in moving data = _.find(@props.data, (x) -> _.isEqual(x.k, k)).v @moving_points0.push({k:k, v:data}) onmouseup: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? selected = @get_selected() @setState select_box_A: null select_box_B: null selected_in_box: null select_shift: null selected: selected else if @moving_x0? @moving_x0 = null @moving_y0 = null @moving_points0 = null onmousemove: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? @setState select_box_B: [evt.clientX, evt.clientY] [x1,y1, x2,y2] = @get_select_box() selected = [] for point in @props.data [vx, vy] = @data_to_screen(point) if x1 <= vx and vx <= x2 and y1 <= vy and vy <= y2 selected.push(point.k) @setState selected_in_box: selected else if @moving_x0? for point in @moving_points0 new_data = @props.move_data(point.v, @moving_x0, @moving_y0, evt.clientX, evt.clientY, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) @props.onchange point.k, new_data else @update_hover(evt) update_hover: (evt, touch) -> x = evt.clientX y = evt.clientY hover = null threshold = @props.select_threshold(touch, DPR) for m in @props.data [vx, vy] = @data_to_screen(m) if Math.abs(vx - x) < threshold and Math.abs(vy - y) < threshold hover = m.k break if hover isnt @state.hover @setState hover: hover hover_touch: touch onkeydown: (evt) -> return if evt.target.nodeName is 'INPUT' if evt.key is 't' or evt.keyIdentifier is '<KEY>' @setState label_show: not @state.label_show evt.preventDefault() render: -> <div> <canvas className='canvas bg' ref='canvas_bg'/> <canvas className='canvas' ref='canvas'/> </div> module.exports = TablePage
true
React = require('react') widgets = require('./widgets') _ = require('lodash') utils = require('./utils') DPR = window.devicePixelRatio TablePage = React.createClass getInitialState: -> hover: null hover_touch: null selected: null selected_in_box: null select_shift: null select_box_A: null select_box_B: null table_left: null table_top: null table_width: null table_height: null label_show: true place_canvas: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 @refs.canvas.getDOMNode().style.height = view_height + 'px' @refs.canvas.getDOMNode().style.width = view_width + 'px' @refs.canvas.getDOMNode().height = view_height * DPR @refs.canvas.getDOMNode().width = view_width * DPR console.log @refs.canvas.getDOMNode().height, view_height, view_height * 1.5 [L,T,W,H] = @props.table_position( DPR, view_width, view_height) @setState table_left: L table_top: T table_width: W table_height: H redraw: -> do @update_bg canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.clearRect(0, 0, canvas.width, canvas.height) do @draw_data do @draw_select_box data_to_screen: (data) -> return @props.data_to_screen( data.v, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) draw_data: -> canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') now_selected = @get_selected() for data in @props.data [x, y] = @data_to_screen(data) hover = null if _.isEqual @state.hover, data.k if @state.hover_touch hover = 'touch' else hover = 'mouse' selected = _.contains(now_selected, data.k) ctx.save() @props.draw_data_point( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() if @state.label_show ctx.save() @props.draw_data_label( ctx, DPR, data, x, y, hover, selected, @state ) ctx.restore() update_bg: -> view_width = document.documentElement.clientWidth view_height = document.documentElement.clientHeight switch DPR when 1.5 if view_width % 2 is 1 then view_width -= 1 if view_height % 2 is 1 then view_height -= 1 canvas = @refs.canvas_bg.getDOMNode() hover_data = null if @state.hover? hover_data = _.find(@props.data, (d) => _.isEqual(d.k, @state.hover)) return if not @props.bg_need_redraw? will_redraw = @props.bg_need_redraw(view_width*DPR, view_height*DPR, canvas, hover_data) return if not will_redraw? canvas.style.height = view_height + 'px' canvas.style.width = view_width + 'px' canvas.height = view_height * DPR canvas.width = view_width * DPR switch will_redraw when '2d' ctx = canvas.getContext('2d') ctx.save() @props.draw_bg(ctx, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) ctx.restore() when 'webgl' gl = canvas.getContext('webgl') or canvas.getContext('experimental-webgl') gl.viewport(0, 0, view_width*DPR, view_height*DPR) gl.clear(gl.COLOR_BUFFER_BIT) @props.draw_bg(gl, DPR, @state.table_left, @state.table_top, @state.table_width, @state.table_height, @state) draw_select_box: -> return if not @state.select_box_A? canvas = @refs.canvas.getDOMNode() ctx = canvas.getContext('2d') ctx.save() [x1,y1,x2,y2] = @get_select_box() if @props.draw_select_box? @props.draw_select_box(ctx, DPR, x1, y1, x2-x1, y2-y1, @state) ctx.restore() get_select_box: -> [x1, y1] = @state.select_box_A [x2, y2] = @state.select_box_B if x1 > x2 then [x1, x2] = [x2, x1] if y1 > y2 then [y1, y2] = [y2, y1] return [x1, y1, x2, y2] get_selected: -> ori_selected = @state.selected or [] new_selected = @state.selected_in_box or [] if @state.select_shift is null res = ori_selected else if @state.select_shift res = _.xor(ori_selected, new_selected) else res = new_selected if _.isEmpty(res) then null else res componentWillMount: -> @moving_x0 = null @moving_y0 = null @moving_points0 = null componentDidMount: -> do @place_canvas window.addEventListener('resize', @place_canvas) window.addEventListener('mousemove', @onmousemove) window.addEventListener('mousedown', @onmousedown) window.addEventListener('mouseup', @onmouseup) window.addEventListener('touchmove', @ontouchmove) window.addEventListener('touchstart', @ontouchstart) window.addEventListener('touchend', @ontouchend) window.addEventListener('keydown', @onkeydown) componentDidUpdate: -> do @redraw componentWillUnmount: -> window.removeEventListener('resize', @place_canvas) window.removeEventListener('mousemove', @onmousemove) window.removeEventListener('mousedown', @onmousedown) window.removeEventListener('mouseup', @onmouseup) window.removeEventListener('touchmove', @ontouchmove) window.removeEventListener('touchstart', @ontouchstart) window.removeEventListener('touchend', @ontouchend) window.removeEventListener('keydown', @onkeydown) event_fix_retina: (evt) -> pageX: Math.floor(evt.pageX * DPR) pageY: Math.floor(evt.pageY * DPR) clientX: Math.floor(evt.clientX * DPR) clientY: Math.floor(evt.clientY * DPR) shiftKey: evt.shiftKey ontouchmove: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousemove(proxy_evt, true) evt.preventDefault() ontouchstart: (evt) -> proxy_evt = pageX: evt.touches[0].pageX pageY: evt.touches[0].pageY clientX: evt.touches[0].clientX clientY: evt.touches[0].clientY @onmousedown(proxy_evt, true) ontouchend: (evt) -> @onmouseup({}, true) if @state.hover isnt null @setState hover: null onmousedown: (evt, touch) -> evt = @event_fix_retina(evt) @update_hover(evt, touch) if not @state.hover? @setState select_box_A: [evt.pageX, evt.pageY] select_box_B: [evt.pageX, evt.pageY] select_shift: evt.shiftKey selected_in_box: [] else if not _.isEmpty(@state.selected) and not _.contains(@state.selected, @state.hover) @setState selected: null else @moving_x0 = evt.pageX @moving_y0 = evt.pageY moving = [@state.hover] moving = @state.selected if @state.selected? @moving_points0 = [] for k in moving data = _.find(@props.data, (x) -> _.isEqual(x.k, k)).v @moving_points0.push({k:k, v:data}) onmouseup: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? selected = @get_selected() @setState select_box_A: null select_box_B: null selected_in_box: null select_shift: null selected: selected else if @moving_x0? @moving_x0 = null @moving_y0 = null @moving_points0 = null onmousemove: (evt, touch) -> evt = @event_fix_retina(evt) if @state.select_box_B? @setState select_box_B: [evt.clientX, evt.clientY] [x1,y1, x2,y2] = @get_select_box() selected = [] for point in @props.data [vx, vy] = @data_to_screen(point) if x1 <= vx and vx <= x2 and y1 <= vy and vy <= y2 selected.push(point.k) @setState selected_in_box: selected else if @moving_x0? for point in @moving_points0 new_data = @props.move_data(point.v, @moving_x0, @moving_y0, evt.clientX, evt.clientY, @state.table_left, @state.table_top, @state.table_width, @state.table_height ) @props.onchange point.k, new_data else @update_hover(evt) update_hover: (evt, touch) -> x = evt.clientX y = evt.clientY hover = null threshold = @props.select_threshold(touch, DPR) for m in @props.data [vx, vy] = @data_to_screen(m) if Math.abs(vx - x) < threshold and Math.abs(vy - y) < threshold hover = m.k break if hover isnt @state.hover @setState hover: hover hover_touch: touch onkeydown: (evt) -> return if evt.target.nodeName is 'INPUT' if evt.key is 't' or evt.keyIdentifier is 'PI:KEY:<KEY>END_PI' @setState label_show: not @state.label_show evt.preventDefault() render: -> <div> <canvas className='canvas bg' ref='canvas_bg'/> <canvas className='canvas' ref='canvas'/> </div> module.exports = TablePage
[ { "context": "fkShihTzAt8lSnkVyY55uep3'\n consumer_secret: 'nqek9o7ZGe0yMArRQJ10aH0sLcKtT7qm5tu2chqpt12w85wtyv'\n access_token: '1621263949-luTkfbICzKo5gHy0", "end": 1111, "score": 0.999464750289917, "start": 1061, "tag": "KEY", "value": "nqek9o7ZGe0yMArRQJ10aH0sLcKtT7qm5tu2chqpt12w85wtyv" }, { "context": "sLcKtT7qm5tu2chqpt12w85wtyv'\n access_token: '1621263949-luTkfbICzKo5gHy0fsQpBrMFytzAu36r0pAVTI5'\n access_token_secret: '1gk0chMyaoG7Y272ume9", "end": 1184, "score": 0.9986290335655212, "start": 1134, "tag": "KEY", "value": "1621263949-luTkfbICzKo5gHy0fsQpBrMFytzAu36r0pAVTI5" }, { "context": "pBrMFytzAu36r0pAVTI5'\n access_token_secret: '1gk0chMyaoG7Y272ume9ruHjX8OZNaUK6l4tVe67wFuXE'\n console.log conf.consumer_key\n client = n", "end": 1259, "score": 0.9997497797012329, "start": 1214, "tag": "KEY", "value": "1gk0chMyaoG7Y272ume9ruHjX8OZNaUK6l4tVe67wFuXE" } ]
lib/utils.coffee
ayinloya/flitteraweb
0
@Utils = prettyDate: (date)-> if date if Config.dateFormat moment(date).format(Config.dateFormat) else moment(date).format('D/M/YYYY') timeSince: (date)-> if date seconds = Math.floor((new Date() - date) / 1000) interval = Math.floor(seconds / 31536000) return interval + "years ago" if interval > 1 interval = Math.floor(seconds / 2592000) return interval + " months ago" if interval > 1 interval = Math.floor(seconds / 86400) return interval + " days ago" if interval > 1 interval = Math.floor(seconds / 3600) return interval + " hours ago" if interval > 1 interval = Math.floor(seconds / 60) return interval + " minutes" if interval > 1 "just now" isMobile: -> /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test navigator.userAgent loginRequired: -> Router.go '/sign-in' initTwitter: -> Twitter = Npm.require('twit'); conf= consumer_key: 'cfkShihTzAt8lSnkVyY55uep3' consumer_secret: 'nqek9o7ZGe0yMArRQJ10aH0sLcKtT7qm5tu2chqpt12w85wtyv' access_token: '1621263949-luTkfbICzKo5gHy0fsQpBrMFytzAu36r0pAVTI5' access_token_secret: '1gk0chMyaoG7Y272ume9ruHjX8OZNaUK6l4tVe67wFuXE' console.log conf.consumer_key client = new Twitter(conf) return client
146877
@Utils = prettyDate: (date)-> if date if Config.dateFormat moment(date).format(Config.dateFormat) else moment(date).format('D/M/YYYY') timeSince: (date)-> if date seconds = Math.floor((new Date() - date) / 1000) interval = Math.floor(seconds / 31536000) return interval + "years ago" if interval > 1 interval = Math.floor(seconds / 2592000) return interval + " months ago" if interval > 1 interval = Math.floor(seconds / 86400) return interval + " days ago" if interval > 1 interval = Math.floor(seconds / 3600) return interval + " hours ago" if interval > 1 interval = Math.floor(seconds / 60) return interval + " minutes" if interval > 1 "just now" isMobile: -> /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test navigator.userAgent loginRequired: -> Router.go '/sign-in' initTwitter: -> Twitter = Npm.require('twit'); conf= consumer_key: 'cfkShihTzAt8lSnkVyY55uep3' consumer_secret: '<KEY>' access_token: '<KEY>' access_token_secret: '<KEY>' console.log conf.consumer_key client = new Twitter(conf) return client
true
@Utils = prettyDate: (date)-> if date if Config.dateFormat moment(date).format(Config.dateFormat) else moment(date).format('D/M/YYYY') timeSince: (date)-> if date seconds = Math.floor((new Date() - date) / 1000) interval = Math.floor(seconds / 31536000) return interval + "years ago" if interval > 1 interval = Math.floor(seconds / 2592000) return interval + " months ago" if interval > 1 interval = Math.floor(seconds / 86400) return interval + " days ago" if interval > 1 interval = Math.floor(seconds / 3600) return interval + " hours ago" if interval > 1 interval = Math.floor(seconds / 60) return interval + " minutes" if interval > 1 "just now" isMobile: -> /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test navigator.userAgent loginRequired: -> Router.go '/sign-in' initTwitter: -> Twitter = Npm.require('twit'); conf= consumer_key: 'cfkShihTzAt8lSnkVyY55uep3' consumer_secret: 'PI:KEY:<KEY>END_PI' access_token: 'PI:KEY:<KEY>END_PI' access_token_secret: 'PI:KEY:<KEY>END_PI' console.log conf.consumer_key client = new Twitter(conf) return client
[ { "context": "s\",\"Prov\",\"Eccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"", "end": 505, "score": 0.8163854479789734, "start": 502, "tag": "NAME", "value": "Dan" }, { "context": "ov\",\"Eccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"", "end": 511, "score": 0.7160052061080933, "start": 508, "tag": "NAME", "value": "Hos" }, { "context": "ccl\",\"Song\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"", "end": 518, "score": 0.8800695538520813, "start": 514, "tag": "NAME", "value": "Joel" }, { "context": "ong\",\"Isa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\"", "end": 522, "score": 0.6198064088821411, "start": 521, "tag": "NAME", "value": "A" }, { "context": "sa\",\"Jer\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",", "end": 530, "score": 0.6055020093917847, "start": 528, "tag": "NAME", "value": "Ob" }, { "context": "r\",\"Lam\",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Mat", "end": 540, "score": 0.881677508354187, "start": 535, "tag": "NAME", "value": "Jonah" }, { "context": ",\"Ezek\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Ma", "end": 546, "score": 0.848404049873352, "start": 543, "tag": "NAME", "value": "Mic" }, { "context": "\",\"Dan\",\"Hos\",\"Joel\",\"Amos\",\"Obad\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"L", "end": 552, "score": 0.6008275747299194, "start": 549, "tag": "NAME", "value": "Nah" }, { "context": "d\",\"Jonah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",", "end": 584, "score": 0.6638028621673584, "start": 581, "tag": "NAME", "value": "Mal" }, { "context": "nah\",\"Mic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",", "end": 591, "score": 0.9383742809295654, "start": 587, "tag": "NAME", "value": "Matt" }, { "context": "ic\",\"Nah\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"", "end": 598, "score": 0.9586656093597412, "start": 594, "tag": "NAME", "value": "Mark" }, { "context": "h\",\"Hab\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"Eph\",\"P", "end": 605, "score": 0.8909631967544556, "start": 601, "tag": "NAME", "value": "Luke" }, { "context": "\",\"Zeph\",\"Hag\",\"Zech\",\"Mal\",\"Matt\",\"Mark\",\"Luke\",\"John\",\"Acts\",\"Rom\",\"1Cor\",\"2Cor\",\"Gal\",\"Eph\",\"Phil\",\"C", "end": 612, "score": 0.7375199794769287, "start": 608, "tag": "NAME", "value": "John" }, { "context": ":1\").osis()).toEqual(\"Sir.1.1\")\n\t\texpect(p.parse(\"Ben Sira 1:1\").osis()).toEqual(\"Sir.1.1\")\n\t\texpect(p.parse", "end": 14461, "score": 0.9484343528747559, "start": 14453, "tag": "NAME", "value": "Ben Sira" }, { "context": "al(\"Deut.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Josh (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 25238, "score": 0.8116994500160217, "start": 25237, "tag": "NAME", "value": "J" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Josh (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Joushua 1:1\").osi", "end": 25500, "score": 0.7913315296173096, "start": 25496, "tag": "NAME", "value": "Josh" }, { "context": "()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"2nd. Samuel 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 41305, "score": 0.5820300579071045, "start": 41302, "tag": "NAME", "value": "uel" }, { "context": ".osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"II. Samual 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 42381, "score": 0.8138757944107056, "start": 42375, "tag": "NAME", "value": "Samual" }, { "context": ".osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"II. Samuel 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 42444, "score": 0.930286169052124, "start": 42438, "tag": "NAME", "value": "Samuel" }, { "context": ").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"2. Samual 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 42880, "score": 0.8174214363098145, "start": 42874, "tag": "NAME", "value": "Samual" }, { "context": ").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"2. Samuel 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 42942, "score": 0.8669346570968628, "start": 42936, "tag": "NAME", "value": "Samuel" }, { "context": "is()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.parse(\"II Samuel 1:1\").osis()).toEqual(\"2Sam.1.1\")\n\t\texpect(p.pars", "end": 43066, "score": 0.5049985647201538, "start": 43063, "tag": "NAME", "value": "uel" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Samuals 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 51645, "score": 0.8779376149177551, "start": 51638, "tag": "NAME", "value": "Samuals" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Samuell 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 51708, "score": 0.7916138768196106, "start": 51701, "tag": "NAME", "value": "Samuell" }, { "context": "is()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Samuels 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 51771, "score": 0.6280494332313538, "start": 51767, "tag": "NAME", "value": "uels" }, { "context": ".osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1st Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 51834, "score": 0.7190766334533691, "start": 51828, "tag": "NAME", "value": "Samual" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1st Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 51897, "score": 0.776789665222168, "start": 51888, "tag": "NAME", "value": "st Samuel" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuall 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52023, "score": 0.8727476000785828, "start": 52013, "tag": "NAME", "value": "I. Samuall" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuals 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52086, "score": 0.9268404841423035, "start": 52076, "tag": "NAME", "value": "I. Samuals" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuell 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52149, "score": 0.92717444896698, "start": 52142, "tag": "NAME", "value": "Samuell" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuels 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52212, "score": 0.9209566712379456, "start": 52205, "tag": "NAME", "value": "Samuels" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52522, "score": 0.9278461933135986, "start": 52516, "tag": "NAME", "value": "Samual" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52584, "score": 0.9609760642051697, "start": 52578, "tag": "NAME", "value": "Samuel" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I Samuals 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52832, "score": 0.8594806790351868, "start": 52825, "tag": "NAME", "value": "Samuals" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I Samuell 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.", "end": 52890, "score": 0.5119816064834595, "start": 52887, "tag": "NAME", "value": "Sam" }, { "context": "s()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I Samuell 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 52894, "score": 0.6712586879730225, "start": 52892, "tag": "NAME", "value": "ll" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect", "end": 53010, "score": 0.5996733903884888, "start": 53010, "tag": "NAME", "value": "" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53018, "score": 0.8262113332748413, "start": 53012, "tag": "NAME", "value": "Samual" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect", "end": 53072, "score": 0.45737382769584656, "start": 53072, "tag": "NAME", "value": "" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53080, "score": 0.9580509066581726, "start": 53074, "tag": "NAME", "value": "Samuel" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1 Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53141, "score": 0.8213602304458618, "start": 53135, "tag": "NAME", "value": "Samual" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1 Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53202, "score": 0.9217199087142944, "start": 53196, "tag": "NAME", "value": "Samuel" }, { "context": "osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1st. Sam 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53263, "score": 0.9116032719612122, "start": 53260, "tag": "NAME", "value": "Sam" }, { "context": "osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1st. Sma 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pa", "end": 53322, "score": 0.5168740153312683, "start": 53321, "tag": "NAME", "value": "S" }, { "context": "\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53568, "score": 0.5179197788238525, "start": 53562, "tag": "NAME", "value": "Samuel" }, { "context": ".osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samuall 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53868, "score": 0.8466652631759644, "start": 53864, "tag": "NAME", "value": "uall" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samuals 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53928, "score": 0.941718578338623, "start": 53921, "tag": "NAME", "value": "Samuals" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samuell 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 53988, "score": 0.919299304485321, "start": 53981, "tag": "NAME", "value": "Samuell" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samuels 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54048, "score": 0.8563094735145569, "start": 54041, "tag": "NAME", "value": "Samuels" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"1. Sam 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54107, "score": 0.5767520070075989, "start": 54104, "tag": "NAME", "value": "Sam" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Sam 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54343, "score": 0.8305768966674805, "start": 54340, "tag": "NAME", "value": "Sam" }, { "context": ").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"I. Sma 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54402, "score": 0.6128236055374146, "start": 54399, "tag": "NAME", "value": "Sma" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samual 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54461, "score": 0.9545906186103821, "start": 54455, "tag": "NAME", "value": "Samual" }, { "context": "1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.parse(\"Samuel 1:1\").osis()).toEqual(\"1Sam.1.1\")\n\t\texpect(p.pars", "end": 54520, "score": 0.9737948179244995, "start": 54514, "tag": "NAME", "value": "Samuel" }, { "context": "1\").osis()).toEqual(\"Jer.1.1\")\n\t\texpect(p.parse(\"Jeremie 1:1\").osis()).toEqual(\"Jer.1.1\")\n\t\texpect(p.p", "end": 175706, "score": 0.5292580723762512, "start": 175704, "tag": "NAME", "value": "er" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Dan (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Danial 1:1\").osis", "end": 181977, "score": 0.806751012802124, "start": 181974, "tag": "NAME", "value": "Dan" }, { "context": ").osis()).toEqual(\"Dan.1.1\")\n\t\texpect(p.parse(\"Daniel 1:1\").osis()).toEqual(\"Dan.1.1\")\n\t\texpect(p.parse", "end": 182074, "score": 0.5704039931297302, "start": 182071, "tag": "NAME", "value": "iel" }, { "context": "al(\"Obad.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Jonah (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 186126, "score": 0.9550559520721436, "start": 186121, "tag": "NAME", "value": "Jonah" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Jonah (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jonah 1:1\").osis(", "end": 186386, "score": 0.9534066915512085, "start": 186381, "tag": "NAME", "value": "Jonah" }, { "context": "andle book: Jonah (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jonah 1:1\").osis()).toEqual(\"Jonah.1.1\")\n\t\texpect(p.par", "end": 186424, "score": 0.898681640625, "start": 186419, "tag": "NAME", "value": "Jonah" }, { "context": "\t\texpect(p.parse(\"Jonah 1:1\").osis()).toEqual(\"Jonah.1.1\")\n\t\texpect(p.parse(\"Jnh 1:1\").osis()).toEqual", "end": 186453, "score": 0.5432112812995911, "start": 186451, "tag": "NAME", "value": "ah" }, { "context": "ual(\"Mal.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 200124, "score": 0.9909623861312866, "start": 200123, "tag": "NAME", "value": "M" }, { "context": "l(\"Mal.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 200127, "score": 0.5590673685073853, "start": 200124, "tag": "NAME", "value": "att" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Matt (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"The Gospel acc", "end": 200383, "score": 0.9932333827018738, "start": 200382, "tag": "NAME", "value": "M" }, { "context": ".include_apocrypha true\n\tit \"should handle book: Matt (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"The Gospel accord", "end": 200386, "score": 0.5245957970619202, "start": 200383, "tag": "NAME", "value": "att" }, { "context": ".1.1\")\n\t\texpect(p.parse(\"The Gospel according to Mattthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.", "end": 214035, "score": 0.5440799593925476, "start": 214032, "tag": "NAME", "value": "att" }, { "context": ".1\")\n\t\texpect(p.parse(\"Gospel according to St. Mathtew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215470, "score": 0.8914494514465332, "start": 215466, "tag": "NAME", "value": "htew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"Gospel according to St. Matthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215554, "score": 0.9026132822036743, "start": 215547, "tag": "NAME", "value": "Matthew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"Gospel according to St. Matthwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215638, "score": 0.7425602078437805, "start": 215631, "tag": "NAME", "value": "Matthwe" }, { "context": "att.1.1\")\n\t\texpect(p.parse(\"Gospel according to St. Mattiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpec", "end": 215713, "score": 0.5036527514457703, "start": 215713, "tag": "NAME", "value": "" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"Gospel according to St. Mattiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215722, "score": 0.7599508762359619, "start": 215715, "tag": "NAME", "value": "Mattiew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"Gospel according to St. Matttew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215806, "score": 0.7627037167549133, "start": 215799, "tag": "NAME", "value": "Matttew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Mathhew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215890, "score": 0.9055446982383728, "start": 215883, "tag": "NAME", "value": "Mathhew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Mathiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 215974, "score": 0.8061257600784302, "start": 215967, "tag": "NAME", "value": "Mathiew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Mathtew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216058, "score": 0.977062463760376, "start": 216051, "tag": "NAME", "value": "Mathtew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Matthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216142, "score": 0.9819390773773193, "start": 216135, "tag": "NAME", "value": "Matthew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Matthwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216226, "score": 0.9633688926696777, "start": 216219, "tag": "NAME", "value": "Matthwe" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Mattiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216310, "score": 0.9181516766548157, "start": 216303, "tag": "NAME", "value": "Mattiew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Matttew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216394, "score": 0.941888153553009, "start": 216387, "tag": "NAME", "value": "Matttew" }, { "context": "1.1\")\n\t\texpect(p.parse(\"The Gospel according to St Matt 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216478, "score": 0.8019554615020752, "start": 216474, "tag": "NAME", "value": "Matt" }, { "context": ".1\")\n\t\texpect(p.parse(\"The Gospel according to St. Mat 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216562, "score": 0.5400749444961548, "start": 216559, "tag": "NAME", "value": "Mat" }, { "context": "(\"Matt.1.1\")\n\t\texpect(p.parse(\"Gospel according to Saint Matt 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpe", "end": 216636, "score": 0.6026560068130493, "start": 216635, "tag": "NAME", "value": "S" }, { "context": ".1\")\n\t\texpect(p.parse(\"Gospel according to Saint Matt 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216645, "score": 0.9266840815544128, "start": 216642, "tag": "NAME", "value": "att" }, { "context": ".1\")\n\t\texpect(p.parse(\"Gospel according to St Mathhew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 216728, "score": 0.7048701047897339, "start": 216725, "tag": "NAME", "value": "hew" }, { "context": "(\"Matt.1.1\")\n\t\texpect(p.parse(\"Gospel according to Mattthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 220258, "score": 0.9115474820137024, "start": 220250, "tag": "NAME", "value": "Mattthew" }, { "context": "tt.1.1\")\n\t\texpect(p.parse(\"The Gospel according to Matt 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 220582, "score": 0.7763828635215759, "start": 220578, "tag": "NAME", "value": "Matt" }, { "context": "(\"Matt.1.1\")\n\t\texpect(p.parse(\"The Gospel of Saint Mattiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(", "end": 222747, "score": 0.5038456916809082, "start": 222746, "tag": "NAME", "value": "M" }, { "context": "sis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St. Mattthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 243767, "score": 0.6013867259025574, "start": 243760, "tag": "NAME", "value": "attthew" }, { "context": "osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Mattthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.", "end": 244468, "score": 0.5227636098861694, "start": 244465, "tag": "NAME", "value": "att" }, { "context": ".osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St. Matthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 244792, "score": 0.8651541471481323, "start": 244785, "tag": "NAME", "value": "Matthew" }, { "context": "s()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Saint Matt 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245047, "score": 0.8598247170448303, "start": 245044, "tag": "NAME", "value": "att" }, { "context": "is()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Mathtew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pa", "end": 245234, "score": 0.5207909345626831, "start": 245232, "tag": "NAME", "value": "ht" }, { "context": ").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Matthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245299, "score": 0.89445960521698, "start": 245292, "tag": "NAME", "value": "Matthew" }, { "context": ").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Matthwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245362, "score": 0.755976676940918, "start": 245355, "tag": "NAME", "value": "Matthwe" }, { "context": "osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Mattiew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.p", "end": 245422, "score": 0.5510924458503723, "start": 245419, "tag": "NAME", "value": "att" }, { "context": "is()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St Matttew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pa", "end": 245486, "score": 0.5121248364448547, "start": 245484, "tag": "NAME", "value": "tt" }, { "context": ".osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St. Mathew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245551, "score": 0.7765693068504333, "start": 245545, "tag": "NAME", "value": "Mathew" }, { "context": ".osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St. Mattew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245614, "score": 0.7967918515205383, "start": 245608, "tag": "NAME", "value": "Mattew" }, { "context": "sis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"St. Mattwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 245677, "score": 0.8399879932403564, "start": 245672, "tag": "NAME", "value": "attwe" }, { "context": "sis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Mathtew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247332, "score": 0.5155825614929199, "start": 247330, "tag": "NAME", "value": "ew" }, { "context": "1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Matthew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247392, "score": 0.8924568891525269, "start": 247385, "tag": "NAME", "value": "Matthew" }, { "context": "1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Matthwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247452, "score": 0.7608781456947327, "start": 247445, "tag": "NAME", "value": "Matthwe" }, { "context": "sis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Matttew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247572, "score": 0.49922746419906616, "start": 247570, "tag": "NAME", "value": "ew" }, { "context": "1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Mathew 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247751, "score": 0.6411129832267761, "start": 247745, "tag": "NAME", "value": "Mathew" }, { "context": "1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.parse(\"Mattwe 1:1\").osis()).toEqual(\"Matt.1.1\")\n\t\texpect(p.pars", "end": 247869, "score": 0.5086627006530762, "start": 247863, "tag": "NAME", "value": "Mattwe" }, { "context": ".osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.parse(\"1. John 1:1\").osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.par", "end": 325728, "score": 0.8369196057319641, "start": 325724, "tag": "NAME", "value": "John" }, { "context": "s()).toEqual(\"1John.1.1\")\n\t\texpect(p.parse(\"1. Jonh 1:1\").osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.par", "end": 325789, "score": 0.5659018754959106, "start": 325788, "tag": "NAME", "value": "h" }, { "context": ".osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.parse(\"1. Joon 1:1\").osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.par", "end": 325850, "score": 0.8911968469619751, "start": 325846, "tag": "NAME", "value": "Joon" }, { "context": ".osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.parse(\"I. John 1:1\").osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.par", "end": 326521, "score": 0.8330005407333374, "start": 326517, "tag": "NAME", "value": "John" }, { "context": ".osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.parse(\"I. Joon 1:1\").osis()).toEqual(\"1John.1.1\")\n\t\texpect(p.par", "end": 326643, "score": 0.8762060403823853, "start": 326639, "tag": "NAME", "value": "Joon" }, { "context": "osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.parse(\"II. John 1:1\").osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.par", "end": 337318, "score": 0.9954084753990173, "start": 337314, "tag": "NAME", "value": "John" }, { "context": "osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.parse(\"II. Jonh 1:1\").osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.par", "end": 337380, "score": 0.9444550275802612, "start": 337376, "tag": "NAME", "value": "Jonh" }, { "context": "osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.parse(\"II. Joon 1:1\").osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.par", "end": 337442, "score": 0.9759817123413086, "start": 337438, "tag": "NAME", "value": "Joon" }, { "context": ".osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.parse(\"2. John 1:1\").osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.par", "end": 337809, "score": 0.9820608496665955, "start": 337805, "tag": "NAME", "value": "John" }, { "context": "s()).toEqual(\"2John.1.1\")\n\t\texpect(p.parse(\"2. Jonh 1:1\").osis()).toEqual(\"2John.1.1\")\n\t\texpect(p.par", "end": 337870, "score": 0.9096422791481018, "start": 337869, "tag": "NAME", "value": "h" }, { "context": ".osis()).toEqual(\"3John.1.1\")\n\t\texpect(p.parse(\"3. John 1:1\").osis()).toEqual(\"3John.1.1\")\n\t\texpect(p.par", "end": 350012, "score": 0.5315496325492859, "start": 350008, "tag": "NAME", "value": "John" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: John (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"The Gospel accord", "end": 358262, "score": 0.7706263661384583, "start": 358258, "tag": "NAME", "value": "John" }, { "context": ").osis()).toEqual(\"1Cor.1.1\")\n\t\texpect(p.parse(\"I. Corithins 1:1\").osis()).toEqual(\"1Cor.1.1\")\n\t\texpect(p.pars", "end": 481727, "score": 0.7404573559761047, "start": 481718, "tag": "NAME", "value": "Corithins" }, { "context": ").osis()).toEqual(\"1Cor.1.1\")\n\t\texpect(p.parse(\"I. Cornthins 1:1\").osis()).toEqual(\"1Cor.1.1\")\n\t\texpect(p.pars", "end": 481792, "score": 0.7294166684150696, "start": 481783, "tag": "NAME", "value": "Cornthins" }, { "context": "\"1Thess.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book 2Tim (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv", "end": 639007, "score": 0.5988383889198303, "start": 639006, "tag": "NAME", "value": "2" }, { "context": "p.include_apocrypha true\n\tit \"should handle book: 2Tim (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Second Thimoth", "end": 639266, "score": 0.759074330329895, "start": 639265, "tag": "NAME", "value": "2" }, { "context": ")).toEqual(\"1Tim.1.1\")\n\t\texpect(p.parse(\"I. Thimoty 1:1\").osis()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.pars", "end": 649233, "score": 0.5351637601852417, "start": 649232, "tag": "NAME", "value": "y" }, { "context": "is()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.parse(\"I. Timothy 1:1\").osis()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.pars", "end": 649296, "score": 0.7540119886398315, "start": 649292, "tag": "NAME", "value": "othy" }, { "context": "is()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.parse(\"I. Tomothy 1:1\").osis()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.pars", "end": 649359, "score": 0.5818004608154297, "start": 649355, "tag": "NAME", "value": "othy" }, { "context": "()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.parse(\"1. Timoty 1:1\").osis()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.pars", "end": 649669, "score": 0.5252431035041809, "start": 649668, "tag": "NAME", "value": "y" }, { "context": "is()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.parse(\"I. Timoty 1:1\").osis()).toEqual(\"1Tim.1.1\")\n\t\texpect(p.pars", "end": 650041, "score": 0.7034094929695129, "start": 650038, "tag": "NAME", "value": "oty" }, { "context": ").osis()).toEqual(\"1Pet.1.1\")\n\t\texpect(p.parse(\"I. Peter 1:1\").osis()).toEqual(\"1Pet.1.1\")\n\t\texpect(p.pars", "end": 671978, "score": 0.8874693512916565, "start": 671973, "tag": "NAME", "value": "Peter" }, { "context": " handle book: Sus (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Shoshana 1:1\").osis()).toEqual(\"Sus.1.1\")\n\t\texpect(p.parse", "end": 681402, "score": 0.9955833554267883, "start": 681394, "tag": "NAME", "value": "Shoshana" }, { "context": ":1\").osis()).toEqual(\"Sus.1.1\")\n\t\texpect(p.parse(\"Susannah 1:1\").osis()).toEqual(\"Sus.1.1\")\n\t\texpect(p.parse", "end": 681462, "score": 0.9929265975952148, "start": 681454, "tag": "NAME", "value": "Susannah" }, { "context": ":1\").osis()).toEqual(\"Sus.1.1\")\n\t\texpect(p.parse(\"Susanna 1:1\").osis()).toEqual(\"Sus.1.1\")\n\t\texpect(p.parse", "end": 681521, "score": 0.9978510141372681, "start": 681514, "tag": "NAME", "value": "Susanna" }, { "context": "s()).toEqual(\"1Macc.1.1\")\n\t\texpect(p.parse(\"I. Macccabe 1:1\").osis()).toEqual(\"1Macc.1.1\")\n\t\texpect(p.par", "end": 759503, "score": 0.5650444030761719, "start": 759498, "tag": "NAME", "value": "ccabe" }, { "context": "ual(\"Heb.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book John,Jonah,Job,Josh,Joel (en)\", ->\n\tp = {}\n\tbeforeEach", "end": 764904, "score": 0.9875670671463013, "start": 764900, "tag": "NAME", "value": "John" }, { "context": "eb.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book John,Jonah,Job,Josh,Joel (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\t", "end": 764910, "score": 0.8579287528991699, "start": 764905, "tag": "NAME", "value": "Jonah" }, { "context": "\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book John,Jonah,Job,Josh,Joel (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = ", "end": 764914, "score": 0.8039114475250244, "start": 764911, "tag": "NAME", "value": "Job" }, { "context": "\t`\n\t\ttrue\ndescribe \"Localized book John,Jonah,Job,Josh,Joel (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new b", "end": 764919, "score": 0.9682022333145142, "start": 764915, "tag": "NAME", "value": "Josh" }, { "context": "ue\ndescribe \"Localized book John,Jonah,Job,Josh,Joel (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 764924, "score": 0.965485692024231, "start": 764922, "tag": "NAME", "value": "el" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: John,Jonah,Job,Josh,Joel (en)\", ->\n\t\t`\n\t\texpect(p.pars", "end": 765183, "score": 0.982228696346283, "start": 765179, "tag": "NAME", "value": "John" }, { "context": "lude_apocrypha true\n\tit \"should handle book: John,Jonah,Job,Josh,Joel (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jo ", "end": 765189, "score": 0.8590389490127563, "start": 765184, "tag": "NAME", "value": "Jonah" }, { "context": "pocrypha true\n\tit \"should handle book: John,Jonah,Job,Josh,Joel (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jo 1:1\"", "end": 765193, "score": 0.7662882804870605, "start": 765190, "tag": "NAME", "value": "Job" }, { "context": "ypha true\n\tit \"should handle book: John,Jonah,Job,Josh,Joel (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jo 1:1\").osi", "end": 765198, "score": 0.9600748419761658, "start": 765194, "tag": "NAME", "value": "Josh" }, { "context": "true\n\tit \"should handle book: John,Jonah,Job,Josh,Joel (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jo 1:1\").osis()).", "end": 765203, "score": 0.7277640700340271, "start": 765199, "tag": "NAME", "value": "Joel" }, { "context": "al(\"John.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Jude,Judg (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new b", "end": 765397, "score": 0.873292088508606, "start": 765393, "tag": "NAME", "value": "Jude" }, { "context": "n.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Jude,Judg (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 765402, "score": 0.5595225095748901, "start": 765399, "tag": "NAME", "value": "udg" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Jude,Judg (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jud 1:1\").os", "end": 765661, "score": 0.8383767604827881, "start": 765657, "tag": "NAME", "value": "Jude" }, { "context": "e_apocrypha true\n\tit \"should handle book: Jude,Judg (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Jud 1:1\").osis())", "end": 765666, "score": 0.5890377759933472, "start": 765665, "tag": "NAME", "value": "g" }, { "context": "al(\"Jude.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt,Mark,Mal (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = n", "end": 766082, "score": 0.9992706179618835, "start": 766078, "tag": "NAME", "value": "Matt" }, { "context": "de.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt,Mark,Mal (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bc", "end": 766087, "score": 0.9987634420394897, "start": 766083, "tag": "NAME", "value": "Mark" }, { "context": "1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Matt,Mark,Mal (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new bcv_pa", "end": 766091, "score": 0.8965043425559998, "start": 766088, "tag": "NAME", "value": "Mal" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Matt,Mark,Mal (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Ma 1:1\")", "end": 766350, "score": 0.998831033706665, "start": 766346, "tag": "NAME", "value": "Matt" }, { "context": "lude_apocrypha true\n\tit \"should handle book: Matt,Mark,Mal (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Ma 1:1\").osis", "end": 766355, "score": 0.9975568056106567, "start": 766351, "tag": "NAME", "value": "Mark" }, { "context": "apocrypha true\n\tit \"should handle book: Matt,Mark,Mal (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Ma 1:1\").osis()).", "end": 766359, "score": 0.9142565727233887, "start": 766356, "tag": "NAME", "value": "Mal" }, { "context": "\tp.include_apocrypha true\n\tit \"should handle book: Phil,Phlm (en)\", ->\n\t\t`\n\t\texpect(p.parse(\"Ph 1:1\").osi", "end": 766817, "score": 0.8205417394638062, "start": 766813, "tag": "NAME", "value": "Phil" }, { "context": "al(\"Phil.1.1\")\n\t\t`\n\t\ttrue\ndescribe \"Localized book Zeph,Zech (en)\", ->\n\tp = {}\n\tbeforeEach ->\n\t\tp = new", "end": 767014, "score": 0.6357154250144958, "start": 767012, "tag": "NAME", "value": "Ze" } ]
lib/bible-tools/lib/Bible-Passage-Reference-Parser/src/en/spec.coffee
saiba-mais/bible-lessons
149
bcv_parser = require("../../js/en_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (en)", -> ` expect(p.parse("Genneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennsis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genese 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesi 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gensis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Ge 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gn 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("GENNEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (en)", -> ` expect(p.parse("Exodis 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exodus 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exode 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exods 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exd 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exo 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Ex 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("EXODIS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODUS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODE 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXO 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EX 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (en)", -> ` expect(p.parse("Bel and the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (en)", -> ` expect(p.parse("Levetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levi 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Le 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lv 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LEVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVI 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LE 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (en)", -> ` expect(p.parse("Numbers 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Number 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Numb 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nm 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nu 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("NUMBERS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMBER 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMB 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NU 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (en)", -> ` expect(p.parse("The Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclesiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclusiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ben Sira 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Eccs 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (en)", -> ` expect(p.parse("The Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (en)", -> ` expect(p.parse("Lamentations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamentation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("La 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lm 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("LAMENTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMENTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LA 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (en)", -> ` expect(p.parse("The Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremy 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep Jer 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (en)", -> ` expect(p.parse("Revalations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revalation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revel 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Re 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rv 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("REVALATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVALATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVEL 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RE 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (en)", -> ` expect(p.parse("The Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Man 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (en)", -> ` expect(p.parse("Deeteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deeteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duet 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deu 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dt 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("DEETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUET 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEU 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book Josh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Josh (en)", -> ` expect(p.parse("Joushua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Joshua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jousua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jos 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jsh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("JOUSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOUSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOS 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (en)", -> ` expect(p.parse("Judges 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("JUDGES 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (en)", -> ` expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rt 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ru 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RU 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (en)", -> ` expect(p.parse("First Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (en)", -> ` expect(p.parse("Second Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (en)", -> ` expect(p.parse("Isaaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaisha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaish 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Issah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isai 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Ia 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Is 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("ISAAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISSAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAI 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IS 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (en)", -> ` expect(p.parse("Second Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("SECOND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (en)", -> ` expect(p.parse("First Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("FIRST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (en)", -> ` expect(p.parse("Fourth Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("FOURTH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (en)", -> ` expect(p.parse("Third Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kin 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("THIRD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KIN 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (en)", -> ` expect(p.parse("Second Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Ch 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CH 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (en)", -> ` expect(p.parse("First Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Ch 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CH 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (en)", -> ` expect(p.parse("Esra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("ESRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (en)", -> ` expect(p.parse("Nehemaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Ne 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("NEHEMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NE 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (en)", -> ` expect(p.parse("Esther (Greek) 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esther 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Est 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (en)", -> ` expect(p.parse("Esther 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esthr 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Es 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("ESTHER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTHR 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ES 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (en)", -> ` expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Jb 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (en)", -> ` expect(p.parse("Plasmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Passs 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plass 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psala 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pssm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("PLASMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (en)", -> ` expect(p.parse("The Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr Azar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzr 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (en)", -> ` expect(p.parse("Probverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Oroverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Porverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proberbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Poverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Provebs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pro 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prv 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pr 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pv 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("PROBVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("OROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PORVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROBERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("POVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVEBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRO 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PR 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PV 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (en)", -> ` expect(p.parse("Ecclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiasties 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiast 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiate 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoheleth 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccles 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecc 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoh 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ec 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qo 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("ECCLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTIES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAST 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOHELETH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("EC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QO 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (en)", -> ` expect(p.parse("The Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sng Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Thr 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Y 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (en)", -> ` expect(p.parse("The Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S of S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sngs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sgs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sng 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SoS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sol 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Son 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sg 1:1").osis()).toEqual("Song.1.1") expect(p.parse("So 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("THE SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S OF S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOL 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SO 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (en)", -> ` expect(p.parse("Jeremaiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeraiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremie 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermmah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremi 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jere 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Je 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jr 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("JEREMAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMI 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JR 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (en)", -> ` expect(p.parse("Exeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekial 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezk 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EXEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIAL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZK 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Dan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Dan (en)", -> ` expect(p.parse("Danial 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Daniel 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Da 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dl 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dn 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DANIAL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DA 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (en)", -> ` expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Ho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hs 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (en)", -> ` expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Jl 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JL 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (en)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Ams 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Am 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AM 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (en)", -> ` expect(p.parse("Obadiah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obadia 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obidah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obd 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Ob 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADIAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBADIA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBIDAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OB 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book Jonah (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jonah (en)", -> ` expect(p.parse("Jonah 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Jnh 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JNH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book Mic (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mic (en)", -> ` expect(p.parse("Michah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micha 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mica 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mi 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MICHAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICHA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MI 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (en)", -> ` expect(p.parse("Nahum 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nahu 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Na 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHUM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAHU 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NA 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (en)", -> ` expect(p.parse("Habbakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABBAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (en)", -> ` expect(p.parse("Zephanaiah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephanaia 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zep 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zp 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZEPHANAIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANAIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEP 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZP 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (en)", -> ` expect(p.parse("Haggiah 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggiai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hgg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hg 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGIAH 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGIAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (en)", -> ` expect(p.parse("Zacharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zakariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekaria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zach 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zac 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zch 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zec 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zc 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("ZACHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZCH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZC 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (en)", -> ` expect(p.parse("Malachi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malichi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malach 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malaci 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALACHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALICHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACH 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book Matt (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Matt (en)", -> ` expect(p.parse("The Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mtt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MTT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mark (en)", -> ` expect(p.parse("The Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mr 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MR 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book Luke (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Luke (en)", -> ` expect(p.parse("The Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lu 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LU 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (en)", -> ` expect(p.parse("First Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jo 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("FIRST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JO 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (en)", -> ` expect(p.parse("Second Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jo 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("SECOND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JO 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book 3John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3John (en)", -> ` expect(p.parse("Third Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jo 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("THIRD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JO 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: John (en)", -> ` expect(p.parse("The Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jn 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JN 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (en)", -> ` expect(p.parse("The Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actsss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Act 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Ac 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("THE ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACT 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("AC 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (en)", -> ` expect(p.parse("Romands 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roamns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romasn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rpmans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roman 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ros 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rm 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ro 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMANDS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROAMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMASN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RPMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMAN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RO 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (en)", -> ` expect(p.parse("Second Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("SECOND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (en)", -> ` expect(p.parse("First Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Co 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("FIRST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CO 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (en)", -> ` expect(p.parse("Galataians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiaans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianis 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatioans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatoans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatian 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatias 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatios 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galat 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gala 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Ga 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gl 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATAIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANIS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAN 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALAT 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (en)", -> ` expect(p.parse("Epehesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Esphesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesains 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesiand 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesions 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Epesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesain 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephes 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephe 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephs 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehp 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ep 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("EPEHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("ESPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAINS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAND 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIONS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAIN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHES 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHE 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHP 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EP 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (en)", -> ` expect(p.parse("Phillippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippin 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philli 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phili 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phi 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Php 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PHILLIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHP 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (en)", -> ` expect(p.parse("Callossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossans 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossian 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Coloss 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Co 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("CALLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIAN 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CO 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (en)", -> ` expect(p.parse("Second Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Th 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 TH 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (en)", -> ` expect(p.parse("First Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Th 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I TH 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book 2Tim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Tim (en)", -> ` expect(p.parse("Second Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (en)", -> ` expect(p.parse("First Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tm 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (en)", -> ` expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Ti 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TI 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (en)", -> ` expect(p.parse("Philemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlimon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Philem 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phile 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phm 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("PHILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLIMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILEM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILE 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHM 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (en)", -> ` expect(p.parse("Heebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heberws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrwes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwers 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrew 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HEEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBERWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWERS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREW 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (en)", -> ` expect(p.parse("James 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jame 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jam 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jms 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Ja 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jm 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("JAMES 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAME 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAM 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JMS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JA 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JM 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (en)", -> ` expect(p.parse("Second Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (en)", -> ` expect(p.parse("First Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (en)", -> ` expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jde 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (en)", -> ` expect(p.parse("Tobias 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobit 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobi 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobt 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tb 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (en)", -> ` expect(p.parse("Judith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judt 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (en)", -> ` expect(p.parse("Baruch 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Br 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (en)", -> ` expect(p.parse("Shoshana 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("Susannah 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("Susanna 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (en)", -> ` expect(p.parse("Second Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Ma 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (en)", -> ` expect(p.parse("Third Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (en)", -> ` expect(p.parse("Fourth Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (en)", -> ` expect(p.parse("First Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Ma 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Localized book Ezek,Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek,Ezra (en)", -> ` expect(p.parse("Ez 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EZ 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Hab,Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab,Hag (en)", -> ` expect(p.parse("Ha 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HA 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Heb,Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb,Hab (en)", -> ` expect(p.parse("Hb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book John,Jonah,Job,Josh,Joel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: John,Jonah,Job,Josh,Joel (en)", -> ` expect(p.parse("Jo 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("JO 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Jude,Judg (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude,Judg (en)", -> ` expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jd 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Ju 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JU 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Matt,Mark,Mal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Matt,Mark,Mal (en)", -> ` expect(p.parse("Ma 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MA 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Phil,Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil,Phlm (en)", -> ` expect(p.parse("Ph 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PH 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Zeph,Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph,Zech (en)", -> ` expect(p.parse("Ze 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZE 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["en"] it "should handle ranges (en)", -> expect(p.parse("Titus 1:1 through 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1through2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THROUGH 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 thru 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1thru2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THRU 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (en)", -> expect(p.parse("Titus 1:1, chapters 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTERS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (en)", -> expect(p.parse("Exod 1:1 verses 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSES 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (en)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 compare 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 COMPARE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF. 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (en)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (en)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("Rev 3f, 4:2f").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 F, 4:2 F").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (en)", -> expect(p.parse("Lev 1 (AMP)").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("lev 1 amp").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("Lev 1 (ASV)").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("lev 1 asv").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("Lev 1 (CEB)").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("lev 1 ceb").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("Lev 1 (CEV)").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("lev 1 cev").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("Lev 1 (ESV)").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("lev 1 esv").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("Lev 1 (HCSB)").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("lev 1 hcsb").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("Lev 1 (KJV)").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("Lev 1 (LXX)").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("lev 1 lxx").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("Lev 1 (MSG)").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("lev 1 msg").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("Lev 1 (NAB)").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("lev 1 nab").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("Lev 1 (NABRE)").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("lev 1 nabre").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("Lev 1 (NAS)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nas").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NASB)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nasb").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NIRV)").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("lev 1 nirv").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("Lev 1 (NIV)").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("lev 1 niv").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("Lev 1 (NKJV)").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("lev 1 nkjv").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("Lev 1 (NLT)").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("lev 1 nlt").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("Lev 1 (NRSV)").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("lev 1 nrsv").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("Lev 1 (RSV)").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("lev 1 rsv").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("Lev 1 (TNIV)").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] expect(p.parse("lev 1 tniv").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] it "should handle book ranges (en)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1st through 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jo").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (en)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
165616
bcv_parser = require("../../js/en_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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","<NAME>","<NAME>","<NAME>","<NAME>mos","<NAME>ad","<NAME>","<NAME>","<NAME>","Hab","Zeph","Hag","Zech","<NAME>","<NAME>","<NAME>","<NAME>","<NAME>","Acts","Rom","1Cor","2Cor","Gal","Eph","Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas","1Pet","2Pet","1John","2John","3John","Jude","Rev"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (en)", -> ` expect(p.parse("Genneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennsis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genese 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesi 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gensis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Ge 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gn 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("GENNEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (en)", -> ` expect(p.parse("Exodis 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exodus 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exode 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exods 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exd 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exo 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Ex 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("EXODIS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODUS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODE 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXO 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EX 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (en)", -> ` expect(p.parse("Bel and the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (en)", -> ` expect(p.parse("Levetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levi 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Le 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lv 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LEVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVI 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LE 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (en)", -> ` expect(p.parse("Numbers 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Number 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Numb 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nm 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nu 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("NUMBERS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMBER 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMB 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NU 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (en)", -> ` expect(p.parse("The Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclesiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclusiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Eccs 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (en)", -> ` expect(p.parse("The Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (en)", -> ` expect(p.parse("Lamentations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamentation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("La 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lm 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("LAMENTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMENTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LA 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (en)", -> ` expect(p.parse("The Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremy 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep Jer 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (en)", -> ` expect(p.parse("Revalations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revalation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revel 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Re 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rv 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("REVALATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVALATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVEL 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RE 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (en)", -> ` expect(p.parse("The Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Man 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (en)", -> ` expect(p.parse("Deeteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deeteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duet 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deu 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dt 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("DEETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUET 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEU 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book <NAME>osh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (en)", -> ` expect(p.parse("Joushua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Joshua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jousua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jos 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jsh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("JOUSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOUSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOS 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (en)", -> ` expect(p.parse("Judges 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("JUDGES 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (en)", -> ` expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rt 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ru 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RU 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (en)", -> ` expect(p.parse("First Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (en)", -> ` expect(p.parse("Second Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (en)", -> ` expect(p.parse("Isaaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaisha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaish 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Issah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isai 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Ia 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Is 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("ISAAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISSAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAI 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IS 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (en)", -> ` expect(p.parse("Second Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sam<NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. <NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. <NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. <NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. <NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sam<NAME> 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("SECOND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (en)", -> ` expect(p.parse("First Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sam<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I <NAME>ue<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I<NAME>. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I<NAME>. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. <NAME>ma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("Sam<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("FIRST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (en)", -> ` expect(p.parse("Fourth Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("FOURTH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (en)", -> ` expect(p.parse("Third Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kin 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("THIRD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KIN 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (en)", -> ` expect(p.parse("Second Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Ch 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CH 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (en)", -> ` expect(p.parse("First Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Ch 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CH 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (en)", -> ` expect(p.parse("Esra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("ESRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (en)", -> ` expect(p.parse("Nehemaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Ne 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("NEHEMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NE 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (en)", -> ` expect(p.parse("Esther (Greek) 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esther 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Est 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (en)", -> ` expect(p.parse("Esther 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esthr 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Es 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("ESTHER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTHR 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ES 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (en)", -> ` expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Jb 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (en)", -> ` expect(p.parse("Plasmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Passs 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plass 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psala 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pssm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("PLASMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (en)", -> ` expect(p.parse("The Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr Azar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzr 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (en)", -> ` expect(p.parse("Probverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Oroverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Porverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proberbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Poverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Provebs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pro 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prv 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pr 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pv 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("PROBVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("OROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PORVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROBERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("POVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVEBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRO 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PR 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PV 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (en)", -> ` expect(p.parse("Ecclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiasties 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiast 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiate 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoheleth 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccles 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecc 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoh 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ec 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qo 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("ECCLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTIES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAST 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOHELETH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("EC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QO 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (en)", -> ` expect(p.parse("The Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sng Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Thr 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Y 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (en)", -> ` expect(p.parse("The Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S of S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sngs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sgs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sng 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SoS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sol 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Son 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sg 1:1").osis()).toEqual("Song.1.1") expect(p.parse("So 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("THE SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S OF S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOL 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SO 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (en)", -> ` expect(p.parse("Jeremaiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeraiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("J<NAME>emie 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermmah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremi 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jere 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Je 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jr 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("JEREMAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMI 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JR 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (en)", -> ` expect(p.parse("Exeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekial 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezk 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EXEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIAL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZK 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Dan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (en)", -> ` expect(p.parse("Danial 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan<NAME> 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Da 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dl 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dn 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DANIAL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DA 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (en)", -> ` expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Ho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hs 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (en)", -> ` expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Jl 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JL 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (en)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Ams 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Am 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AM 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (en)", -> ` expect(p.parse("Obadiah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obadia 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obidah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obd 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Ob 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADIAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBADIA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBIDAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OB 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book <NAME> (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (en)", -> ` expect(p.parse("<NAME> 1:1").osis()).toEqual("Jon<NAME>.1.1") expect(p.parse("Jnh 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JNH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book Mic (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mic (en)", -> ` expect(p.parse("Michah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micha 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mica 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mi 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MICHAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICHA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MI 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (en)", -> ` expect(p.parse("Nahum 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nahu 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Na 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHUM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAHU 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NA 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (en)", -> ` expect(p.parse("Habbakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABBAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (en)", -> ` expect(p.parse("Zephanaiah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephanaia 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zep 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zp 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZEPHANAIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANAIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEP 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZP 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (en)", -> ` expect(p.parse("Haggiah 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggiai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hgg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hg 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGIAH 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGIAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (en)", -> ` expect(p.parse("Zacharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zakariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekaria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zach 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zac 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zch 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zec 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zc 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("ZACHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZCH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZC 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (en)", -> ` expect(p.parse("Malachi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malichi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malach 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malaci 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALACHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALICHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACH 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book <NAME> <NAME> (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> <NAME> (en)", -> ` expect(p.parse("The Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to M<NAME>thew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mat<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St<NAME>. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to <NAME>aint M<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Math<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint <NAME>attiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. M<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St M<NAME>thew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint M<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mat<NAME>ew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St M<NAME>iew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mat<NAME>ew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. <NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. M<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matht<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattt<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mtt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MTT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mark (en)", -> ` expect(p.parse("The Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mr 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MR 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book Luke (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Luke (en)", -> ` expect(p.parse("The Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lu 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LU 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (en)", -> ` expect(p.parse("First Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jon<NAME> 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. <NAME> 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jo 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("FIRST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JO 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (en)", -> ` expect(p.parse("Second Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. <NAME> 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. <NAME> 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. <NAME> 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. <NAME> 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jon<NAME> 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jo 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("SECOND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JO 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book 3John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3John (en)", -> ` expect(p.parse("Third Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. <NAME> 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jo 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("THIRD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JO 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME> (en)", -> ` expect(p.parse("The Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jn 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JN 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (en)", -> ` expect(p.parse("The Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actsss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Act 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Ac 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("THE ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACT 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("AC 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (en)", -> ` expect(p.parse("Romands 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roamns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romasn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rpmans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roman 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ros 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rm 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ro 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMANDS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROAMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMASN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RPMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMAN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RO 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (en)", -> ` expect(p.parse("Second Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("SECOND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (en)", -> ` expect(p.parse("First Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Co 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("FIRST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CO 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (en)", -> ` expect(p.parse("Galataians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiaans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianis 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatioans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatoans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatian 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatias 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatios 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galat 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gala 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Ga 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gl 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATAIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANIS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAN 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALAT 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (en)", -> ` expect(p.parse("Epehesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Esphesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesains 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesiand 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesions 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Epesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesain 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephes 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephe 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephs 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehp 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ep 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("EPEHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("ESPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAINS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAND 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIONS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAIN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHES 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHE 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHP 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EP 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (en)", -> ` expect(p.parse("Phillippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippin 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philli 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phili 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phi 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Php 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PHILLIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHP 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (en)", -> ` expect(p.parse("Callossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossans 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossian 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Coloss 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Co 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("CALLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIAN 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CO 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (en)", -> ` expect(p.parse("Second Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Th 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 TH 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (en)", -> ` expect(p.parse("First Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Th 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I TH 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book <NAME>Tim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>Tim (en)", -> ` expect(p.parse("Second Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (en)", -> ` expect(p.parse("First Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Thimot<NAME> 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tim<NAME> 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tom<NAME> 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timot<NAME> 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tim<NAME> 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tm 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (en)", -> ` expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Ti 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TI 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (en)", -> ` expect(p.parse("Philemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlimon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Philem 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phile 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phm 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("PHILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLIMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILEM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILE 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHM 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (en)", -> ` expect(p.parse("Heebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heberws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrwes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwers 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrew 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HEEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBERWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWERS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREW 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (en)", -> ` expect(p.parse("James 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jame 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jam 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jms 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Ja 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jm 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("JAMES 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAME 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAM 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JMS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JA 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JM 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (en)", -> ` expect(p.parse("Second Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (en)", -> ` expect(p.parse("First Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. <NAME> 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (en)", -> ` expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jde 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (en)", -> ` expect(p.parse("Tobias 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobit 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobi 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobt 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tb 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (en)", -> ` expect(p.parse("Judith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judt 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (en)", -> ` expect(p.parse("Baruch 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Br 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (en)", -> ` expect(p.parse("<NAME> 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("<NAME> 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (en)", -> ` expect(p.parse("Second Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Ma 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (en)", -> ` expect(p.parse("Third Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (en)", -> ` expect(p.parse("Fourth Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (en)", -> ` expect(p.parse("First Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Mac<NAME> 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Ma 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Localized book Ezek,Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek,Ezra (en)", -> ` expect(p.parse("Ez 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EZ 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Hab,Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab,Hag (en)", -> ` expect(p.parse("Ha 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HA 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Heb,Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb,Hab (en)", -> ` expect(p.parse("Hb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book <NAME>,<NAME>,<NAME>,<NAME>,Jo<NAME> (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>,<NAME>,<NAME>,<NAME>,<NAME> (en)", -> ` expect(p.parse("Jo 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("JO 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book <NAME>,J<NAME> (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>,Jud<NAME> (en)", -> ` expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jd 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Ju 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JU 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book <NAME>,<NAME>,<NAME> (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>,<NAME>,<NAME> (en)", -> ` expect(p.parse("Ma 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MA 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Phil,Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: <NAME>,Phlm (en)", -> ` expect(p.parse("Ph 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PH 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book <NAME>ph,Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph,Zech (en)", -> ` expect(p.parse("Ze 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZE 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["en"] it "should handle ranges (en)", -> expect(p.parse("Titus 1:1 through 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1through2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THROUGH 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 thru 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1thru2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THRU 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (en)", -> expect(p.parse("Titus 1:1, chapters 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTERS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (en)", -> expect(p.parse("Exod 1:1 verses 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSES 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (en)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 compare 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 COMPARE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF. 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (en)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (en)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("Rev 3f, 4:2f").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 F, 4:2 F").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (en)", -> expect(p.parse("Lev 1 (AMP)").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("lev 1 amp").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("Lev 1 (ASV)").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("lev 1 asv").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("Lev 1 (CEB)").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("lev 1 ceb").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("Lev 1 (CEV)").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("lev 1 cev").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("Lev 1 (ESV)").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("lev 1 esv").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("Lev 1 (HCSB)").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("lev 1 hcsb").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("Lev 1 (KJV)").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("Lev 1 (LXX)").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("lev 1 lxx").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("Lev 1 (MSG)").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("lev 1 msg").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("Lev 1 (NAB)").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("lev 1 nab").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("Lev 1 (NABRE)").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("lev 1 nabre").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("Lev 1 (NAS)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nas").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NASB)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nasb").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NIRV)").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("lev 1 nirv").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("Lev 1 (NIV)").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("lev 1 niv").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("Lev 1 (NKJV)").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("lev 1 nkjv").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("Lev 1 (NLT)").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("lev 1 nlt").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("Lev 1 (NRSV)").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("lev 1 nrsv").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("Lev 1 (RSV)").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("lev 1 rsv").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("Lev 1 (TNIV)").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] expect(p.parse("lev 1 tniv").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] it "should handle book ranges (en)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1st through 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jo").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (en)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
true
bcv_parser = require("../../js/en_bcv_parser.js").bcv_parser describe "Parsing", -> p = {} beforeEach -> p = new bcv_parser p.options.osis_compaction_strategy = "b" p.options.sequence_combination_strategy = "combine" it "should round-trip OSIS references", -> p.set_options osis_compaction_strategy: "bc" 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","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PImos","PI:NAME:<NAME>END_PIad","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","Hab","Zeph","Hag","Zech","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","PI:NAME:<NAME>END_PI","Acts","Rom","1Cor","2Cor","Gal","Eph","Phil","Col","1Thess","2Thess","1Tim","2Tim","Titus","Phlm","Heb","Jas","1Pet","2Pet","1John","2John","3John","Jude","Rev"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range it "should round-trip OSIS Apocrypha references", -> p.set_options osis_compaction_strategy: "bc", ps151_strategy: "b" p.include_apocrypha true books = ["Tob","Jdt","GkEsth","Wis","Sir","Bar","PrAzar","Sus","Bel","SgThree","EpJer","1Macc","2Macc","3Macc","4Macc","1Esd","2Esd","PrMan","Ps151"] for book in books bc = book + ".1" bcv = bc + ".1" bcv_range = bcv + "-" + bc + ".2" expect(p.parse(bc).osis()).toEqual bc expect(p.parse(bcv).osis()).toEqual bcv expect(p.parse(bcv_range).osis()).toEqual bcv_range p.set_options ps151_strategy: "bc" expect(p.parse("Ps151.1").osis()).toEqual "Ps.151" expect(p.parse("Ps151.1.1").osis()).toEqual "Ps.151.1" expect(p.parse("Ps151.1-Ps151.2").osis()).toEqual "Ps.151.1-Ps.151.2" p.include_apocrypha false for book in books bc = book + ".1" expect(p.parse(bc).osis()).toEqual "" it "should handle a preceding character", -> expect(p.parse(" Gen 1").osis()).toEqual "Gen.1" expect(p.parse("Matt5John3").osis()).toEqual "Matt.5,John.3" expect(p.parse("1Ps 1").osis()).toEqual "" expect(p.parse("11Sam 1").osis()).toEqual "" describe "Localized book Gen (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gen (en)", -> ` expect(p.parse("Genneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneeses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genieses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geniisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneses 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genises 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genisus 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gennsis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Geneis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genese 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Genesi 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gensis 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gen 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Ge 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("Gn 1:1").osis()).toEqual("Gen.1.1") p.include_apocrypha(false) expect(p.parse("GENNEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENIISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISES 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENISUS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENNSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENEIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENESI 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GENSIS 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GEN 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GE 1:1").osis()).toEqual("Gen.1.1") expect(p.parse("GN 1:1").osis()).toEqual("Gen.1.1") ` true describe "Localized book Exod (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Exod (en)", -> ` expect(p.parse("Exodis 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exodus 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exode 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exods 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exod 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exd 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Exo 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("Ex 1:1").osis()).toEqual("Exod.1.1") p.include_apocrypha(false) expect(p.parse("EXODIS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODUS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODE 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXODS 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXOD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXD 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EXO 1:1").osis()).toEqual("Exod.1.1") expect(p.parse("EX 1:1").osis()).toEqual("Exod.1.1") ` true describe "Localized book Bel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bel (en)", -> ` expect(p.parse("Bel and the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & the Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Serpent 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel and Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Dragon 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel & Snake 1:1").osis()).toEqual("Bel.1.1") expect(p.parse("Bel 1:1").osis()).toEqual("Bel.1.1") ` true describe "Localized book Lev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lev (en)", -> ` expect(p.parse("Levetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Leviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liveticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitecus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Liviticus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livetcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Livitcus 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Levi 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lev 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Le 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("Lv 1:1").osis()).toEqual("Lev.1.1") p.include_apocrypha(false) expect(p.parse("LEVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITECUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITICUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVETCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LIVITCUS 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEVI 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LEV 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LE 1:1").osis()).toEqual("Lev.1.1") expect(p.parse("LV 1:1").osis()).toEqual("Lev.1.1") ` true describe "Localized book Num (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Num (en)", -> ` expect(p.parse("Numbers 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Number 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Numb 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Num 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nm 1:1").osis()).toEqual("Num.1.1") expect(p.parse("Nu 1:1").osis()).toEqual("Num.1.1") p.include_apocrypha(false) expect(p.parse("NUMBERS 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMBER 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUMB 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NUM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NM 1:1").osis()).toEqual("Num.1.1") expect(p.parse("NU 1:1").osis()).toEqual("Num.1.1") ` true describe "Localized book Sir (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sir (en)", -> ` expect(p.parse("The Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("The Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus, Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus Son of Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Wisdom of Jesus ben Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclesiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclusiasticus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Ecclus 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sirach 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Eccs 1:1").osis()).toEqual("Sir.1.1") expect(p.parse("Sir 1:1").osis()).toEqual("Sir.1.1") ` true describe "Localized book Wis (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Wis (en)", -> ` expect(p.parse("The Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("The Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisom of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis of Solomon 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisdom 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wisd 1:1").osis()).toEqual("Wis.1.1") expect(p.parse("Wis 1:1").osis()).toEqual("Wis.1.1") ` true describe "Localized book Lam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Lam (en)", -> ` expect(p.parse("Lamentations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintations 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamentation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lamintation 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lam 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("La 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("Lm 1:1").osis()).toEqual("Lam.1.1") p.include_apocrypha(false) expect(p.parse("LAMENTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATIONS 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMENTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAMINTATION 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LAM 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LA 1:1").osis()).toEqual("Lam.1.1") expect(p.parse("LM 1:1").osis()).toEqual("Lam.1.1") ` true describe "Localized book EpJer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: EpJer (en)", -> ` expect(p.parse("The Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Letter of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("The Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Epistle of Jeremy 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep. of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Let of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep of Jeremiah 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("Ep Jer 1:1").osis()).toEqual("EpJer.1.1") expect(p.parse("EpJer 1:1").osis()).toEqual("EpJer.1.1") ` true describe "Localized book Rev (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rev (en)", -> ` expect(p.parse("Revalations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revalation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revelation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlations 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revolation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revlation 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Revel 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rev 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Re 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("Rv 1:1").osis()).toEqual("Rev.1.1") p.include_apocrypha(false) expect(p.parse("REVALATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVALATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVELATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATIONS 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVOLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVLATION 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REVEL 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("REV 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RE 1:1").osis()).toEqual("Rev.1.1") expect(p.parse("RV 1:1").osis()).toEqual("Rev.1.1") ` true describe "Localized book PrMan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrMan (en)", -> ` expect(p.parse("The Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayers Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Prayer Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("The Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr of Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Manasseh 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("Pr Man 1:1").osis()).toEqual("PrMan.1.1") expect(p.parse("PrMan 1:1").osis()).toEqual("PrMan.1.1") ` true describe "Localized book Deut (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Deut (en)", -> ` expect(p.parse("Deeteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deeteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dueteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duuteronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutoronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronomy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duetronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duutronmy 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deut 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Duet 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Deu 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("Dt 1:1").osis()).toEqual("Deut.1.1") p.include_apocrypha(false) expect(p.parse("DEETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTERONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTORONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONOMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUETRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUUTRONMY 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEUT 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DUET 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DEU 1:1").osis()).toEqual("Deut.1.1") expect(p.parse("DT 1:1").osis()).toEqual("Deut.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PIosh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("Joushua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Joshua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jousua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josua 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Josh 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jos 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("Jsh 1:1").osis()).toEqual("Josh.1.1") p.include_apocrypha(false) expect(p.parse("JOUSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSHUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOUSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSUA 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOSH 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JOS 1:1").osis()).toEqual("Josh.1.1") expect(p.parse("JSH 1:1").osis()).toEqual("Josh.1.1") ` true describe "Localized book Judg (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Judg (en)", -> ` expect(p.parse("Judges 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Judg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jdg 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jgs 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("Jg 1:1").osis()).toEqual("Judg.1.1") p.include_apocrypha(false) expect(p.parse("JUDGES 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JUDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JDG 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JGS 1:1").osis()).toEqual("Judg.1.1") expect(p.parse("JG 1:1").osis()).toEqual("Judg.1.1") ` true describe "Localized book Ruth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ruth (en)", -> ` expect(p.parse("Ruth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rth 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rut 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Rt 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("Ru 1:1").osis()).toEqual("Ruth.1.1") p.include_apocrypha(false) expect(p.parse("RUTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RTH 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RUT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RT 1:1").osis()).toEqual("Ruth.1.1") expect(p.parse("RU 1:1").osis()).toEqual("Ruth.1.1") ` true describe "Localized book 1Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Esd (en)", -> ` expect(p.parse("First Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("First Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdras 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1st Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esdr 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I. Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1 Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("I Esd 1:1").osis()).toEqual("1Esd.1.1") expect(p.parse("1Esd 1:1").osis()).toEqual("1Esd.1.1") ` true describe "Localized book 2Esd (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Esd (en)", -> ` expect(p.parse("Second Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("Second Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdras 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2nd Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esdr 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2. Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("II Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2 Esd 1:1").osis()).toEqual("2Esd.1.1") expect(p.parse("2Esd 1:1").osis()).toEqual("2Esd.1.1") ` true describe "Localized book Isa (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Isa (en)", -> ` expect(p.parse("Isaaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaisha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaish 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isaih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiha 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isiih 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Issah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isah 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isai 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Isa 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Ia 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("Is 1:1").osis()).toEqual("Isa.1.1") p.include_apocrypha(false) expect(p.parse("ISAAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAISH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIHA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISIIH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISSAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAH 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISAI 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("ISA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IA 1:1").osis()).toEqual("Isa.1.1") expect(p.parse("IS 1:1").osis()).toEqual("Isa.1.1") ` true describe "Localized book 2Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Sam (en)", -> ` expect(p.parse("Second Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. SamPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Kingdoms 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuall 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuals 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuell 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuels 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SamPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("Second Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samual 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Samuel 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2nd Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sma 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sa 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 Sm 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2Sam 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") p.include_apocrypha(false) expect(p.parse("SECOND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 KINGDOMS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUALS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUELS 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("SECOND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUAL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAMUEL 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2ND SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SMA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2. SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("II SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SA 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 SM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2SAM 1:1").osis()).toEqual("2Sam.1.1") expect(p.parse("2 S 1:1").osis()).toEqual("2Sam.1.1") ` true describe "Localized book 1Sam (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Sam (en)", -> ` expect(p.parse("First Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Samuel 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SamPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Kingdoms 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuals 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuell 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuall 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I PI:NAME:<NAME>END_PIuePI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samuels 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("IPI:NAME:<NAME>END_PI. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("IPI:NAME:<NAME>END_PI. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. PI:NAME:<NAME>END_PIma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("First Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Samual 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SamPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1st Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sma 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1Sam 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sa 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I Sm 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") p.include_apocrypha(false) expect(p.parse("FIRST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I KINGDOMS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("FIRST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUALS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUELS 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1ST SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUAL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("SAMUEL 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SMA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I. SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1SAM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SA 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("I SM 1:1").osis()).toEqual("1Sam.1.1") expect(p.parse("1 S 1:1").osis()).toEqual("1Sam.1.1") ` true describe "Localized book 2Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Kgs (en)", -> ` expect(p.parse("Fourth Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4th Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 Kingdoms 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("Second K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kings 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kigs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 King 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kins 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kngs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kig 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kin 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kis 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kng 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kns 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2nd K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kg 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ki 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Kn 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 Ks 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2Kgs 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") p.include_apocrypha(false) expect(p.parse("FOURTH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4TH KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4. KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("IV KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("4 KINGDOMS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("SECOND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KING 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KINS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KIS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KNS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2ND K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KG 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KI 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KN 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 KS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2. K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2KGS 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("II K 1:1").osis()).toEqual("2Kgs.1.1") expect(p.parse("2 K 1:1").osis()).toEqual("2Kgs.1.1") ` true describe "Localized book 1Kgs (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Kgs (en)", -> ` expect(p.parse("Third Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3rd Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 Kingdoms 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("First K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kigs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I King 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kins 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1st K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kig 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kin 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kng 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kns 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kings 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kg 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ki 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Kn 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I Ks 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kngs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kgs 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("Kin 1:1").osis()).toEqual("1Kgs.1.1") p.include_apocrypha(false) expect(p.parse("THIRD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3RD KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("III KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3. KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("3 KINGDOMS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("FIRST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KING 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KINS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1ST K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KIN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KNS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KINGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KG 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KI 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KN 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I KS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I. K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KNGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("1 K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("I K 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KGS 1:1").osis()).toEqual("1Kgs.1.1") expect(p.parse("KIN 1:1").osis()).toEqual("1Kgs.1.1") ` true describe "Localized book 2Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Chr (en)", -> ` expect(p.parse("Second Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Paralipomenon 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Choronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicals 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Coronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocles 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronicle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cronocle 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("Second Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2nd Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chrn 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chro 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Cron 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Chr 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 Ch 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2Chr 1:1").osis()).toEqual("2Chr.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 PARALIPOMENON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICALS 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CORONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLES 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONICLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRONOCLE 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("SECOND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2ND CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRN 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHRO 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CRON 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2. CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("II CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CHR 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2 CH 1:1").osis()).toEqual("2Chr.1.1") expect(p.parse("2CHR 1:1").osis()).toEqual("2Chr.1.1") ` true describe "Localized book 1Chr (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Chr (en)", -> ` expect(p.parse("First Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Paralipomenon 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Choronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicals 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Chronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Coronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocles 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("First Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronicle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("Cronocle 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1st Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chrn 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chro 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Cron 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I Chr 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 Ch 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1Chr 1:1").osis()).toEqual("1Chr.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("PARALIPOMENON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICALS 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CHRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CORONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLES 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("FIRST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONICLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("CRONOCLE 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1ST CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRN 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHRO 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CRON 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I. CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("I CHR 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1 CH 1:1").osis()).toEqual("1Chr.1.1") expect(p.parse("1CHR 1:1").osis()).toEqual("1Chr.1.1") ` true describe "Localized book Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezra (en)", -> ` expect(p.parse("Esra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezra 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("Ezr 1:1").osis()).toEqual("Ezra.1.1") p.include_apocrypha(false) expect(p.parse("ESRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZRA 1:1").osis()).toEqual("Ezra.1.1") expect(p.parse("EZR 1:1").osis()).toEqual("Ezra.1.1") ` true describe "Localized book Neh (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Neh (en)", -> ` expect(p.parse("Nehemaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimaih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimiih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehamia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehemih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimah 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimia 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Nehimih 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Neh 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("Ne 1:1").osis()).toEqual("Neh.1.1") p.include_apocrypha(false) expect(p.parse("NEHEMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHAMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHEMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMAH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIA 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEHIMIH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NEH 1:1").osis()).toEqual("Neh.1.1") expect(p.parse("NE 1:1").osis()).toEqual("Neh.1.1") ` true describe "Localized book GkEsth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: GkEsth (en)", -> ` expect(p.parse("Esther (Greek) 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esther 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Greek Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Esth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gk Est 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("GkEsth 1:1").osis()).toEqual("GkEsth.1.1") expect(p.parse("Gr Est 1:1").osis()).toEqual("GkEsth.1.1") ` true describe "Localized book Esth (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Esth (en)", -> ` expect(p.parse("Esther 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Ester 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esthr 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Esth 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Est 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("Es 1:1").osis()).toEqual("Esth.1.1") p.include_apocrypha(false) expect(p.parse("ESTHER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTER 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTHR 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ESTH 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("EST 1:1").osis()).toEqual("Esth.1.1") expect(p.parse("ES 1:1").osis()).toEqual("Esth.1.1") ` true describe "Localized book Job (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Job (en)", -> ` expect(p.parse("Job 1:1").osis()).toEqual("Job.1.1") expect(p.parse("Jb 1:1").osis()).toEqual("Job.1.1") p.include_apocrypha(false) expect(p.parse("JOB 1:1").osis()).toEqual("Job.1.1") expect(p.parse("JB 1:1").osis()).toEqual("Job.1.1") ` true describe "Localized book Ps (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ps (en)", -> ` expect(p.parse("Plasmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plssss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psallm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamlm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Palsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pamss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Paslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pasms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Passs 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plasm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plass 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psala 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psalm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psals 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psaml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psamm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psams 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmls 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plaa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plas 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plms 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plsm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Plss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psal 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psam 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psla 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pslm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psma 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psml 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psmm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pssm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Salm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psa 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Psm 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Pss 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("Ps 1:1").osis()).toEqual("Ps.1.1") p.include_apocrypha(false) expect(p.parse("PLASMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PALSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PAMSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PASSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLASS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSALS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMLS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLAS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLMS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PLSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAL 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSAM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSLM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSML 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSMM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("SALM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSA 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSM 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PSS 1:1").osis()).toEqual("Ps.1.1") expect(p.parse("PS 1:1").osis()).toEqual("Ps.1.1") ` true describe "Localized book PrAzar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PrAzar (en)", -> ` expect(p.parse("The Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayers of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Prayer of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("The Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr of Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azariah 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Pr Azar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("Azaria 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzar 1:1").osis()).toEqual("PrAzar.1.1") expect(p.parse("PrAzr 1:1").osis()).toEqual("PrAzar.1.1") ` true describe "Localized book Prov (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Prov (en)", -> ` expect(p.parse("Probverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Oroverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Porverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proberbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Poverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Preverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Provebs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Proverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prverb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvbs 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prov 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prvb 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pro 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Prv 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pr 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("Pv 1:1").osis()).toEqual("Prov.1.1") p.include_apocrypha(false) expect(p.parse("PROBVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("OROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PORVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROBERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("POVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PREVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVEBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVERB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVBS 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PROV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRVB 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRO 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PRV 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PR 1:1").osis()).toEqual("Prov.1.1") expect(p.parse("PV 1:1").osis()).toEqual("Prov.1.1") ` true describe "Localized book Eccl (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eccl (en)", -> ` expect(p.parse("Ecclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiasties 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesaites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiastes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclessiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiast 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesiate 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecclesites 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiaste 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesiates 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eclesistes 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoheleth 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccles 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Eccl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecc 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ecl 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qoh 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Ec 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("Qo 1:1").osis()).toEqual("Eccl.1.1") p.include_apocrypha(false) expect(p.parse("ECCLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTIES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIAIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESAITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESSIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIAST 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESIATE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLESITES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIASTE 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESIATES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECLESISTES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOHELETH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCLES 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECCL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("ECL 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QOH 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("EC 1:1").osis()).toEqual("Eccl.1.1") expect(p.parse("QO 1:1").osis()).toEqual("Eccl.1.1") ` true describe "Localized book SgThree (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: SgThree (en)", -> ` expect(p.parse("The Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Holy Children 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Young Men 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of Three Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of the 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("The Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Youths 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song of 3 Jews 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Song Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Three Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sng Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S of 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Three 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("SgThree 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Ch 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3. Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S Th Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S. 3 Y 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("Sg Thr 1:1").osis()).toEqual("SgThree.1.1") expect(p.parse("S 3 Y 1:1").osis()).toEqual("SgThree.1.1") ` true describe "Localized book Song (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Song (en)", -> ` expect(p.parse("The Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomans 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomons 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("The Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Saloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Salomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Soloman 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Solomon 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song of Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S of S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Songs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sngs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Song 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sgs 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sng 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SoS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sol 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Son 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("Sg 1:1").osis()).toEqual("Song.1.1") expect(p.parse("So 1:1").osis()).toEqual("Song.1.1") p.include_apocrypha(false) expect(p.parse("THE SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMANS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMONS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("THE SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SALOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMAN 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SOLOMON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG OF SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("S OF S 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SONG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SGS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SNG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SOL 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SON 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SS 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SG 1:1").osis()).toEqual("Song.1.1") expect(p.parse("SO 1:1").osis()).toEqual("Song.1.1") ` true describe "Localized book Jer (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jer (en)", -> ` expect(p.parse("Jeremaiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremaih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiha 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimiih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeraiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeramih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremia 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JPI:NAME:<NAME>END_PIemie 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jerimih 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermiah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jermmah 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jeremi 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jere 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jer 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Je 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("Jr 1:1").osis()).toEqual("Jer.1.1") p.include_apocrypha(false) expect(p.parse("JEREMAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIHA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERAMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIA 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERIMIH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMIAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERMMAH 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JEREMI 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JERE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JER 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JE 1:1").osis()).toEqual("Jer.1.1") expect(p.parse("JR 1:1").osis()).toEqual("Jer.1.1") ` true describe "Localized book Ezek (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek (en)", -> ` expect(p.parse("Exeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exiikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezeikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekial 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eziikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikiel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Exikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezekel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezikel 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezek 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Eze 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("Ezk 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EXEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIAL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKIEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EXIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZIKEL 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZEK 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZE 1:1").osis()).toEqual("Ezek.1.1") expect(p.parse("EZK 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Dan (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("Danial 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DanPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dan 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Da 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dl 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("Dn 1:1").osis()).toEqual("Dan.1.1") p.include_apocrypha(false) expect(p.parse("DANIAL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DANIEL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DAN 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DA 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DL 1:1").osis()).toEqual("Dan.1.1") expect(p.parse("DN 1:1").osis()).toEqual("Dan.1.1") ` true describe "Localized book Hos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hos (en)", -> ` expect(p.parse("Hosea 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hos 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Ho 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("Hs 1:1").osis()).toEqual("Hos.1.1") p.include_apocrypha(false) expect(p.parse("HOSEA 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HOS 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HO 1:1").osis()).toEqual("Hos.1.1") expect(p.parse("HS 1:1").osis()).toEqual("Hos.1.1") ` true describe "Localized book Joel (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Joel (en)", -> ` expect(p.parse("Joel 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Joe 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("Jl 1:1").osis()).toEqual("Joel.1.1") p.include_apocrypha(false) expect(p.parse("JOEL 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JOE 1:1").osis()).toEqual("Joel.1.1") expect(p.parse("JL 1:1").osis()).toEqual("Joel.1.1") ` true describe "Localized book Amos (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Amos (en)", -> ` expect(p.parse("Amos 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Amo 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Ams 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("Am 1:1").osis()).toEqual("Amos.1.1") p.include_apocrypha(false) expect(p.parse("AMOS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMO 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AMS 1:1").osis()).toEqual("Amos.1.1") expect(p.parse("AM 1:1").osis()).toEqual("Amos.1.1") ` true describe "Localized book Obad (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Obad (en)", -> ` expect(p.parse("Obadiah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obadia 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obidah 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obad 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Oba 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Obd 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("Ob 1:1").osis()).toEqual("Obad.1.1") p.include_apocrypha(false) expect(p.parse("OBADIAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBADIA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBIDAH 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBAD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBA 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OBD 1:1").osis()).toEqual("Obad.1.1") expect(p.parse("OB 1:1").osis()).toEqual("Obad.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("JonPI:NAME:<NAME>END_PI.1.1") expect(p.parse("Jnh 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("Jon 1:1").osis()).toEqual("Jonah.1.1") p.include_apocrypha(false) expect(p.parse("JONAH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JNH 1:1").osis()).toEqual("Jonah.1.1") expect(p.parse("JON 1:1").osis()).toEqual("Jonah.1.1") ` true describe "Localized book Mic (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mic (en)", -> ` expect(p.parse("Michah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micah 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Micha 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mica 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mic 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("Mi 1:1").osis()).toEqual("Mic.1.1") p.include_apocrypha(false) expect(p.parse("MICHAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICAH 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICHA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MICA 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MIC 1:1").osis()).toEqual("Mic.1.1") expect(p.parse("MI 1:1").osis()).toEqual("Mic.1.1") ` true describe "Localized book Nah (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Nah (en)", -> ` expect(p.parse("Nahum 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nahu 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Nah 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("Na 1:1").osis()).toEqual("Nah.1.1") p.include_apocrypha(false) expect(p.parse("NAHUM 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAHU 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NAH 1:1").osis()).toEqual("Nah.1.1") expect(p.parse("NA 1:1").osis()).toEqual("Nah.1.1") ` true describe "Localized book Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab (en)", -> ` expect(p.parse("Habbakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakakk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakkuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakukk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habbakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakak 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habakuk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Habk 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("Hab 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HABBAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUKK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABBAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKAK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABAKUK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HABK 1:1").osis()).toEqual("Hab.1.1") expect(p.parse("HAB 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Zeph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph (en)", -> ` expect(p.parse("Zephanaiah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephanaia 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zaphania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefaniah 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zephania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zafania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zefania 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zeph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zep 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zph 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("Zp 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZEPHANAIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANAIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIAH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPHANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZAFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEFANIA 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZEP 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZPH 1:1").osis()).toEqual("Zeph.1.1") expect(p.parse("ZP 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Localized book Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hag (en)", -> ` expect(p.parse("Haggiah 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggiai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Haggai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagai 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hagg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hag 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hgg 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("Hg 1:1").osis()).toEqual("Hag.1.1") p.include_apocrypha(false) expect(p.parse("HAGGIAH 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGIAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGAI 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HAG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HGG 1:1").osis()).toEqual("Hag.1.1") expect(p.parse("HG 1:1").osis()).toEqual("Hag.1.1") ` true describe "Localized book Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zech (en)", -> ` expect(p.parse("Zacharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zachariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharaih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zechariih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheraih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheriih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zacherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zakariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharia 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecharih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecheria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zecherih 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekariah 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zekaria 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zach 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zech 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zac 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zch 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zec 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("Zc 1:1").osis()).toEqual("Zech.1.1") p.include_apocrypha(false) expect(p.parse("ZACHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHARIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECHERIH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIAH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEKARIA 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZACH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZECH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZAC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZCH 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZEC 1:1").osis()).toEqual("Zech.1.1") expect(p.parse("ZC 1:1").osis()).toEqual("Zech.1.1") ` true describe "Localized book Mal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mal (en)", -> ` expect(p.parse("Malachi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malichi 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malach 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Malaci 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("Mal 1:1").osis()).toEqual("Mal.1.1") p.include_apocrypha(false) expect(p.parse("MALACHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALICHI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACH 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MALACI 1:1").osis()).toEqual("Mal.1.1") expect(p.parse("MAL 1:1").osis()).toEqual("Mal.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("The Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to MPI:NAME:<NAME>END_PIthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. MatPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to StPI:NAME:<NAME>END_PI. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to PI:NAME:<NAME>END_PIaint MPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St MathPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint PI:NAME:<NAME>END_PIattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel according to Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("The Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Gospel of Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. MPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St MPI:NAME:<NAME>END_PIthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mathtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matthwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint MPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St MatPI:NAME:<NAME>END_PIew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St MPI:NAME:<NAME>END_PIiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St MatPI:NAME:<NAME>END_PIew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. MPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mathew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mattwe 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Maththew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathtiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathttew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matthtew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattthew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matttiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Saint Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathhew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mathiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MathtPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattiew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MatttPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mattew 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St. Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("St Mt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Matt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mat 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mtt 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("Mt 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL ACCORDING TO MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("THE GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("GOSPEL OF MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("SAINT MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTHWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTIEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATHEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTEW 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATTWE 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST. MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("ST MT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MATT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MAT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MTT 1:1").osis()).toEqual("Matt.1.1") expect(p.parse("MT 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Mark (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Mark (en)", -> ` expect(p.parse("The Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel according to Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("The Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Gospel of Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Saint Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St. Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("St Mr 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mark 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mar 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mrk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mk 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("Mr 1:1").osis()).toEqual("Mark.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL ACCORDING TO MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("THE GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("GOSPEL OF MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("SAINT MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST. MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("ST MR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MARK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MAR 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MRK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MK 1:1").osis()).toEqual("Mark.1.1") expect(p.parse("MR 1:1").osis()).toEqual("Mark.1.1") ` true describe "Localized book Luke (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Luke (en)", -> ` expect(p.parse("The Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel according to Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("The Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Gospel of Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Saint Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St. Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("St Lu 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luke 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Luk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lk 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("Lu 1:1").osis()).toEqual("Luke.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL ACCORDING TO LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("THE GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("GOSPEL OF LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("SAINT LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST. LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("ST LU 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUKE 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LUK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LK 1:1").osis()).toEqual("Luke.1.1") expect(p.parse("LU 1:1").osis()).toEqual("Luke.1.1") ` true describe "Localized book 1John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1John (en)", -> ` expect(p.parse("First Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("First Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JonPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jophn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1st Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Johm 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jonh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joon 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jphn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1John 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jhn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Joh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 Jo 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jh 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jn 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I Jo 1:1").osis()).toEqual("1John.1.1") p.include_apocrypha(false) expect(p.parse("FIRST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("FIRST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1ST JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHM 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JONH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOON 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JPHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1JOHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JHN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JOH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I. JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("1 JO 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JH 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JN 1:1").osis()).toEqual("1John.1.1") expect(p.parse("I JO 1:1").osis()).toEqual("1John.1.1") ` true describe "Localized book 2John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2John (en)", -> ` expect(p.parse("Second Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("Second Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jophn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JonPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Johm 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jonh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joon 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jphn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2nd Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jhn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Joh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2John 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II Jo 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jh 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jn 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 Jo 1:1").osis()).toEqual("2John.1.1") p.include_apocrypha(false) expect(p.parse("SECOND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("SECOND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHM 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JONH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOON 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JPHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2ND JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JOH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2. JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2JOHN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("II JO 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JH 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JN 1:1").osis()).toEqual("2John.1.1") expect(p.parse("2 JO 1:1").osis()).toEqual("2John.1.1") ` true describe "Localized book 3John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3John (en)", -> ` expect(p.parse("Third Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("Third Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jophn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Johm 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jonh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joon 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jphn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3rd Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jhn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Joh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. Jo 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3John 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jh 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jn 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 Jo 1:1").osis()).toEqual("3John.1.1") p.include_apocrypha(false) expect(p.parse("THIRD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("THIRD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHM 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JONH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOON 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JPHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3RD JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("III JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JOH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3. JO 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3JOHN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JH 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JN 1:1").osis()).toEqual("3John.1.1") expect(p.parse("3 JO 1:1").osis()).toEqual("3John.1.1") ` true describe "Localized book John (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("The Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel according to Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("The Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Gospel of Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Saint Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("St John 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St. Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jophn 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("St Jn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Johm 1:1").osis()).toEqual("John.1.1") expect(p.parse("John 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jonh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joon 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jphn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jhn 1:1").osis()).toEqual("John.1.1") expect(p.parse("Joh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jh 1:1").osis()).toEqual("John.1.1") expect(p.parse("Jn 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL ACCORDING TO JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("THE GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("GOSPEL OF JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("SAINT JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST. JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("ST JN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHM 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JONH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOON 1:1").osis()).toEqual("John.1.1") expect(p.parse("JPHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JHN 1:1").osis()).toEqual("John.1.1") expect(p.parse("JOH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JH 1:1").osis()).toEqual("John.1.1") expect(p.parse("JN 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book Acts (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Acts (en)", -> ` expect(p.parse("The Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts of the Apostles 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actsss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Actss 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Acts 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Act 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("Ac 1:1").osis()).toEqual("Acts.1.1") p.include_apocrypha(false) expect(p.parse("THE ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS OF THE APOSTLES 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTSS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACTS 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("ACT 1:1").osis()).toEqual("Acts.1.1") expect(p.parse("AC 1:1").osis()).toEqual("Acts.1.1") ` true describe "Localized book Rom (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Rom (en)", -> ` expect(p.parse("Romands 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roamns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Romasn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rpmans 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roman 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmns 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Roms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rmn 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rms 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rom 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ros 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Rm 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("Ro 1:1").osis()).toEqual("Rom.1.1") p.include_apocrypha(false) expect(p.parse("ROMANDS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROAMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMASN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RPMANS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMAN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMNS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMN 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RMS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("ROS 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RM 1:1").osis()).toEqual("Rom.1.1") expect(p.parse("RO 1:1").osis()).toEqual("Rom.1.1") ` true describe "Localized book 2Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Cor (en)", -> ` expect(p.parse("Second Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Choranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coriinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinathians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinnthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiaans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthianos 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithaians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chorithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Chornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Coranthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthinas 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corninthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthiians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corrithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corintions 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithoans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthains 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithans 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corithins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cornthins 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthians 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corthian 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corinth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("Second Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corint 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corin 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Corth 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2nd Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Cor 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 Co 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2Cor 1:1").osis()).toEqual("2Cor.1.1") p.include_apocrypha(false) expect(p.parse("SECOND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINATHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANOS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CHORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORANTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINAS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORRITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTIONS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHOANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHAINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORITHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORNTHINS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIANS 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTHIAN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("SECOND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORINT 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORIN 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CORTH 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2ND CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 COR 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2. CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("II CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2 CO 1:1").osis()).toEqual("2Cor.1.1") expect(p.parse("2COR 1:1").osis()).toEqual("2Cor.1.1") ` true describe "Localized book 1Cor (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Cor (en)", -> ` expect(p.parse("First Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Coranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Choranthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Coriinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinathians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinnthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiaans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthianos 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithaians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chorithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Chornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthinas 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corninthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthiians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corrithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corinthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corintions 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithoans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthains 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthians 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corthian 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithans 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Corithins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("Cornthins 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corinth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("First Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corint 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corin 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Corth 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1st Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 Co 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1Cor 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I Co 1:1").osis()).toEqual("1Cor.1.1") p.include_apocrypha(false) expect(p.parse("FIRST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORANTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORIINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINATHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANOS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CHORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINAS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORRITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORINTIONS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHOANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHAINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHIANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTHIAN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHANS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORITHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("CORNTHINS 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("FIRST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORINT 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORIN 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CORTH 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1ST CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I. CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1 CO 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("1COR 1:1").osis()).toEqual("1Cor.1.1") expect(p.parse("I CO 1:1").osis()).toEqual("1Cor.1.1") ` true describe "Localized book Gal (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Gal (en)", -> ` expect(p.parse("Galataians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiaans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatianis 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiions 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatioans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galationns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatains 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galataons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatians 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatiins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatinas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galations 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatoans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gallatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatans 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatian 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatias 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatins 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatios 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatons 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatas 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galatns 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Galat 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gala 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gal 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Ga 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("Gl 1:1").osis()).toEqual("Gal.1.1") p.include_apocrypha(false) expect(p.parse("GALATAIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANIS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATOANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALLATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATANS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAN 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATINS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATIOS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATONS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATAS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALATNS 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALAT 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GALA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GAL 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GA 1:1").osis()).toEqual("Gal.1.1") expect(p.parse("GL 1:1").osis()).toEqual("Gal.1.1") ` true describe "Localized book Eph (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Eph (en)", -> ` expect(p.parse("Epehesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Esphesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehpisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesains 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesiand 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesions 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Epesians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesain 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephesian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephisian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsians 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephsian 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephes 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephe 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ephs 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ehp 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Eph 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("Ep 1:1").osis()).toEqual("Eph.1.1") p.include_apocrypha(false) expect(p.parse("EPEHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("ESPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHPISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAINS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAND 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIONS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPESIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESAIN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHESIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHISIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIANS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHSIAN 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHES 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHE 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPHS 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EHP 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EPH 1:1").osis()).toEqual("Eph.1.1") expect(p.parse("EP 1:1").osis()).toEqual("Eph.1.1") ` true describe "Localized book Phil (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phil (en)", -> ` expect(p.parse("Phillippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiaans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipieans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipaians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philllpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppiians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipean 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpiens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlippians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipain 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipens 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philippin 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpains 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpeans 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philppian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipians 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpian 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpins 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phillip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpan 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philli 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlipp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phili 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Philp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlip 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlpp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phil 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phlp 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Phi 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("Php 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PHILLIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPEAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPENS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPPIN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPEANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPIANS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPIAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPINS 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPAN 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILLI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHILP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLIP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLPP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHIL 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHLP 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHI 1:1").osis()).toEqual("Phil.1.1") expect(p.parse("PHP 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book Col (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Col (en)", -> ` expect(p.parse("Callossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Callosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colassions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Collosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Calosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colasions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosians 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colosions 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossans 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Colossian 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Coloss 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Col 1:1").osis()).toEqual("Col.1.1") expect(p.parse("Co 1:1").osis()).toEqual("Col.1.1") p.include_apocrypha(false) expect(p.parse("CALLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CALOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLASIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSIONS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSANS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSSIAN 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COLOSS 1:1").osis()).toEqual("Col.1.1") expect(p.parse("COL 1:1").osis()).toEqual("Col.1.1") expect(p.parse("CO 1:1").osis()).toEqual("Col.1.1") ` true describe "Localized book 2Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Thess (en)", -> ` expect(p.parse("Second Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonaians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonciens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniaans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonioans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesallonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonicans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesaloniians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloneans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessaloniens 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonoans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonions 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonains 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonians 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonain 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonans 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessalonion 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thessolonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesalonins 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Theselonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesolonian 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("Second Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thesss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thsss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thes 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Thss 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2Thess 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2nd Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Ths 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II Th 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 Th 1:1").osis()).toEqual("2Thess.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONCIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONICANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONEANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIENS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONOANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIONS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONAINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONAIN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONANS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSALONION 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSOLONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESALONINS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESELONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESOLONIAN 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("SECOND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THES 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THSS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2THESS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2ND TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 THS 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2. TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("II TH 1:1").osis()).toEqual("2Thess.1.1") expect(p.parse("2 TH 1:1").osis()).toEqual("2Thess.1.1") ` true describe "Localized book 1Thess (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Thess (en)", -> ` expect(p.parse("First Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessaloniens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonaians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonciens 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniaans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloniions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonioans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesallonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonicans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesaloniians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessaloneans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonoans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonions 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonains 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonians 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonain 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonans 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessalonion 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thessolonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesalonins 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Theselonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("Thesolonian 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("First Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thesss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thsss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1Thess 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1st Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thes 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Thss 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Ths 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 Th 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I Th 1:1").osis()).toEqual("1Thess.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONCIENS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONICANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONEANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONOANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIONS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONAINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONAIN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONANS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSALONION 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESSOLONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESALONINS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESELONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("THESOLONIAN 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("FIRST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1THESS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1ST TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THES 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THSS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I THS 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I. TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("1 TH 1:1").osis()).toEqual("1Thess.1.1") expect(p.parse("I TH 1:1").osis()).toEqual("1Thess.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PITim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PITim (en)", -> ` expect(p.parse("Second Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Thimoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tomothy 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("Second Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoth 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Timoty 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2nd Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tim 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Ti 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 Tm 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2Tim 1:1").osis()).toEqual("2Tim.1.1") p.include_apocrypha(false) expect(p.parse("SECOND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 THIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TOMOTHY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("SECOND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTH 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIMOTY 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2ND TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TIM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2. TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("II TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TI 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2 TM 1:1").osis()).toEqual("2Tim.1.1") expect(p.parse("2TIM 1:1").osis()).toEqual("2Tim.1.1") ` true describe "Localized book 1Tim (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Tim (en)", -> ` expect(p.parse("First Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. ThimotPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TimPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TomPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TimotPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Thimoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tomothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TimPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("First Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Timoty 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timothy 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1st Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("Timoth 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 Tm 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1Tim 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Ti 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I Tm 1:1").osis()).toEqual("1Tim.1.1") p.include_apocrypha(false) expect(p.parse("FIRST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I THIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TOMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("FIRST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIMOTY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTHY 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1ST TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("TIMOTH 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I. TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1 TM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("1TIM 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TI 1:1").osis()).toEqual("1Tim.1.1") expect(p.parse("I TM 1:1").osis()).toEqual("1Tim.1.1") ` true describe "Localized book Titus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Titus (en)", -> ` expect(p.parse("Titus 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Tit 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("Ti 1:1").osis()).toEqual("Titus.1.1") p.include_apocrypha(false) expect(p.parse("TITUS 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TIT 1:1").osis()).toEqual("Titus.1.1") expect(p.parse("TI 1:1").osis()).toEqual("Titus.1.1") ` true describe "Localized book Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Phlm (en)", -> ` expect(p.parse("Philemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlemon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlimon 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Philem 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phile 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phlm 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phmn 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("Phm 1:1").osis()).toEqual("Phlm.1.1") p.include_apocrypha(false) expect(p.parse("PHILEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLEMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLIMON 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILEM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHILE 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHLM 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHMN 1:1").osis()).toEqual("Phlm.1.1") expect(p.parse("PHM 1:1").osis()).toEqual("Phlm.1.1") ` true describe "Localized book Heb (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb (en)", -> ` expect(p.parse("Heebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hewbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heberws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebewws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrwes 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwers 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebwres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hwbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hbrews 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebres 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrew 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrws 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Hebrs 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("Heb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HEEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBERWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBEWWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWERS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBWRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HWBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HBREWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRES 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBREW 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRWS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEBRS 1:1").osis()).toEqual("Heb.1.1") expect(p.parse("HEB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book Jas (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jas (en)", -> ` expect(p.parse("James 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jame 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jam 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jas 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jms 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Ja 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("Jm 1:1").osis()).toEqual("Jas.1.1") p.include_apocrypha(false) expect(p.parse("JAMES 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAME 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAM 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JAS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JMS 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JA 1:1").osis()).toEqual("Jas.1.1") expect(p.parse("JM 1:1").osis()).toEqual("Jas.1.1") ` true describe "Localized book 2Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Pet (en)", -> ` expect(p.parse("Second Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("Second P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Peter 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pete 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Petr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Per 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Ptr 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2nd P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pe 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 Pt 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2Pet 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") p.include_apocrypha(false) expect(p.parse("SECOND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("SECOND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PETR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PER 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PTR 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2ND P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PE 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 PT 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2. P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2PET 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("II P 1:1").osis()).toEqual("2Pet.1.1") expect(p.parse("2 P 1:1").osis()).toEqual("2Pet.1.1") ` true describe "Localized book 1Pet (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Pet (en)", -> ` expect(p.parse("First Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("First P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pete 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Petr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1st P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Per 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Ptr 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("Peter 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1Pet 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pe 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I Pt 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") p.include_apocrypha(false) expect(p.parse("FIRST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("FIRST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PETR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1ST P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PTR 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("PETER 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1PET 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PE 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I PT 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I. P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("1 P 1:1").osis()).toEqual("1Pet.1.1") expect(p.parse("I P 1:1").osis()).toEqual("1Pet.1.1") ` true describe "Localized book Jude (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jude (en)", -> ` expect(p.parse("Jude 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jde 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUDE 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JDE 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book Tob (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Tob (en)", -> ` expect(p.parse("Tobias 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobit 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobi 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tobt 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tob 1:1").osis()).toEqual("Tob.1.1") expect(p.parse("Tb 1:1").osis()).toEqual("Tob.1.1") ` true describe "Localized book Jdt (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Jdt (en)", -> ` expect(p.parse("Judith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdith 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdit 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdth 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Judt 1:1").osis()).toEqual("Jdt.1.1") expect(p.parse("Jdt 1:1").osis()).toEqual("Jdt.1.1") ` true describe "Localized book Bar (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Bar (en)", -> ` expect(p.parse("Baruch 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Bar 1:1").osis()).toEqual("Bar.1.1") expect(p.parse("Br 1:1").osis()).toEqual("Bar.1.1") ` true describe "Localized book Sus (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Sus (en)", -> ` expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("PI:NAME:<NAME>END_PI 1:1").osis()).toEqual("Sus.1.1") expect(p.parse("Sus 1:1").osis()).toEqual("Sus.1.1") ` true describe "Localized book 2Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 2Macc (en)", -> ` expect(p.parse("Second Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabeee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabees 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("Second Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabbe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabee 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabes 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macabe 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Maccc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2nd Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2. Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("II Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mac 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2Macc 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Ma 1:1").osis()).toEqual("2Macc.1.1") expect(p.parse("2 Mc 1:1").osis()).toEqual("2Macc.1.1") ` true describe "Localized book 3Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 3Macc (en)", -> ` expect(p.parse("Third Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabeee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabees 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabbe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabee 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabes 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("Third Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macabe 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Maccc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3rd Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("III Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3. Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mac 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3Macc 1:1").osis()).toEqual("3Macc.1.1") expect(p.parse("3 Mc 1:1").osis()).toEqual("3Macc.1.1") ` true describe "Localized book 4Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 4Macc (en)", -> ` expect(p.parse("Fourth Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabeee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabees 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("Fourth Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabbe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabee 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabes 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macabe 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Maccc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4th Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4. Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("IV Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mac 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4Macc 1:1").osis()).toEqual("4Macc.1.1") expect(p.parse("4 Mc 1:1").osis()).toEqual("4Macc.1.1") ` true describe "Localized book 1Macc (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: 1Macc (en)", -> ` expect(p.parse("First Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. MacPI:NAME:<NAME>END_PI 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabeee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("First Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabbe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabee 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabes 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("Maccabees 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macabe 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1st Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Maccc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I. Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1Macc 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("I Mac 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Ma 1:1").osis()).toEqual("1Macc.1.1") expect(p.parse("1 Mc 1:1").osis()).toEqual("1Macc.1.1") ` true describe "Localized book Ezek,Ezra (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Ezek,Ezra (en)", -> ` expect(p.parse("Ez 1:1").osis()).toEqual("Ezek.1.1") p.include_apocrypha(false) expect(p.parse("EZ 1:1").osis()).toEqual("Ezek.1.1") ` true describe "Localized book Hab,Hag (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Hab,Hag (en)", -> ` expect(p.parse("Ha 1:1").osis()).toEqual("Hab.1.1") p.include_apocrypha(false) expect(p.parse("HA 1:1").osis()).toEqual("Hab.1.1") ` true describe "Localized book Heb,Hab (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Heb,Hab (en)", -> ` expect(p.parse("Hb 1:1").osis()).toEqual("Heb.1.1") p.include_apocrypha(false) expect(p.parse("HB 1:1").osis()).toEqual("Heb.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,JoPI:NAME:<NAME>END_PI (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("Jo 1:1").osis()).toEqual("John.1.1") p.include_apocrypha(false) expect(p.parse("JO 1:1").osis()).toEqual("John.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI,JPI:NAME:<NAME>END_PI (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI,JudPI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("Jud 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Jd 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("Ju 1:1").osis()).toEqual("Jude.1.1") p.include_apocrypha(false) expect(p.parse("JUD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JD 1:1").osis()).toEqual("Jude.1.1") expect(p.parse("JU 1:1").osis()).toEqual("Jude.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI,PI:NAME:<NAME>END_PI (en)", -> ` expect(p.parse("Ma 1:1").osis()).toEqual("Matt.1.1") p.include_apocrypha(false) expect(p.parse("MA 1:1").osis()).toEqual("Matt.1.1") ` true describe "Localized book Phil,Phlm (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: PI:NAME:<NAME>END_PI,Phlm (en)", -> ` expect(p.parse("Ph 1:1").osis()).toEqual("Phil.1.1") p.include_apocrypha(false) expect(p.parse("PH 1:1").osis()).toEqual("Phil.1.1") ` true describe "Localized book PI:NAME:<NAME>END_PIph,Zech (en)", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore",book_sequence_strategy: "ignore",osis_compaction_strategy: "bc",captive_end_digits_strategy: "delete" p.include_apocrypha true it "should handle book: Zeph,Zech (en)", -> ` expect(p.parse("Ze 1:1").osis()).toEqual("Zeph.1.1") p.include_apocrypha(false) expect(p.parse("ZE 1:1").osis()).toEqual("Zeph.1.1") ` true describe "Miscellaneous tests", -> p = {} beforeEach -> p = new bcv_parser p.set_options book_alone_strategy: "ignore", book_sequence_strategy: "ignore", osis_compaction_strategy: "bc", captive_end_digits_strategy: "delete" p.include_apocrypha true it "should return the expected language", -> expect(p.languages).toEqual ["en"] it "should handle ranges (en)", -> expect(p.parse("Titus 1:1 through 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1through2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THROUGH 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 thru 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1thru2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 THRU 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" expect(p.parse("Titus 1:1 to 2").osis()).toEqual "Titus.1.1-Titus.1.2" expect(p.parse("Matt 1to2").osis()).toEqual "Matt.1-Matt.2" expect(p.parse("Phlm 2 TO 3").osis()).toEqual "Phlm.1.2-Phlm.1.3" it "should handle chapters (en)", -> expect(p.parse("Titus 1:1, chapters 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTERS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapter 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTER 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chpts 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHPTS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chapt 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPT 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chaps 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAPS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chap 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHAP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chp 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHP 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, chs 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHS 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, cha 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CHA 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch. 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH. 6").osis()).toEqual "Matt.3.4,Matt.6" expect(p.parse("Titus 1:1, ch 2").osis()).toEqual "Titus.1.1,Titus.2" expect(p.parse("Matt 3:4 CH 6").osis()).toEqual "Matt.3.4,Matt.6" it "should handle verses (en)", -> expect(p.parse("Exod 1:1 verses 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSES 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 verse 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VERSE 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 ver 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VER 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vss 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VSS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vs 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VS 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 vv 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm VV 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V. 6").osis()).toEqual "Phlm.1.6" expect(p.parse("Exod 1:1 v 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm V 6").osis()).toEqual "Phlm.1.6" it "should handle 'and' (en)", -> expect(p.parse("Exod 1:1 and 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 AND 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 compare 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 COMPARE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf. 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF. 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 cf 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 CF 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 also 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 ALSO 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" expect(p.parse("Exod 1:1 see 3").osis()).toEqual "Exod.1.1,Exod.1.3" expect(p.parse("Phlm 2 SEE 6").osis()).toEqual "Phlm.1.2,Phlm.1.6" it "should handle titles (en)", -> expect(p.parse("Ps 3 title, 4:2, 5:title").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" expect(p.parse("PS 3 TITLE, 4:2, 5:TITLE").osis()).toEqual "Ps.3.1,Ps.4.2,Ps.5.1" it "should handle 'ff' (en)", -> expect(p.parse("Rev 3ff, 4:2ff").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 FF, 4:2 FF").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("Rev 3f, 4:2f").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" expect(p.parse("REV 3 F, 4:2 F").osis()).toEqual "Rev.3-Rev.22,Rev.4.2-Rev.4.11" it "should handle translations (en)", -> expect(p.parse("Lev 1 (AMP)").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("lev 1 amp").osis_and_translations()).toEqual [["Lev.1", "AMP"]] expect(p.parse("Lev 1 (ASV)").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("lev 1 asv").osis_and_translations()).toEqual [["Lev.1", "ASV"]] expect(p.parse("Lev 1 (CEB)").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("lev 1 ceb").osis_and_translations()).toEqual [["Lev.1", "CEB"]] expect(p.parse("Lev 1 (CEV)").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("lev 1 cev").osis_and_translations()).toEqual [["Lev.1", "CEV"]] expect(p.parse("Lev 1 (ERV)").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("lev 1 erv").osis_and_translations()).toEqual [["Lev.1", "ERV"]] expect(p.parse("Lev 1 (ESV)").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("lev 1 esv").osis_and_translations()).toEqual [["Lev.1", "ESV"]] expect(p.parse("Lev 1 (HCSB)").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("lev 1 hcsb").osis_and_translations()).toEqual [["Lev.1", "HCSB"]] expect(p.parse("Lev 1 (KJV)").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("lev 1 kjv").osis_and_translations()).toEqual [["Lev.1", "KJV"]] expect(p.parse("Lev 1 (LXX)").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("lev 1 lxx").osis_and_translations()).toEqual [["Lev.1", "LXX"]] expect(p.parse("Lev 1 (MSG)").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("lev 1 msg").osis_and_translations()).toEqual [["Lev.1", "MSG"]] expect(p.parse("Lev 1 (NAB)").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("lev 1 nab").osis_and_translations()).toEqual [["Lev.1", "NAB"]] expect(p.parse("Lev 1 (NABRE)").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("lev 1 nabre").osis_and_translations()).toEqual [["Lev.1", "NABRE"]] expect(p.parse("Lev 1 (NAS)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nas").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NASB)").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("lev 1 nasb").osis_and_translations()).toEqual [["Lev.1", "NASB"]] expect(p.parse("Lev 1 (NIRV)").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("lev 1 nirv").osis_and_translations()).toEqual [["Lev.1", "NIRV"]] expect(p.parse("Lev 1 (NIV)").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("lev 1 niv").osis_and_translations()).toEqual [["Lev.1", "NIV"]] expect(p.parse("Lev 1 (NKJV)").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("lev 1 nkjv").osis_and_translations()).toEqual [["Lev.1", "NKJV"]] expect(p.parse("Lev 1 (NLT)").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("lev 1 nlt").osis_and_translations()).toEqual [["Lev.1", "NLT"]] expect(p.parse("Lev 1 (NRSV)").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("lev 1 nrsv").osis_and_translations()).toEqual [["Lev.1", "NRSV"]] expect(p.parse("Lev 1 (RSV)").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("lev 1 rsv").osis_and_translations()).toEqual [["Lev.1", "RSV"]] expect(p.parse("Lev 1 (TNIV)").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] expect(p.parse("lev 1 tniv").osis_and_translations()).toEqual [["Lev.1", "TNIV"]] it "should handle book ranges (en)", -> p.set_options {book_alone_strategy: "full", book_range_strategy: "include"} expect(p.parse("1st through 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jh").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jn").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st through 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st thru 3rd Jo").osis()).toEqual "1John.1-3John.1" expect(p.parse("1st to 3rd Jo").osis()).toEqual "1John.1-3John.1" it "should handle boundaries (en)", -> p.set_options {book_alone_strategy: "full"} expect(p.parse("\u2014Matt\u2014").osis()).toEqual "Matt.1-Matt.28" expect(p.parse("\u201cMatt 1:1\u201d").osis()).toEqual "Matt.1.1"
[ { "context": "p.build_substitute_variables(variables: [{name: \"funky\", value: \"10\"}])\n new_exp = manip.perform(ex", "end": 22675, "score": 0.5432359576225281, "start": 22671, "tag": "NAME", "value": "unky" } ]
spec/expression_manipulation_spec.coffee
thinkthroughmath/ttm-coffeescript-math
0
ttm = thinkthroughmath class_mixer = ttm.class_mixer it_plays_manipulation_role = (options)-> describe "acting as an expression manipulation", -> beforeEach -> @subject = options.subject.call(@) it "has a perform method", -> expect(typeof @subject.perform).toEqual "function" it "returns an ExpressionPosition object", -> orig = options.expression_for_performance.call(@) results = @subject.perform(orig) unless results instanceof ttm.lib.math.ExpressionPosition throw "The return value was not an instance of expression position" it_inserts_components_where_pointed_to = (specifics)-> describe "#{specifics.name} inserts correctly when position is", -> it "works with a base case", -> start = if specifics.basic_start_expression specifics.basic_start_expression.call(@) else @exp_pos_builder() subject = specifics.subject.call(@) new_exp = subject.perform(start) expect(new_exp.expression()).toBeAnEqualExpressionTo( specifics.basic_should_equal_after.call(@) ) describe "expression manipulations", -> beforeEach -> @math = ttm.lib.math.math_lib.build() @pos = @math.expression_position @manip = @math.commands @components = @math.components builder_lib = ttm.lib.math.BuildExpressionFromJavascriptObject @exp_builder = @math.object_to_expression.buildExpressionFunction() @exp_pos_builder = @math.object_to_expression.buildExpressionPositionFunction() expression_to_string = ttm.lib.math.ExpressionToString.toString @expect_value = (expression, value)-> expect(expression_to_string(expression)).toEqual value describe "a proof-of-concept example", -> it "produces the correct result TODO make this larger", -> exp = @exp_builder() exp_pos = ttm.lib.math.ExpressionPosition.build(position: exp.id(), expression: exp) exp_pos = @manip.build_append_number(value: 1).perform(exp_pos) exp_pos = @manip.build_append_number(value: 0).perform(exp_pos) exp_pos = @manip.build_append_multiplication().perform(exp_pos) exp_pos = @manip.build_append_sub_expression().perform(exp_pos) exp_pos = @manip.build_append_number(value: 2).perform(exp_pos) exp_pos = @manip.build_append_addition().perform(exp_pos) exp_pos = @manip.build_append_number(value: 4).perform(exp_pos) exp_pos = @manip.build_exit_sub_expression().perform(exp_pos) expected = @exp_builder(10, '*', [2, '+', 4]) expect(exp_pos.expression()).toBeAnEqualExpressionTo expected describe "appending multiplication", -> it_plays_manipulation_role subject: -> @manip.build_append_multiplication() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'multiplication' subject: -> @manip.build_append_multiplication() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*' ) it "does nothing if the expression is empty", -> exp_pos = @exp_pos_builder() exp_pos = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder() expect(exp_pos.expression()).toBeAnEqualExpressionTo expected it "adds multiplication to the end of the expression", -> exp_pos = @exp_pos_builder(1) results = @manip.build_append_multiplication().perform(exp_pos) expect(results.expression().last() instanceof @components.classes.multiplication).toEqual true it "correctly adds multiplication after an exponentiation", -> exp_pos = @exp_pos_builder('^': [1, 2]) new_exp = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder({'^': [1, 2]}, '*') expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "exponentiate last element", -> it_plays_manipulation_role subject: -> @manip.build_exponentiate_last() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'exponentiation' subject: -> @manip.build_exponentiate_last() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder '^': [1,[]] ) describe "on a single number-only expression", -> beforeEach -> exp = @exp_pos_builder(10) @new_exp = @manip.build_exponentiate_last().perform(exp).expression() it "replaces the content of the expression with an exponentiation", -> expect(@new_exp.first()).toBeInstanceOf @components.classes.exponentiation it "provides the exponentiation its base", -> expect(@new_exp.first().base()).toBeAnEqualExpressionTo @exp_builder([10]).first() describe "on an expression that currently ends with an operator ", -> it "replaces the trailing operator", -> exp = @exp_pos_builder(10, '+') new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, null]) expect(new_exp).toBeAnEqualExpressionTo expected describe "on an expression that has a trailing exponent", -> it "manipulates expression correctly", -> exp = @exp_pos_builder('^': [10, []]) new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, []]) expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a number", -> it_plays_manipulation_role subject: -> @manip.build_append_number(value: 8) expression_for_performance: -> @exp_pos_builder(10) it "inserts a number when the expression is empty", -> @exp_pos = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(@exp_pos) expected = @exp_builder(8) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the previous element is a closed expression", -> beforeEach -> @exp_pos = @exp_pos_builder([1]) it "adds a multiplication symbol between elements", -> exp = @manip.build_append_number(value: 11).perform(@exp_pos) expected = @exp_builder([1], '*', 11) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending exponentiation", -> it_plays_manipulation_role subject: -> @manip.build_append_exponentiation() expression_for_performance: -> @exp_pos_builder(10) describe "when the currently displayed element is ", -> beforeEach -> @exp_pos = @exp_pos_builder([[]]) it "adds the number at the correct place", -> @exp_pos = @manip.utils.build_expression_position_manipulator(). updatePositionTo(@exp_pos, (comp)-> comp.isExpression() && comp.parent() && comp.parent().isExpression() && comp.parent().parent() ) exp = @manip.build_append_number(value: 8). perform(@exp_pos) expected = @exp_builder([[8]]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed-at element is an exponentiation ", -> describe "with no power", -> beforeEach -> @exp = @exp_pos_builder('^': [10, cursor([])]) it "inserts the number into the exponentiation", -> new_exp = @manip.build_append_number(value: 11).perform(@exp) expected = @exp_builder('^': [10, 11]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "with a power", -> beforeEach -> @exp_pos = @exp_pos_builder('^': [10, 11]) it "inserts a multiplication and then the number", -> new_exp = @manip.build_append_number(value: 7).perform(@exp_pos) expected = @exp_builder({'^': [10,11]}, '*', 7) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed at element is not one of those special cases", -> it "adds the number as a new number", -> exp_pos = @exp_pos_builder(1, '+', 3, '=') manipulated_exp = @manip.build_append_number(value: 8).perform(exp_pos) expected = @exp_builder(1, '+', 3, '=', 8) expect(manipulated_exp.expression()).toBeAnEqualExpressionTo expected describe "appending an equals", -> it "inserts an equals sign into the equation", -> @exp = @exp_pos_builder(1, '+', 3) new_exp = @manip.build_append_equals().perform(@exp).expression() expected = @exp_builder(1, '+', 3, '=') expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_append_sub_expression() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'appending a sub expression' subject: -> @manip.build_append_sub_expression() basic_start_expression: -> @exp_pos_builder() basic_should_equal_after: -> @exp_builder [] ) it "adds a sub-expression to the expression", -> @exp = @exp_pos_builder(1, '+') new_exp = @manip.build_append_sub_expression().perform(@exp).expression() expected = @exp_builder(1, '+', []) expect(new_exp).toBeAnEqualExpressionTo expected describe "when adding to a sub-expression", -> it "should add everything correctly", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(6, '+', [6, '+', []]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "exiting a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_exit_sub_expression() expression_for_performance: -> ret = @exp_pos_builder([cursor([])]) # we need to set the pointed position to the id of the open expression ret.clone(position: ret.expression().first().id()) it "moves the position outside of the sub-expression", -> exp = @exp_pos_builder([cursor([])]) new_exp = @manip.build_exit_sub_expression().perform(exp) actual = new_exp.expression() expected = @exp_builder([[]]) expect(actual).toBeAnEqualExpressionTo expected expect(new_exp.position()).not.toEqual(exp.position()) expect(new_exp.position()).toEqual(exp.expression().last().id()) it "correctly handles closing a nested open subexpression that is pointed at", -> exp = @exp_pos_builder([cursor([])]) exp = exp.clone position: exp.expression().first().first().id() new_exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder([[]]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "appending division", -> it_plays_manipulation_role subject: -> @manip.build_append_division() expression_for_performance: -> @exp_pos_builder(10) it "adds a division to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_division().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.division).toBeTruthy() it_inserts_components_where_pointed_to( name: 'division' subject: -> @manip.build_append_division() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '/' ) describe "appending addition", -> it_plays_manipulation_role subject: -> @manip.build_append_addition() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'addition' subject: -> @manip.build_append_addition() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '+' ) it "adds addition to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_addition().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.addition).toEqual true describe "appending subtraction", -> it_plays_manipulation_role subject: -> @manip.build_append_subtraction() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'subtraction' subject: -> @manip.build_append_subtraction() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '-' ) it "adds subtraction to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_subtraction().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.subtraction).toEqual true describe "appending a decimal", -> it_plays_manipulation_role subject: -> @manip.build_append_decimal(value: 5) expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'append decimal' subject: -> @manip.build_append_decimal() basic_start_expression: -> @exp_pos_builder '1' basic_should_equal_after: -> @exp_builder '1.' ) it "adds an implicit multiplication after a variable", -> exp = @exp_pos_builder({variable: "doot"}) new_exp = @manip.build_append_decimal().perform(exp).expression() expect(new_exp.last().isNumber()).toBeTruthy() expect(new_exp.last(1).isMultiplication()).toBeTruthy() it "correctly adds a decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.1') it "adds only one decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.11') describe 'calculate expression', -> it_plays_manipulation_role subject: -> @manip.build_calculate() expression_for_performance: -> @exp_pos_builder(5) describe '.perform()', -> beforeEach -> @exp = @exp_pos_builder(6) @exp = @manip.build_append_division().perform(@exp) @exp = @manip.build_append_number(value: 2).perform(@exp) @new_exp = @manip.build_calculate().perform(@exp) it 'collapses Expression array', -> collapsed_exp = @exp_pos_builder(3) expect(@new_exp.expression()).toBeAnEqualExpressionTo collapsed_exp.expression() it 'retains the position value', -> expect(@new_exp.position()).toEqual @exp.position() it 'retains id of cloned Expression object', -> expect(@new_exp.expression().id()).toEqual @exp.expression().id() describe 'with error state', -> beforeEach -> @exp = @manip.build_append_division().perform(@new_exp) @new_exp = @manip.build_calculate().perform(@exp) it 'sets error state and clears array in Expression object', -> error_exp = @exp_pos_builder() error_exp.expr.is_error = true expect(@new_exp.expr).toBeAnEqualExpressionTo error_exp.expression() describe "square expression", -> it_plays_manipulation_role subject: -> @manip.build_square() expression_for_performance: -> @exp_pos_builder(10) it "returns a squared expression", -> exp = @exp_pos_builder(10) squared = @manip.build_square().perform(exp) @expect_value(squared, '100') describe "appending root", -> it_plays_manipulation_role subject: -> @manip.build_append_root() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and root to the expression", -> exp = @exp_pos_builder([1]) new_exp = @manip.build_append_root(degree: 2).perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.root expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "adds root and an addition to the expression", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_square_root().perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 2).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_number(value: 4).perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(9, '+', [2, '+', 4]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending variable", -> it_plays_manipulation_role subject: -> @manip.build_append_variable() expression_for_performance: -> @exp_pos_builder(10) it "adds itself to an empty expression", -> exp = @exp_pos_builder() new_exp = @manip.build_append_variable(variable: "doot").perform(exp) expected = @exp_builder(variable: "doot") expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "reset expression", -> it_plays_manipulation_role subject: -> @manip.build_reset() expression_for_performance: -> false # not important at all beforeEach -> @reset = @manip.build_reset() @result = @reset.perform() it "returns an empty resulting expression", -> expect(@result.expression()).toBeAnEqualExpressionTo @exp_builder() it "returns an pointer which points to that expression", -> expect(@result.position()).toEqual @result.expression().id() describe "update position", -> it_plays_manipulation_role subject: -> @manip.build_update_position() expression_for_performance: -> @exp_pos_builder() describe "negate last", -> it_plays_manipulation_role subject: -> @manip.build_negate_last() expression_for_performance: -> @exp_pos_builder(10) it "will negate the last element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last().value()).toEqual -1 it "does nothing when the last element is not a number", -> exp = @exp_pos_builder() new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last()).toEqual undefined describe "appending pi", -> it_plays_manipulation_role subject: -> @manip.build_append_pi() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and pi to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "allows the value of pi to be specified", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi(value: "1").perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last().value()).toEqual "1" describe "appending a fraction", -> it_plays_manipulation_role subject: -> @manip.build_append_fraction() expression_for_performance: -> @exp_pos_builder() it "adds a numerator/denominator where we expect", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fraction().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fraction expect(new_exp.last().numerator()).toBeInstanceOf @components.classes.expression expect(new_exp.last().denominator()).toBeInstanceOf @components.classes.expression describe "appending a function", -> it_plays_manipulation_role subject: -> @manip.build_append_fn() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'fn' subject: -> @manip.build_append_fn(name: 'doot') basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*', {fn: ["doot", []]} ) it "adds a function element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fn().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fn expect(new_exp.last().argument()).toBeInstanceOf @components.classes.expression it "inserts a multiplication symbol between variables and functions", -> exp = @exp_pos_builder(variable: "face") new_exp = @manip.build_append_fn(name: "doot", argument: @components.build_expression()).perform(exp).expression() expect(new_exp).toBeAnEqualExpressionTo( @exp_builder({variable: "face"}, '*', {fn: ["doot", []]}) ) describe "take the square root", -> it_plays_manipulation_role subject: -> @manip.build_square_root() expression_for_performance: -> @exp_pos_builder(10) it "finds the square root of an expression", -> exp = @exp_pos_builder([4]) new_exp = @manip.build_square_root().perform(exp) expect(new_exp.expression().last().value()).toEqual '2' describe "substituting variables", -> it_plays_manipulation_role subject: -> @manip.build_substitute_variables(variables: [{name: "funky", value: "10"}]) expression_for_performance: -> @exp_pos_builder({variable: "funky"}) it "substitutes variables", -> exp_pos = @exp_pos_builder({variable: "funky"}) manip = @manip.build_substitute_variables(variables: [{name: "funky", value: "10"}]) new_exp = manip.perform(exp_pos) expect(new_exp.expression()).toBeAnEqualExpressionTo(@exp_pos_builder(10).expression()) describe "getting different sides of an equation", -> describe "getting left side", -> it_plays_manipulation_role subject: -> @manip.build_get_left_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns left sides of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_left_side().perform(expr) expected = @exp_builder({variable: 'funky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "getting right side", -> it_plays_manipulation_role subject: -> @manip.build_get_right_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns right side of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_right_side().perform(expr) expected = @exp_builder({variable: 'chunky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "removing the pointed-at element", -> it_plays_manipulation_role subject: -> @manip.build_remove_pointed_at() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "removes an item from an expression", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_remove_pointed_at().perform(expr) expected = @exp_builder({variable: "funky"}, '=') expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "utilities", -> describe "updating which element is pointed at", -> it "changes the place something is pointed at", -> pos_manip = @manip.utils.build_expression_position_manipulator() orig = @exp_pos_builder({variable: "funky"}, '=', {fraction: []}) orig_pointed = orig.position() new_exp = pos_manip.updatePositionTo orig, (exp)-> exp.isExpression() && exp.parent() && exp.parent().isFraction() expect(new_exp.position()).not.toEqual(orig_pointed) expect(new_exp.position()).toEqual(new_exp.expression().last().numerator().id())
90355
ttm = thinkthroughmath class_mixer = ttm.class_mixer it_plays_manipulation_role = (options)-> describe "acting as an expression manipulation", -> beforeEach -> @subject = options.subject.call(@) it "has a perform method", -> expect(typeof @subject.perform).toEqual "function" it "returns an ExpressionPosition object", -> orig = options.expression_for_performance.call(@) results = @subject.perform(orig) unless results instanceof ttm.lib.math.ExpressionPosition throw "The return value was not an instance of expression position" it_inserts_components_where_pointed_to = (specifics)-> describe "#{specifics.name} inserts correctly when position is", -> it "works with a base case", -> start = if specifics.basic_start_expression specifics.basic_start_expression.call(@) else @exp_pos_builder() subject = specifics.subject.call(@) new_exp = subject.perform(start) expect(new_exp.expression()).toBeAnEqualExpressionTo( specifics.basic_should_equal_after.call(@) ) describe "expression manipulations", -> beforeEach -> @math = ttm.lib.math.math_lib.build() @pos = @math.expression_position @manip = @math.commands @components = @math.components builder_lib = ttm.lib.math.BuildExpressionFromJavascriptObject @exp_builder = @math.object_to_expression.buildExpressionFunction() @exp_pos_builder = @math.object_to_expression.buildExpressionPositionFunction() expression_to_string = ttm.lib.math.ExpressionToString.toString @expect_value = (expression, value)-> expect(expression_to_string(expression)).toEqual value describe "a proof-of-concept example", -> it "produces the correct result TODO make this larger", -> exp = @exp_builder() exp_pos = ttm.lib.math.ExpressionPosition.build(position: exp.id(), expression: exp) exp_pos = @manip.build_append_number(value: 1).perform(exp_pos) exp_pos = @manip.build_append_number(value: 0).perform(exp_pos) exp_pos = @manip.build_append_multiplication().perform(exp_pos) exp_pos = @manip.build_append_sub_expression().perform(exp_pos) exp_pos = @manip.build_append_number(value: 2).perform(exp_pos) exp_pos = @manip.build_append_addition().perform(exp_pos) exp_pos = @manip.build_append_number(value: 4).perform(exp_pos) exp_pos = @manip.build_exit_sub_expression().perform(exp_pos) expected = @exp_builder(10, '*', [2, '+', 4]) expect(exp_pos.expression()).toBeAnEqualExpressionTo expected describe "appending multiplication", -> it_plays_manipulation_role subject: -> @manip.build_append_multiplication() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'multiplication' subject: -> @manip.build_append_multiplication() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*' ) it "does nothing if the expression is empty", -> exp_pos = @exp_pos_builder() exp_pos = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder() expect(exp_pos.expression()).toBeAnEqualExpressionTo expected it "adds multiplication to the end of the expression", -> exp_pos = @exp_pos_builder(1) results = @manip.build_append_multiplication().perform(exp_pos) expect(results.expression().last() instanceof @components.classes.multiplication).toEqual true it "correctly adds multiplication after an exponentiation", -> exp_pos = @exp_pos_builder('^': [1, 2]) new_exp = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder({'^': [1, 2]}, '*') expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "exponentiate last element", -> it_plays_manipulation_role subject: -> @manip.build_exponentiate_last() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'exponentiation' subject: -> @manip.build_exponentiate_last() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder '^': [1,[]] ) describe "on a single number-only expression", -> beforeEach -> exp = @exp_pos_builder(10) @new_exp = @manip.build_exponentiate_last().perform(exp).expression() it "replaces the content of the expression with an exponentiation", -> expect(@new_exp.first()).toBeInstanceOf @components.classes.exponentiation it "provides the exponentiation its base", -> expect(@new_exp.first().base()).toBeAnEqualExpressionTo @exp_builder([10]).first() describe "on an expression that currently ends with an operator ", -> it "replaces the trailing operator", -> exp = @exp_pos_builder(10, '+') new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, null]) expect(new_exp).toBeAnEqualExpressionTo expected describe "on an expression that has a trailing exponent", -> it "manipulates expression correctly", -> exp = @exp_pos_builder('^': [10, []]) new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, []]) expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a number", -> it_plays_manipulation_role subject: -> @manip.build_append_number(value: 8) expression_for_performance: -> @exp_pos_builder(10) it "inserts a number when the expression is empty", -> @exp_pos = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(@exp_pos) expected = @exp_builder(8) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the previous element is a closed expression", -> beforeEach -> @exp_pos = @exp_pos_builder([1]) it "adds a multiplication symbol between elements", -> exp = @manip.build_append_number(value: 11).perform(@exp_pos) expected = @exp_builder([1], '*', 11) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending exponentiation", -> it_plays_manipulation_role subject: -> @manip.build_append_exponentiation() expression_for_performance: -> @exp_pos_builder(10) describe "when the currently displayed element is ", -> beforeEach -> @exp_pos = @exp_pos_builder([[]]) it "adds the number at the correct place", -> @exp_pos = @manip.utils.build_expression_position_manipulator(). updatePositionTo(@exp_pos, (comp)-> comp.isExpression() && comp.parent() && comp.parent().isExpression() && comp.parent().parent() ) exp = @manip.build_append_number(value: 8). perform(@exp_pos) expected = @exp_builder([[8]]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed-at element is an exponentiation ", -> describe "with no power", -> beforeEach -> @exp = @exp_pos_builder('^': [10, cursor([])]) it "inserts the number into the exponentiation", -> new_exp = @manip.build_append_number(value: 11).perform(@exp) expected = @exp_builder('^': [10, 11]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "with a power", -> beforeEach -> @exp_pos = @exp_pos_builder('^': [10, 11]) it "inserts a multiplication and then the number", -> new_exp = @manip.build_append_number(value: 7).perform(@exp_pos) expected = @exp_builder({'^': [10,11]}, '*', 7) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed at element is not one of those special cases", -> it "adds the number as a new number", -> exp_pos = @exp_pos_builder(1, '+', 3, '=') manipulated_exp = @manip.build_append_number(value: 8).perform(exp_pos) expected = @exp_builder(1, '+', 3, '=', 8) expect(manipulated_exp.expression()).toBeAnEqualExpressionTo expected describe "appending an equals", -> it "inserts an equals sign into the equation", -> @exp = @exp_pos_builder(1, '+', 3) new_exp = @manip.build_append_equals().perform(@exp).expression() expected = @exp_builder(1, '+', 3, '=') expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_append_sub_expression() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'appending a sub expression' subject: -> @manip.build_append_sub_expression() basic_start_expression: -> @exp_pos_builder() basic_should_equal_after: -> @exp_builder [] ) it "adds a sub-expression to the expression", -> @exp = @exp_pos_builder(1, '+') new_exp = @manip.build_append_sub_expression().perform(@exp).expression() expected = @exp_builder(1, '+', []) expect(new_exp).toBeAnEqualExpressionTo expected describe "when adding to a sub-expression", -> it "should add everything correctly", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(6, '+', [6, '+', []]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "exiting a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_exit_sub_expression() expression_for_performance: -> ret = @exp_pos_builder([cursor([])]) # we need to set the pointed position to the id of the open expression ret.clone(position: ret.expression().first().id()) it "moves the position outside of the sub-expression", -> exp = @exp_pos_builder([cursor([])]) new_exp = @manip.build_exit_sub_expression().perform(exp) actual = new_exp.expression() expected = @exp_builder([[]]) expect(actual).toBeAnEqualExpressionTo expected expect(new_exp.position()).not.toEqual(exp.position()) expect(new_exp.position()).toEqual(exp.expression().last().id()) it "correctly handles closing a nested open subexpression that is pointed at", -> exp = @exp_pos_builder([cursor([])]) exp = exp.clone position: exp.expression().first().first().id() new_exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder([[]]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "appending division", -> it_plays_manipulation_role subject: -> @manip.build_append_division() expression_for_performance: -> @exp_pos_builder(10) it "adds a division to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_division().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.division).toBeTruthy() it_inserts_components_where_pointed_to( name: 'division' subject: -> @manip.build_append_division() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '/' ) describe "appending addition", -> it_plays_manipulation_role subject: -> @manip.build_append_addition() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'addition' subject: -> @manip.build_append_addition() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '+' ) it "adds addition to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_addition().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.addition).toEqual true describe "appending subtraction", -> it_plays_manipulation_role subject: -> @manip.build_append_subtraction() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'subtraction' subject: -> @manip.build_append_subtraction() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '-' ) it "adds subtraction to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_subtraction().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.subtraction).toEqual true describe "appending a decimal", -> it_plays_manipulation_role subject: -> @manip.build_append_decimal(value: 5) expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'append decimal' subject: -> @manip.build_append_decimal() basic_start_expression: -> @exp_pos_builder '1' basic_should_equal_after: -> @exp_builder '1.' ) it "adds an implicit multiplication after a variable", -> exp = @exp_pos_builder({variable: "doot"}) new_exp = @manip.build_append_decimal().perform(exp).expression() expect(new_exp.last().isNumber()).toBeTruthy() expect(new_exp.last(1).isMultiplication()).toBeTruthy() it "correctly adds a decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.1') it "adds only one decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.11') describe 'calculate expression', -> it_plays_manipulation_role subject: -> @manip.build_calculate() expression_for_performance: -> @exp_pos_builder(5) describe '.perform()', -> beforeEach -> @exp = @exp_pos_builder(6) @exp = @manip.build_append_division().perform(@exp) @exp = @manip.build_append_number(value: 2).perform(@exp) @new_exp = @manip.build_calculate().perform(@exp) it 'collapses Expression array', -> collapsed_exp = @exp_pos_builder(3) expect(@new_exp.expression()).toBeAnEqualExpressionTo collapsed_exp.expression() it 'retains the position value', -> expect(@new_exp.position()).toEqual @exp.position() it 'retains id of cloned Expression object', -> expect(@new_exp.expression().id()).toEqual @exp.expression().id() describe 'with error state', -> beforeEach -> @exp = @manip.build_append_division().perform(@new_exp) @new_exp = @manip.build_calculate().perform(@exp) it 'sets error state and clears array in Expression object', -> error_exp = @exp_pos_builder() error_exp.expr.is_error = true expect(@new_exp.expr).toBeAnEqualExpressionTo error_exp.expression() describe "square expression", -> it_plays_manipulation_role subject: -> @manip.build_square() expression_for_performance: -> @exp_pos_builder(10) it "returns a squared expression", -> exp = @exp_pos_builder(10) squared = @manip.build_square().perform(exp) @expect_value(squared, '100') describe "appending root", -> it_plays_manipulation_role subject: -> @manip.build_append_root() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and root to the expression", -> exp = @exp_pos_builder([1]) new_exp = @manip.build_append_root(degree: 2).perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.root expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "adds root and an addition to the expression", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_square_root().perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 2).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_number(value: 4).perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(9, '+', [2, '+', 4]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending variable", -> it_plays_manipulation_role subject: -> @manip.build_append_variable() expression_for_performance: -> @exp_pos_builder(10) it "adds itself to an empty expression", -> exp = @exp_pos_builder() new_exp = @manip.build_append_variable(variable: "doot").perform(exp) expected = @exp_builder(variable: "doot") expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "reset expression", -> it_plays_manipulation_role subject: -> @manip.build_reset() expression_for_performance: -> false # not important at all beforeEach -> @reset = @manip.build_reset() @result = @reset.perform() it "returns an empty resulting expression", -> expect(@result.expression()).toBeAnEqualExpressionTo @exp_builder() it "returns an pointer which points to that expression", -> expect(@result.position()).toEqual @result.expression().id() describe "update position", -> it_plays_manipulation_role subject: -> @manip.build_update_position() expression_for_performance: -> @exp_pos_builder() describe "negate last", -> it_plays_manipulation_role subject: -> @manip.build_negate_last() expression_for_performance: -> @exp_pos_builder(10) it "will negate the last element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last().value()).toEqual -1 it "does nothing when the last element is not a number", -> exp = @exp_pos_builder() new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last()).toEqual undefined describe "appending pi", -> it_plays_manipulation_role subject: -> @manip.build_append_pi() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and pi to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "allows the value of pi to be specified", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi(value: "1").perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last().value()).toEqual "1" describe "appending a fraction", -> it_plays_manipulation_role subject: -> @manip.build_append_fraction() expression_for_performance: -> @exp_pos_builder() it "adds a numerator/denominator where we expect", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fraction().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fraction expect(new_exp.last().numerator()).toBeInstanceOf @components.classes.expression expect(new_exp.last().denominator()).toBeInstanceOf @components.classes.expression describe "appending a function", -> it_plays_manipulation_role subject: -> @manip.build_append_fn() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'fn' subject: -> @manip.build_append_fn(name: 'doot') basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*', {fn: ["doot", []]} ) it "adds a function element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fn().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fn expect(new_exp.last().argument()).toBeInstanceOf @components.classes.expression it "inserts a multiplication symbol between variables and functions", -> exp = @exp_pos_builder(variable: "face") new_exp = @manip.build_append_fn(name: "doot", argument: @components.build_expression()).perform(exp).expression() expect(new_exp).toBeAnEqualExpressionTo( @exp_builder({variable: "face"}, '*', {fn: ["doot", []]}) ) describe "take the square root", -> it_plays_manipulation_role subject: -> @manip.build_square_root() expression_for_performance: -> @exp_pos_builder(10) it "finds the square root of an expression", -> exp = @exp_pos_builder([4]) new_exp = @manip.build_square_root().perform(exp) expect(new_exp.expression().last().value()).toEqual '2' describe "substituting variables", -> it_plays_manipulation_role subject: -> @manip.build_substitute_variables(variables: [{name: "funky", value: "10"}]) expression_for_performance: -> @exp_pos_builder({variable: "funky"}) it "substitutes variables", -> exp_pos = @exp_pos_builder({variable: "funky"}) manip = @manip.build_substitute_variables(variables: [{name: "f<NAME>", value: "10"}]) new_exp = manip.perform(exp_pos) expect(new_exp.expression()).toBeAnEqualExpressionTo(@exp_pos_builder(10).expression()) describe "getting different sides of an equation", -> describe "getting left side", -> it_plays_manipulation_role subject: -> @manip.build_get_left_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns left sides of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_left_side().perform(expr) expected = @exp_builder({variable: 'funky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "getting right side", -> it_plays_manipulation_role subject: -> @manip.build_get_right_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns right side of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_right_side().perform(expr) expected = @exp_builder({variable: 'chunky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "removing the pointed-at element", -> it_plays_manipulation_role subject: -> @manip.build_remove_pointed_at() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "removes an item from an expression", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_remove_pointed_at().perform(expr) expected = @exp_builder({variable: "funky"}, '=') expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "utilities", -> describe "updating which element is pointed at", -> it "changes the place something is pointed at", -> pos_manip = @manip.utils.build_expression_position_manipulator() orig = @exp_pos_builder({variable: "funky"}, '=', {fraction: []}) orig_pointed = orig.position() new_exp = pos_manip.updatePositionTo orig, (exp)-> exp.isExpression() && exp.parent() && exp.parent().isFraction() expect(new_exp.position()).not.toEqual(orig_pointed) expect(new_exp.position()).toEqual(new_exp.expression().last().numerator().id())
true
ttm = thinkthroughmath class_mixer = ttm.class_mixer it_plays_manipulation_role = (options)-> describe "acting as an expression manipulation", -> beforeEach -> @subject = options.subject.call(@) it "has a perform method", -> expect(typeof @subject.perform).toEqual "function" it "returns an ExpressionPosition object", -> orig = options.expression_for_performance.call(@) results = @subject.perform(orig) unless results instanceof ttm.lib.math.ExpressionPosition throw "The return value was not an instance of expression position" it_inserts_components_where_pointed_to = (specifics)-> describe "#{specifics.name} inserts correctly when position is", -> it "works with a base case", -> start = if specifics.basic_start_expression specifics.basic_start_expression.call(@) else @exp_pos_builder() subject = specifics.subject.call(@) new_exp = subject.perform(start) expect(new_exp.expression()).toBeAnEqualExpressionTo( specifics.basic_should_equal_after.call(@) ) describe "expression manipulations", -> beforeEach -> @math = ttm.lib.math.math_lib.build() @pos = @math.expression_position @manip = @math.commands @components = @math.components builder_lib = ttm.lib.math.BuildExpressionFromJavascriptObject @exp_builder = @math.object_to_expression.buildExpressionFunction() @exp_pos_builder = @math.object_to_expression.buildExpressionPositionFunction() expression_to_string = ttm.lib.math.ExpressionToString.toString @expect_value = (expression, value)-> expect(expression_to_string(expression)).toEqual value describe "a proof-of-concept example", -> it "produces the correct result TODO make this larger", -> exp = @exp_builder() exp_pos = ttm.lib.math.ExpressionPosition.build(position: exp.id(), expression: exp) exp_pos = @manip.build_append_number(value: 1).perform(exp_pos) exp_pos = @manip.build_append_number(value: 0).perform(exp_pos) exp_pos = @manip.build_append_multiplication().perform(exp_pos) exp_pos = @manip.build_append_sub_expression().perform(exp_pos) exp_pos = @manip.build_append_number(value: 2).perform(exp_pos) exp_pos = @manip.build_append_addition().perform(exp_pos) exp_pos = @manip.build_append_number(value: 4).perform(exp_pos) exp_pos = @manip.build_exit_sub_expression().perform(exp_pos) expected = @exp_builder(10, '*', [2, '+', 4]) expect(exp_pos.expression()).toBeAnEqualExpressionTo expected describe "appending multiplication", -> it_plays_manipulation_role subject: -> @manip.build_append_multiplication() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'multiplication' subject: -> @manip.build_append_multiplication() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*' ) it "does nothing if the expression is empty", -> exp_pos = @exp_pos_builder() exp_pos = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder() expect(exp_pos.expression()).toBeAnEqualExpressionTo expected it "adds multiplication to the end of the expression", -> exp_pos = @exp_pos_builder(1) results = @manip.build_append_multiplication().perform(exp_pos) expect(results.expression().last() instanceof @components.classes.multiplication).toEqual true it "correctly adds multiplication after an exponentiation", -> exp_pos = @exp_pos_builder('^': [1, 2]) new_exp = @manip.build_append_multiplication().perform(exp_pos) expected = @exp_builder({'^': [1, 2]}, '*') expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "exponentiate last element", -> it_plays_manipulation_role subject: -> @manip.build_exponentiate_last() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'exponentiation' subject: -> @manip.build_exponentiate_last() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder '^': [1,[]] ) describe "on a single number-only expression", -> beforeEach -> exp = @exp_pos_builder(10) @new_exp = @manip.build_exponentiate_last().perform(exp).expression() it "replaces the content of the expression with an exponentiation", -> expect(@new_exp.first()).toBeInstanceOf @components.classes.exponentiation it "provides the exponentiation its base", -> expect(@new_exp.first().base()).toBeAnEqualExpressionTo @exp_builder([10]).first() describe "on an expression that currently ends with an operator ", -> it "replaces the trailing operator", -> exp = @exp_pos_builder(10, '+') new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, null]) expect(new_exp).toBeAnEqualExpressionTo expected describe "on an expression that has a trailing exponent", -> it "manipulates expression correctly", -> exp = @exp_pos_builder('^': [10, []]) new_exp = @manip.build_exponentiate_last().perform(exp).expression() expected = @exp_builder('^': [10, []]) expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a number", -> it_plays_manipulation_role subject: -> @manip.build_append_number(value: 8) expression_for_performance: -> @exp_pos_builder(10) it "inserts a number when the expression is empty", -> @exp_pos = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(@exp_pos) expected = @exp_builder(8) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the previous element is a closed expression", -> beforeEach -> @exp_pos = @exp_pos_builder([1]) it "adds a multiplication symbol between elements", -> exp = @manip.build_append_number(value: 11).perform(@exp_pos) expected = @exp_builder([1], '*', 11) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending exponentiation", -> it_plays_manipulation_role subject: -> @manip.build_append_exponentiation() expression_for_performance: -> @exp_pos_builder(10) describe "when the currently displayed element is ", -> beforeEach -> @exp_pos = @exp_pos_builder([[]]) it "adds the number at the correct place", -> @exp_pos = @manip.utils.build_expression_position_manipulator(). updatePositionTo(@exp_pos, (comp)-> comp.isExpression() && comp.parent() && comp.parent().isExpression() && comp.parent().parent() ) exp = @manip.build_append_number(value: 8). perform(@exp_pos) expected = @exp_builder([[8]]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed-at element is an exponentiation ", -> describe "with no power", -> beforeEach -> @exp = @exp_pos_builder('^': [10, cursor([])]) it "inserts the number into the exponentiation", -> new_exp = @manip.build_append_number(value: 11).perform(@exp) expected = @exp_builder('^': [10, 11]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "with a power", -> beforeEach -> @exp_pos = @exp_pos_builder('^': [10, 11]) it "inserts a multiplication and then the number", -> new_exp = @manip.build_append_number(value: 7).perform(@exp_pos) expected = @exp_builder({'^': [10,11]}, '*', 7) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "when the pointed at element is not one of those special cases", -> it "adds the number as a new number", -> exp_pos = @exp_pos_builder(1, '+', 3, '=') manipulated_exp = @manip.build_append_number(value: 8).perform(exp_pos) expected = @exp_builder(1, '+', 3, '=', 8) expect(manipulated_exp.expression()).toBeAnEqualExpressionTo expected describe "appending an equals", -> it "inserts an equals sign into the equation", -> @exp = @exp_pos_builder(1, '+', 3) new_exp = @manip.build_append_equals().perform(@exp).expression() expected = @exp_builder(1, '+', 3, '=') expect(new_exp).toBeAnEqualExpressionTo expected describe "appending a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_append_sub_expression() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'appending a sub expression' subject: -> @manip.build_append_sub_expression() basic_start_expression: -> @exp_pos_builder() basic_should_equal_after: -> @exp_builder [] ) it "adds a sub-expression to the expression", -> @exp = @exp_pos_builder(1, '+') new_exp = @manip.build_append_sub_expression().perform(@exp).expression() expected = @exp_builder(1, '+', []) expect(new_exp).toBeAnEqualExpressionTo expected describe "when adding to a sub-expression", -> it "should add everything correctly", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 6).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(6, '+', [6, '+', []]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "exiting a sub expression", -> it_plays_manipulation_role subject: -> @manip.build_exit_sub_expression() expression_for_performance: -> ret = @exp_pos_builder([cursor([])]) # we need to set the pointed position to the id of the open expression ret.clone(position: ret.expression().first().id()) it "moves the position outside of the sub-expression", -> exp = @exp_pos_builder([cursor([])]) new_exp = @manip.build_exit_sub_expression().perform(exp) actual = new_exp.expression() expected = @exp_builder([[]]) expect(actual).toBeAnEqualExpressionTo expected expect(new_exp.position()).not.toEqual(exp.position()) expect(new_exp.position()).toEqual(exp.expression().last().id()) it "correctly handles closing a nested open subexpression that is pointed at", -> exp = @exp_pos_builder([cursor([])]) exp = exp.clone position: exp.expression().first().first().id() new_exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder([[]]) expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "appending division", -> it_plays_manipulation_role subject: -> @manip.build_append_division() expression_for_performance: -> @exp_pos_builder(10) it "adds a division to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_division().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.division).toBeTruthy() it_inserts_components_where_pointed_to( name: 'division' subject: -> @manip.build_append_division() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '/' ) describe "appending addition", -> it_plays_manipulation_role subject: -> @manip.build_append_addition() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'addition' subject: -> @manip.build_append_addition() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '+' ) it "adds addition to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_addition().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.addition).toEqual true describe "appending subtraction", -> it_plays_manipulation_role subject: -> @manip.build_append_subtraction() expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'subtraction' subject: -> @manip.build_append_subtraction() basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '-' ) it "adds subtraction to the end of the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_subtraction().perform(exp) expect(new_exp.expression().last() instanceof @components.classes.subtraction).toEqual true describe "appending a decimal", -> it_plays_manipulation_role subject: -> @manip.build_append_decimal(value: 5) expression_for_performance: -> @exp_pos_builder(10) it_inserts_components_where_pointed_to( name: 'append decimal' subject: -> @manip.build_append_decimal() basic_start_expression: -> @exp_pos_builder '1' basic_should_equal_after: -> @exp_builder '1.' ) it "adds an implicit multiplication after a variable", -> exp = @exp_pos_builder({variable: "doot"}) new_exp = @manip.build_append_decimal().perform(exp).expression() expect(new_exp.last().isNumber()).toBeTruthy() expect(new_exp.last(1).isMultiplication()).toBeTruthy() it "correctly adds a decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.1') it "adds only one decimal to the value", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_append_decimal().perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) @expect_value(exp, '1.11') describe 'calculate expression', -> it_plays_manipulation_role subject: -> @manip.build_calculate() expression_for_performance: -> @exp_pos_builder(5) describe '.perform()', -> beforeEach -> @exp = @exp_pos_builder(6) @exp = @manip.build_append_division().perform(@exp) @exp = @manip.build_append_number(value: 2).perform(@exp) @new_exp = @manip.build_calculate().perform(@exp) it 'collapses Expression array', -> collapsed_exp = @exp_pos_builder(3) expect(@new_exp.expression()).toBeAnEqualExpressionTo collapsed_exp.expression() it 'retains the position value', -> expect(@new_exp.position()).toEqual @exp.position() it 'retains id of cloned Expression object', -> expect(@new_exp.expression().id()).toEqual @exp.expression().id() describe 'with error state', -> beforeEach -> @exp = @manip.build_append_division().perform(@new_exp) @new_exp = @manip.build_calculate().perform(@exp) it 'sets error state and clears array in Expression object', -> error_exp = @exp_pos_builder() error_exp.expr.is_error = true expect(@new_exp.expr).toBeAnEqualExpressionTo error_exp.expression() describe "square expression", -> it_plays_manipulation_role subject: -> @manip.build_square() expression_for_performance: -> @exp_pos_builder(10) it "returns a squared expression", -> exp = @exp_pos_builder(10) squared = @manip.build_square().perform(exp) @expect_value(squared, '100') describe "appending root", -> it_plays_manipulation_role subject: -> @manip.build_append_root() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and root to the expression", -> exp = @exp_pos_builder([1]) new_exp = @manip.build_append_root(degree: 2).perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.root expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "adds root and an addition to the expression", -> exp = @exp_pos_builder() exp = @manip.build_append_number(value: 8).perform(exp) exp = @manip.build_append_number(value: 1).perform(exp) exp = @manip.build_square_root().perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_sub_expression().perform(exp) exp = @manip.build_append_number(value: 2).perform(exp) exp = @manip.build_append_addition().perform(exp) exp = @manip.build_append_number(value: 4).perform(exp) exp = @manip.build_exit_sub_expression().perform(exp) expected = @exp_builder(9, '+', [2, '+', 4]) expect(exp.expression()).toBeAnEqualExpressionTo expected describe "appending variable", -> it_plays_manipulation_role subject: -> @manip.build_append_variable() expression_for_performance: -> @exp_pos_builder(10) it "adds itself to an empty expression", -> exp = @exp_pos_builder() new_exp = @manip.build_append_variable(variable: "doot").perform(exp) expected = @exp_builder(variable: "doot") expect(new_exp.expression()).toBeAnEqualExpressionTo expected describe "reset expression", -> it_plays_manipulation_role subject: -> @manip.build_reset() expression_for_performance: -> false # not important at all beforeEach -> @reset = @manip.build_reset() @result = @reset.perform() it "returns an empty resulting expression", -> expect(@result.expression()).toBeAnEqualExpressionTo @exp_builder() it "returns an pointer which points to that expression", -> expect(@result.position()).toEqual @result.expression().id() describe "update position", -> it_plays_manipulation_role subject: -> @manip.build_update_position() expression_for_performance: -> @exp_pos_builder() describe "negate last", -> it_plays_manipulation_role subject: -> @manip.build_negate_last() expression_for_performance: -> @exp_pos_builder(10) it "will negate the last element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last().value()).toEqual -1 it "does nothing when the last element is not a number", -> exp = @exp_pos_builder() new_exp = @manip.build_negate_last().perform(exp) expect(new_exp.expression().last()).toEqual undefined describe "appending pi", -> it_plays_manipulation_role subject: -> @manip.build_append_pi() expression_for_performance: -> @exp_pos_builder(10) it "adds a mulitplication and pi to the expression", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last(1)).toBeInstanceOf @components.classes.multiplication it "allows the value of pi to be specified", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_pi(value: "1").perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.pi expect(new_exp.last().value()).toEqual "1" describe "appending a fraction", -> it_plays_manipulation_role subject: -> @manip.build_append_fraction() expression_for_performance: -> @exp_pos_builder() it "adds a numerator/denominator where we expect", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fraction().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fraction expect(new_exp.last().numerator()).toBeInstanceOf @components.classes.expression expect(new_exp.last().denominator()).toBeInstanceOf @components.classes.expression describe "appending a function", -> it_plays_manipulation_role subject: -> @manip.build_append_fn() expression_for_performance: -> @exp_pos_builder() it_inserts_components_where_pointed_to( name: 'fn' subject: -> @manip.build_append_fn(name: 'doot') basic_start_expression: -> @exp_pos_builder 1 basic_should_equal_after: -> @exp_builder 1, '*', {fn: ["doot", []]} ) it "adds a function element", -> exp = @exp_pos_builder(1) new_exp = @manip.build_append_fn().perform(exp).expression() expect(new_exp.last()).toBeInstanceOf @components.classes.fn expect(new_exp.last().argument()).toBeInstanceOf @components.classes.expression it "inserts a multiplication symbol between variables and functions", -> exp = @exp_pos_builder(variable: "face") new_exp = @manip.build_append_fn(name: "doot", argument: @components.build_expression()).perform(exp).expression() expect(new_exp).toBeAnEqualExpressionTo( @exp_builder({variable: "face"}, '*', {fn: ["doot", []]}) ) describe "take the square root", -> it_plays_manipulation_role subject: -> @manip.build_square_root() expression_for_performance: -> @exp_pos_builder(10) it "finds the square root of an expression", -> exp = @exp_pos_builder([4]) new_exp = @manip.build_square_root().perform(exp) expect(new_exp.expression().last().value()).toEqual '2' describe "substituting variables", -> it_plays_manipulation_role subject: -> @manip.build_substitute_variables(variables: [{name: "funky", value: "10"}]) expression_for_performance: -> @exp_pos_builder({variable: "funky"}) it "substitutes variables", -> exp_pos = @exp_pos_builder({variable: "funky"}) manip = @manip.build_substitute_variables(variables: [{name: "fPI:NAME:<NAME>END_PI", value: "10"}]) new_exp = manip.perform(exp_pos) expect(new_exp.expression()).toBeAnEqualExpressionTo(@exp_pos_builder(10).expression()) describe "getting different sides of an equation", -> describe "getting left side", -> it_plays_manipulation_role subject: -> @manip.build_get_left_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns left sides of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_left_side().perform(expr) expected = @exp_builder({variable: 'funky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "getting right side", -> it_plays_manipulation_role subject: -> @manip.build_get_right_side() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "returns right side of equation", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_get_right_side().perform(expr) expected = @exp_builder({variable: 'chunky'}) expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "removing the pointed-at element", -> it_plays_manipulation_role subject: -> @manip.build_remove_pointed_at() expression_for_performance: -> @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) it "removes an item from an expression", -> expr = @exp_pos_builder({variable: "funky"}, '=', {variable: 'chunky'}) new_exp = @manip.build_remove_pointed_at().perform(expr) expected = @exp_builder({variable: "funky"}, '=') expect(new_exp.expression()).toBeAnEqualExpressionTo(expected) describe "utilities", -> describe "updating which element is pointed at", -> it "changes the place something is pointed at", -> pos_manip = @manip.utils.build_expression_position_manipulator() orig = @exp_pos_builder({variable: "funky"}, '=', {fraction: []}) orig_pointed = orig.position() new_exp = pos_manip.updatePositionTo orig, (exp)-> exp.isExpression() && exp.parent() && exp.parent().isFraction() expect(new_exp.position()).not.toEqual(orig_pointed) expect(new_exp.position()).toEqual(new_exp.expression().last().numerator().id())
[ { "context": " \"underscore\"\n\nSTREAM1 =\n key: \"test1\"\n source_password: \"abc123\"\n root_route:", "end": 414, "score": 0.994774580001831, "start": 409, "tag": "KEY", "value": "test1" }, { "context": ": \"test1\"\n source_password: \"abc123\"\n root_route: true\n seconds: ", "end": 447, "score": 0.998778760433197, "start": 441, "tag": "PASSWORD", "value": "abc123" } ]
test/master.coffee
firebrandv2/FirebrandNetwork.ga
342
MasterMode = $src "modes/master" Master = $src "master" MasterStream = $src "master/stream" SlaveIO = $src "slave/slave_io" Logger = $src "logger" MasterHelper = require "./helpers/master" StreamHelper = require "./helpers/stream" weak = require "weak" debug = require("debug")("sm:tests:master") _ = require "underscore" STREAM1 = key: "test1" source_password: "abc123" root_route: true seconds: 60*60*4 format: "mp3" class FakeSlave extends require("events").EventEmitter constructor: -> @streams = null configureStreams: (s) -> @streams = s @emit "config" onceConfigured: (cb) -> if @streams cb() else @once "config", cb describe "StreamMachine Master Mode", -> mm = null port_master = null port_source = null # -- Initialize our master -- # before (done) -> MasterHelper.startMaster "mp3", (err,info) -> throw err if err mm = info debug "started master. Connect at: #{mm.slave_uri}" debug "Stream Key is #{mm.stream_key}" done() after (done) -> mm.master.master.monitoring.shutdown() done() # -- Test our startup state -- # describe "Startup", -> it "should have started a Master instance", (done) -> expect(mm.master).to.be.a.instanceof(MasterMode) done() it "should be listening on a source port", (done) -> expect(mm.source_port).not.to.be.undefined done() it "should be listening on an admin port", (done) -> expect(mm.master_port).not.to.be.undefined done() it "should have no streams configured", (done) -> expect(mm.master.streams).to.be.empty done() it "should have no slaves", (done) -> expect(mm.master.master.slaves.slaves).to.be.empty done() it "should be listening for slaves" # -- Configure a Stream -- # describe "Stream Configuration", -> streams_emitted = false before (done) -> mm.master.master.once "streams", -> streams_emitted = true done() it "should accept a new stream", (done) -> c = streams:{}, sources:{} c.streams[ STREAM1.key ] = STREAM1 mm.master.master.configure c, (err,config) -> expect(err).to.be.null expect(config).to.have.property 'streams' expect(config.streams).to.have.property STREAM1.key expect(config.streams?[STREAM1.key]).to.be.an.instanceof MasterStream done() it "should have emitted 'streams' when configured", (done) -> expect(streams_emitted).to.be.true done() it "should destroy a stream when asked", (done) -> stream2 = StreamHelper.getStream "mp3" mm.master.master.createStream stream2, (err,status) -> throw err if err expect(mm.master.master.streams).to.have.property stream2.key stream = weak(mm.master.master.streams[stream2.key]) mm.master.master.removeStream stream, (err) => throw err if err expect(mm.master.master.streams).to.not.have.property stream2.key if global.gc global.gc() expect(stream.key).to.be.undefined done() else console.log "Skipping GC deref test. Run with --expose-gc" done() # -- Slaves -- # describe "Slave Connections", -> s_log = new Logger stdout:false slave = null s_io = null it "should allow a slave connection", (done) -> slave = new FakeSlave s_io = new SlaveIO slave, s_log, master:"ws://localhost:#{mm.master_port}?password=#{mm.config.master.password}" err_f = (err) -> throw err s_io.once "error", err_f s_io.once_connected (err,io) -> throw err if err s_io.removeListener "error", err_f expect(io.connected).to.be.true expect(s_io.connected).to.be.true done() it "should emit configuration to the slave", (done) -> # it's possible (and fine) to not get config immediately if the master # hasn't finished its config slave.onceConfigured -> expect(slave.streams).to.be.object expect(slave.streams).to.have.property STREAM1.key done() it "should deny a slave that provides the wrong password"
4515
MasterMode = $src "modes/master" Master = $src "master" MasterStream = $src "master/stream" SlaveIO = $src "slave/slave_io" Logger = $src "logger" MasterHelper = require "./helpers/master" StreamHelper = require "./helpers/stream" weak = require "weak" debug = require("debug")("sm:tests:master") _ = require "underscore" STREAM1 = key: "<KEY>" source_password: "<PASSWORD>" root_route: true seconds: 60*60*4 format: "mp3" class FakeSlave extends require("events").EventEmitter constructor: -> @streams = null configureStreams: (s) -> @streams = s @emit "config" onceConfigured: (cb) -> if @streams cb() else @once "config", cb describe "StreamMachine Master Mode", -> mm = null port_master = null port_source = null # -- Initialize our master -- # before (done) -> MasterHelper.startMaster "mp3", (err,info) -> throw err if err mm = info debug "started master. Connect at: #{mm.slave_uri}" debug "Stream Key is #{mm.stream_key}" done() after (done) -> mm.master.master.monitoring.shutdown() done() # -- Test our startup state -- # describe "Startup", -> it "should have started a Master instance", (done) -> expect(mm.master).to.be.a.instanceof(MasterMode) done() it "should be listening on a source port", (done) -> expect(mm.source_port).not.to.be.undefined done() it "should be listening on an admin port", (done) -> expect(mm.master_port).not.to.be.undefined done() it "should have no streams configured", (done) -> expect(mm.master.streams).to.be.empty done() it "should have no slaves", (done) -> expect(mm.master.master.slaves.slaves).to.be.empty done() it "should be listening for slaves" # -- Configure a Stream -- # describe "Stream Configuration", -> streams_emitted = false before (done) -> mm.master.master.once "streams", -> streams_emitted = true done() it "should accept a new stream", (done) -> c = streams:{}, sources:{} c.streams[ STREAM1.key ] = STREAM1 mm.master.master.configure c, (err,config) -> expect(err).to.be.null expect(config).to.have.property 'streams' expect(config.streams).to.have.property STREAM1.key expect(config.streams?[STREAM1.key]).to.be.an.instanceof MasterStream done() it "should have emitted 'streams' when configured", (done) -> expect(streams_emitted).to.be.true done() it "should destroy a stream when asked", (done) -> stream2 = StreamHelper.getStream "mp3" mm.master.master.createStream stream2, (err,status) -> throw err if err expect(mm.master.master.streams).to.have.property stream2.key stream = weak(mm.master.master.streams[stream2.key]) mm.master.master.removeStream stream, (err) => throw err if err expect(mm.master.master.streams).to.not.have.property stream2.key if global.gc global.gc() expect(stream.key).to.be.undefined done() else console.log "Skipping GC deref test. Run with --expose-gc" done() # -- Slaves -- # describe "Slave Connections", -> s_log = new Logger stdout:false slave = null s_io = null it "should allow a slave connection", (done) -> slave = new FakeSlave s_io = new SlaveIO slave, s_log, master:"ws://localhost:#{mm.master_port}?password=#{mm.config.master.password}" err_f = (err) -> throw err s_io.once "error", err_f s_io.once_connected (err,io) -> throw err if err s_io.removeListener "error", err_f expect(io.connected).to.be.true expect(s_io.connected).to.be.true done() it "should emit configuration to the slave", (done) -> # it's possible (and fine) to not get config immediately if the master # hasn't finished its config slave.onceConfigured -> expect(slave.streams).to.be.object expect(slave.streams).to.have.property STREAM1.key done() it "should deny a slave that provides the wrong password"
true
MasterMode = $src "modes/master" Master = $src "master" MasterStream = $src "master/stream" SlaveIO = $src "slave/slave_io" Logger = $src "logger" MasterHelper = require "./helpers/master" StreamHelper = require "./helpers/stream" weak = require "weak" debug = require("debug")("sm:tests:master") _ = require "underscore" STREAM1 = key: "PI:KEY:<KEY>END_PI" source_password: "PI:PASSWORD:<PASSWORD>END_PI" root_route: true seconds: 60*60*4 format: "mp3" class FakeSlave extends require("events").EventEmitter constructor: -> @streams = null configureStreams: (s) -> @streams = s @emit "config" onceConfigured: (cb) -> if @streams cb() else @once "config", cb describe "StreamMachine Master Mode", -> mm = null port_master = null port_source = null # -- Initialize our master -- # before (done) -> MasterHelper.startMaster "mp3", (err,info) -> throw err if err mm = info debug "started master. Connect at: #{mm.slave_uri}" debug "Stream Key is #{mm.stream_key}" done() after (done) -> mm.master.master.monitoring.shutdown() done() # -- Test our startup state -- # describe "Startup", -> it "should have started a Master instance", (done) -> expect(mm.master).to.be.a.instanceof(MasterMode) done() it "should be listening on a source port", (done) -> expect(mm.source_port).not.to.be.undefined done() it "should be listening on an admin port", (done) -> expect(mm.master_port).not.to.be.undefined done() it "should have no streams configured", (done) -> expect(mm.master.streams).to.be.empty done() it "should have no slaves", (done) -> expect(mm.master.master.slaves.slaves).to.be.empty done() it "should be listening for slaves" # -- Configure a Stream -- # describe "Stream Configuration", -> streams_emitted = false before (done) -> mm.master.master.once "streams", -> streams_emitted = true done() it "should accept a new stream", (done) -> c = streams:{}, sources:{} c.streams[ STREAM1.key ] = STREAM1 mm.master.master.configure c, (err,config) -> expect(err).to.be.null expect(config).to.have.property 'streams' expect(config.streams).to.have.property STREAM1.key expect(config.streams?[STREAM1.key]).to.be.an.instanceof MasterStream done() it "should have emitted 'streams' when configured", (done) -> expect(streams_emitted).to.be.true done() it "should destroy a stream when asked", (done) -> stream2 = StreamHelper.getStream "mp3" mm.master.master.createStream stream2, (err,status) -> throw err if err expect(mm.master.master.streams).to.have.property stream2.key stream = weak(mm.master.master.streams[stream2.key]) mm.master.master.removeStream stream, (err) => throw err if err expect(mm.master.master.streams).to.not.have.property stream2.key if global.gc global.gc() expect(stream.key).to.be.undefined done() else console.log "Skipping GC deref test. Run with --expose-gc" done() # -- Slaves -- # describe "Slave Connections", -> s_log = new Logger stdout:false slave = null s_io = null it "should allow a slave connection", (done) -> slave = new FakeSlave s_io = new SlaveIO slave, s_log, master:"ws://localhost:#{mm.master_port}?password=#{mm.config.master.password}" err_f = (err) -> throw err s_io.once "error", err_f s_io.once_connected (err,io) -> throw err if err s_io.removeListener "error", err_f expect(io.connected).to.be.true expect(s_io.connected).to.be.true done() it "should emit configuration to the slave", (done) -> # it's possible (and fine) to not get config immediately if the master # hasn't finished its config slave.onceConfigured -> expect(slave.streams).to.be.object expect(slave.streams).to.have.property STREAM1.key done() it "should deny a slave that provides the wrong password"
[ { "context": ")\n @options =\n jid: botjid\n password: botpw\n token: process.env.HUBOT_HIPCHAT_TOKEN or n", "end": 1998, "score": 0.9992408752441406, "start": 1993, "tag": "PASSWORD", "value": "botpw" }, { "context": " Connector\n jid: @options.jid\n password: @options.password\n host: @options.host\n logger: @logger\n ", "end": 2771, "score": 0.9945950508117676, "start": 2754, "tag": "PASSWORD", "value": "@options.password" }, { "context": "e\n getAuthor: => @robot.brain.userForId(@userIdFromJid from)\n message: message\n re", "end": 7576, "score": 0.9925729036331177, "start": 7562, "tag": "USERNAME", "value": "@userIdFromJid" }, { "context": "it.done =>\n user = @robot.brain.userForId(@userIdFromJid(user_jid)) or {}\n if user\n us", "end": 7907, "score": 0.9836791157722473, "start": 7893, "tag": "USERNAME", "value": "@userIdFromJid" }, { "context": " a presence, update it now\n user.name = currentName if currentName.length\n @receive ne", "end": 8086, "score": 0.975556492805481, "start": 8079, "tag": "NAME", "value": "current" } ]
src/hipchat.coffee
178inaba/hubot-hipchat2
2
{Adapter, TextMessage, EnterMessage, LeaveMessage, TopicMessage, User} = require "hubot" HTTPS = require "https" {inspect} = require "util" Connector = require "./connector" promise = require "./promises" class HipChat extends Adapter constructor: (robot) -> super robot @logger = robot.logger @rooms = {} reconnectTimer = null emote: (envelope, strings...) -> @send envelope, strings.map((str) -> "/me #{str}")... send: (envelope, strings...) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" for str in strings @connector.message target_jid, str topic: (envelope, message) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" @connector.topic target_jid, message reply: (envelope, strings...) -> user = if envelope.user then envelope.user else envelope @send envelope, "@#{user.mention_name} #{str}" for str in strings waitAndReconnect: -> if !@reconnectTimer delay = Math.round(Math.random() * (20 - 5) + 5) @logger.info "Waiting #{delay}s and then retrying..." @reconnectTimer = setTimeout () => @logger.info "Attempting to reconnect..." delete @reconnectTimer @connector.connect() , delay * 1000 run: -> botjid = process.env.HUBOT_HIPCHAT_JID if not botjid throw new Error("Environment variable HUBOT_HIPCHAT_JID is required to contain your bot's user JID.") botpw = process.env.HUBOT_HIPCHAT_PASSWORD if not botpw throw new Error("Environment variable HUBOT_HIPCHAT_PASSWORD is required to contain your bot's user password.") @options = jid: botjid password: botpw token: process.env.HUBOT_HIPCHAT_TOKEN or null rooms: process.env.HUBOT_HIPCHAT_ROOMS or "All" rooms_blacklist: process.env.HUBOT_HIPCHAT_ROOMS_BLACKLIST or "" rooms_join_public: process.env.HUBOT_HIPCHAT_JOIN_PUBLIC_ROOMS isnt "false" host: process.env.HUBOT_HIPCHAT_HOST or null bosh: { url: process.env.HUBOT_HIPCHAT_BOSH_URL or null } autojoin: process.env.HUBOT_HIPCHAT_JOIN_ROOMS_ON_INVITE isnt "false" xmppDomain: process.env.HUBOT_HIPCHAT_XMPP_DOMAIN or null reconnect: process.env.HUBOT_HIPCHAT_RECONNECT isnt "false" @logger.debug "HipChat adapter options: #{JSON.stringify @options}" # create Connector object connector = new Connector jid: @options.jid password: @options.password host: @options.host logger: @logger xmppDomain: @options.xmppDomain bosh: @options.bosh host = if @options.host then @options.host else "hipchat.com" @logger.info "Connecting HipChat adapter..." init = promise() connector.onTopic (channel, from, message) => @logger.info "Topic change: " + message author = getAuthor: => @robot.brain.userForName(from) or new User(from) author.room = @rooms[channel].name @receive new TopicMessage(author, message, 'id') connector.onDisconnect => @logger.info "Disconnected from #{host}" if @options.reconnect @waitAndReconnect() connector.onError => @logger.error [].slice.call(arguments).map(inspect).join(", ") if @options.reconnect @waitAndReconnect() firstTime = true connector.onConnect => @logger.info "Connected to #{host} as @#{connector.mention_name}" # Provide our name to Hubot @robot.name = connector.mention_name # Tell Hubot we're connected so it can load scripts if firstTime @emit "connected" @logger.debug "Sending connected event" saveUsers = (users) => # Save users to brain for user in users user.id = @userIdFromJid user.jid # userForId will not merge to an existing user if user.id of @robot.brain.data.users oldUser = @robot.brain.data.users[user.id] for key, value of oldUser unless key of user user[key] = value delete @robot.brain.data.users[user.id] @robot.brain.userForId user.id, user setRooms = (callback) => connector.getRooms (err, rooms, stanza) => if rooms for room in rooms @rooms[room.jid] = room else return @logger.error "Can't list rooms: #{errmsg err}" if callback? callback() joinRoom = (jid) => if jid and typeof jid is "object" jid = "#{jid.local}@#{jid.domain}" if jid in @options.rooms_blacklist.split(",") @logger.info "Not joining #{jid} because it is blacklisted" return @logger.info "Joining #{jid}" connector.join jid # Fetch user info connector.getRoster (err, users, stanza) => return init.reject err if err init.resolve users init .done (users) => saveUsers(users) setRooms => # Join requested rooms if @options.rooms is "All" or @options.rooms is "@All" for _, room of @rooms if !@options.rooms_join_public && room.guest_url != '' @logger.info "Not joining #{room.jid} because it is a public room" else joinRoom room.jid # Join all rooms else for room_jid in @options.rooms.split "," joinRoom room_jid .fail (err) => @logger.error "Can't list users: #{errmsg err}" if err connector.onRosterChange (users) => saveUsers(users) connector.onRoomPushes (room) => if @options.rooms is "All" or @options.rooms is "@All" if !@rooms[room.jid] joinRoom room.jid @rooms[room.jid] = room connector.onRoomDeleted (jid) => delete @rooms[jid] handleMessage = (opts) => # buffer message events until the roster fetch completes # to ensure user data is properly loaded init.done => {getAuthor, message, reply_to, room} = opts author = Object.create(getAuthor()) or {} author.reply_to = reply_to author.room = room @receive new TextMessage(author, message) if firstTime connector.onMessage (channel, from, message) => # reformat leading @mention name to be like "name: message" which is # what hubot expects mention_name = connector.mention_name regex = new RegExp "^@#{mention_name}\\b", "i" message = message.replace regex, "#{mention_name}: " handleMessage getAuthor: => @robot.brain.userForName(from) or new User(from) message: message reply_to: channel room: @rooms[channel].name connector.onPrivateMessage (from, message) => # remove leading @mention name if present and format the message like # "name: message" which is what hubot expects mention_name = connector.mention_name regex = new RegExp "^@?#{mention_name}\\b", "i" message = "#{mention_name}: #{message.replace regex, ""}" handleMessage getAuthor: => @robot.brain.userForId(@userIdFromJid from) message: message reply_to: from changePresence = (PresenceMessage, user_jid, room_jid, currentName) => # buffer presence events until the roster fetch completes # to ensure user data is properly loaded init.done => user = @robot.brain.userForId(@userIdFromJid(user_jid)) or {} if user user.room = room_jid # If an updated name was sent as part of a presence, update it now user.name = currentName if currentName.length @receive new PresenceMessage(user) if firstTime connector.onEnter (user_jid, room_jid, currentName) => changePresence EnterMessage, user_jid, room_jid, currentName connector.onLeave (user_jid, room_jid) -> changePresence LeaveMessage, user_jid, room_jid connector.onInvite (room_jid, from_jid, message) => action = if @options.autojoin then "joining" else "ignoring" @logger.info "Got invite to #{room_jid} from #{from_jid} - #{action}" joinRoom(room_jid) if @options.autojoin connector.getRoom room_jid, (err, room) => @rooms[room.jid] = room firstTime = false connector.connect() @connector = connector userIdFromJid: (jid) -> try jid.match(/^\d+_(\d+)@chat\./)[1] catch e @logger.error "Bad user JID: #{jid}" roomJidFromName: (name) -> for _, room of @rooms if room.name == name return room.jid targetJid: (user, room) -> # most common case - we're replying to a user in a room or 1-1 user?.reply_to or # allows user objects to be passed in user?.jid or if user?.search?(/@/) >= 0 user # allows user to be a jid string else @robot.brain.userForName(room)?.jid or @roomJidFromName(room) or room # this will happen if someone uses robot.messageRoom(jid, ...) # Convenience HTTP Methods for posting on behalf of the token'd user get: (path, callback) -> @request "GET", path, null, callback post: (path, body, callback) -> @request "POST", path, body, callback request: (method, path, body, callback) -> @logger.debug "Request:", method, path, body host = @options.host or "api.hipchat.com" headers = "Host": host unless @options.token return callback "No API token provided to Hubot", null options = agent : false host : host port : 443 path : path += "?auth_token=#{@options.token}" method : method headers: headers if method is "POST" headers["Content-Type"] = "application/x-www-form-urlencoded" options.headers["Content-Length"] = body.length request = HTTPS.request options, (response) => data = "" response.on "data", (chunk) -> data += chunk response.on "end", => if response.statusCode >= 400 @logger.error "HipChat API error: #{response.statusCode}" try callback null, JSON.parse(data) catch err callback null, data or { } response.on "error", (err) -> callback err, null if method is "POST" request.end(body, "binary") else request.end() request.on "error", (err) => @logger.error err @logger.error err.stack if err.stack callback err errmsg = (err) -> err + (if err.stack then '\n' + err.stack else '') exports.use = (robot) -> new HipChat robot
45214
{Adapter, TextMessage, EnterMessage, LeaveMessage, TopicMessage, User} = require "hubot" HTTPS = require "https" {inspect} = require "util" Connector = require "./connector" promise = require "./promises" class HipChat extends Adapter constructor: (robot) -> super robot @logger = robot.logger @rooms = {} reconnectTimer = null emote: (envelope, strings...) -> @send envelope, strings.map((str) -> "/me #{str}")... send: (envelope, strings...) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" for str in strings @connector.message target_jid, str topic: (envelope, message) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" @connector.topic target_jid, message reply: (envelope, strings...) -> user = if envelope.user then envelope.user else envelope @send envelope, "@#{user.mention_name} #{str}" for str in strings waitAndReconnect: -> if !@reconnectTimer delay = Math.round(Math.random() * (20 - 5) + 5) @logger.info "Waiting #{delay}s and then retrying..." @reconnectTimer = setTimeout () => @logger.info "Attempting to reconnect..." delete @reconnectTimer @connector.connect() , delay * 1000 run: -> botjid = process.env.HUBOT_HIPCHAT_JID if not botjid throw new Error("Environment variable HUBOT_HIPCHAT_JID is required to contain your bot's user JID.") botpw = process.env.HUBOT_HIPCHAT_PASSWORD if not botpw throw new Error("Environment variable HUBOT_HIPCHAT_PASSWORD is required to contain your bot's user password.") @options = jid: botjid password: <PASSWORD> token: process.env.HUBOT_HIPCHAT_TOKEN or null rooms: process.env.HUBOT_HIPCHAT_ROOMS or "All" rooms_blacklist: process.env.HUBOT_HIPCHAT_ROOMS_BLACKLIST or "" rooms_join_public: process.env.HUBOT_HIPCHAT_JOIN_PUBLIC_ROOMS isnt "false" host: process.env.HUBOT_HIPCHAT_HOST or null bosh: { url: process.env.HUBOT_HIPCHAT_BOSH_URL or null } autojoin: process.env.HUBOT_HIPCHAT_JOIN_ROOMS_ON_INVITE isnt "false" xmppDomain: process.env.HUBOT_HIPCHAT_XMPP_DOMAIN or null reconnect: process.env.HUBOT_HIPCHAT_RECONNECT isnt "false" @logger.debug "HipChat adapter options: #{JSON.stringify @options}" # create Connector object connector = new Connector jid: @options.jid password: <PASSWORD> host: @options.host logger: @logger xmppDomain: @options.xmppDomain bosh: @options.bosh host = if @options.host then @options.host else "hipchat.com" @logger.info "Connecting HipChat adapter..." init = promise() connector.onTopic (channel, from, message) => @logger.info "Topic change: " + message author = getAuthor: => @robot.brain.userForName(from) or new User(from) author.room = @rooms[channel].name @receive new TopicMessage(author, message, 'id') connector.onDisconnect => @logger.info "Disconnected from #{host}" if @options.reconnect @waitAndReconnect() connector.onError => @logger.error [].slice.call(arguments).map(inspect).join(", ") if @options.reconnect @waitAndReconnect() firstTime = true connector.onConnect => @logger.info "Connected to #{host} as @#{connector.mention_name}" # Provide our name to Hubot @robot.name = connector.mention_name # Tell Hubot we're connected so it can load scripts if firstTime @emit "connected" @logger.debug "Sending connected event" saveUsers = (users) => # Save users to brain for user in users user.id = @userIdFromJid user.jid # userForId will not merge to an existing user if user.id of @robot.brain.data.users oldUser = @robot.brain.data.users[user.id] for key, value of oldUser unless key of user user[key] = value delete @robot.brain.data.users[user.id] @robot.brain.userForId user.id, user setRooms = (callback) => connector.getRooms (err, rooms, stanza) => if rooms for room in rooms @rooms[room.jid] = room else return @logger.error "Can't list rooms: #{errmsg err}" if callback? callback() joinRoom = (jid) => if jid and typeof jid is "object" jid = "#{jid.local}@#{jid.domain}" if jid in @options.rooms_blacklist.split(",") @logger.info "Not joining #{jid} because it is blacklisted" return @logger.info "Joining #{jid}" connector.join jid # Fetch user info connector.getRoster (err, users, stanza) => return init.reject err if err init.resolve users init .done (users) => saveUsers(users) setRooms => # Join requested rooms if @options.rooms is "All" or @options.rooms is "@All" for _, room of @rooms if !@options.rooms_join_public && room.guest_url != '' @logger.info "Not joining #{room.jid} because it is a public room" else joinRoom room.jid # Join all rooms else for room_jid in @options.rooms.split "," joinRoom room_jid .fail (err) => @logger.error "Can't list users: #{errmsg err}" if err connector.onRosterChange (users) => saveUsers(users) connector.onRoomPushes (room) => if @options.rooms is "All" or @options.rooms is "@All" if !@rooms[room.jid] joinRoom room.jid @rooms[room.jid] = room connector.onRoomDeleted (jid) => delete @rooms[jid] handleMessage = (opts) => # buffer message events until the roster fetch completes # to ensure user data is properly loaded init.done => {getAuthor, message, reply_to, room} = opts author = Object.create(getAuthor()) or {} author.reply_to = reply_to author.room = room @receive new TextMessage(author, message) if firstTime connector.onMessage (channel, from, message) => # reformat leading @mention name to be like "name: message" which is # what hubot expects mention_name = connector.mention_name regex = new RegExp "^@#{mention_name}\\b", "i" message = message.replace regex, "#{mention_name}: " handleMessage getAuthor: => @robot.brain.userForName(from) or new User(from) message: message reply_to: channel room: @rooms[channel].name connector.onPrivateMessage (from, message) => # remove leading @mention name if present and format the message like # "name: message" which is what hubot expects mention_name = connector.mention_name regex = new RegExp "^@?#{mention_name}\\b", "i" message = "#{mention_name}: #{message.replace regex, ""}" handleMessage getAuthor: => @robot.brain.userForId(@userIdFromJid from) message: message reply_to: from changePresence = (PresenceMessage, user_jid, room_jid, currentName) => # buffer presence events until the roster fetch completes # to ensure user data is properly loaded init.done => user = @robot.brain.userForId(@userIdFromJid(user_jid)) or {} if user user.room = room_jid # If an updated name was sent as part of a presence, update it now user.name = <NAME>Name if currentName.length @receive new PresenceMessage(user) if firstTime connector.onEnter (user_jid, room_jid, currentName) => changePresence EnterMessage, user_jid, room_jid, currentName connector.onLeave (user_jid, room_jid) -> changePresence LeaveMessage, user_jid, room_jid connector.onInvite (room_jid, from_jid, message) => action = if @options.autojoin then "joining" else "ignoring" @logger.info "Got invite to #{room_jid} from #{from_jid} - #{action}" joinRoom(room_jid) if @options.autojoin connector.getRoom room_jid, (err, room) => @rooms[room.jid] = room firstTime = false connector.connect() @connector = connector userIdFromJid: (jid) -> try jid.match(/^\d+_(\d+)@chat\./)[1] catch e @logger.error "Bad user JID: #{jid}" roomJidFromName: (name) -> for _, room of @rooms if room.name == name return room.jid targetJid: (user, room) -> # most common case - we're replying to a user in a room or 1-1 user?.reply_to or # allows user objects to be passed in user?.jid or if user?.search?(/@/) >= 0 user # allows user to be a jid string else @robot.brain.userForName(room)?.jid or @roomJidFromName(room) or room # this will happen if someone uses robot.messageRoom(jid, ...) # Convenience HTTP Methods for posting on behalf of the token'd user get: (path, callback) -> @request "GET", path, null, callback post: (path, body, callback) -> @request "POST", path, body, callback request: (method, path, body, callback) -> @logger.debug "Request:", method, path, body host = @options.host or "api.hipchat.com" headers = "Host": host unless @options.token return callback "No API token provided to Hubot", null options = agent : false host : host port : 443 path : path += "?auth_token=#{@options.token}" method : method headers: headers if method is "POST" headers["Content-Type"] = "application/x-www-form-urlencoded" options.headers["Content-Length"] = body.length request = HTTPS.request options, (response) => data = "" response.on "data", (chunk) -> data += chunk response.on "end", => if response.statusCode >= 400 @logger.error "HipChat API error: #{response.statusCode}" try callback null, JSON.parse(data) catch err callback null, data or { } response.on "error", (err) -> callback err, null if method is "POST" request.end(body, "binary") else request.end() request.on "error", (err) => @logger.error err @logger.error err.stack if err.stack callback err errmsg = (err) -> err + (if err.stack then '\n' + err.stack else '') exports.use = (robot) -> new HipChat robot
true
{Adapter, TextMessage, EnterMessage, LeaveMessage, TopicMessage, User} = require "hubot" HTTPS = require "https" {inspect} = require "util" Connector = require "./connector" promise = require "./promises" class HipChat extends Adapter constructor: (robot) -> super robot @logger = robot.logger @rooms = {} reconnectTimer = null emote: (envelope, strings...) -> @send envelope, strings.map((str) -> "/me #{str}")... send: (envelope, strings...) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" for str in strings @connector.message target_jid, str topic: (envelope, message) -> {user, room} = envelope user = envelope if not user # pre-2.4.2 style target_jid = @targetJid user, room if not target_jid return @logger.error "ERROR: Not sure who to send to: envelope=#{inspect envelope}" @connector.topic target_jid, message reply: (envelope, strings...) -> user = if envelope.user then envelope.user else envelope @send envelope, "@#{user.mention_name} #{str}" for str in strings waitAndReconnect: -> if !@reconnectTimer delay = Math.round(Math.random() * (20 - 5) + 5) @logger.info "Waiting #{delay}s and then retrying..." @reconnectTimer = setTimeout () => @logger.info "Attempting to reconnect..." delete @reconnectTimer @connector.connect() , delay * 1000 run: -> botjid = process.env.HUBOT_HIPCHAT_JID if not botjid throw new Error("Environment variable HUBOT_HIPCHAT_JID is required to contain your bot's user JID.") botpw = process.env.HUBOT_HIPCHAT_PASSWORD if not botpw throw new Error("Environment variable HUBOT_HIPCHAT_PASSWORD is required to contain your bot's user password.") @options = jid: botjid password: PI:PASSWORD:<PASSWORD>END_PI token: process.env.HUBOT_HIPCHAT_TOKEN or null rooms: process.env.HUBOT_HIPCHAT_ROOMS or "All" rooms_blacklist: process.env.HUBOT_HIPCHAT_ROOMS_BLACKLIST or "" rooms_join_public: process.env.HUBOT_HIPCHAT_JOIN_PUBLIC_ROOMS isnt "false" host: process.env.HUBOT_HIPCHAT_HOST or null bosh: { url: process.env.HUBOT_HIPCHAT_BOSH_URL or null } autojoin: process.env.HUBOT_HIPCHAT_JOIN_ROOMS_ON_INVITE isnt "false" xmppDomain: process.env.HUBOT_HIPCHAT_XMPP_DOMAIN or null reconnect: process.env.HUBOT_HIPCHAT_RECONNECT isnt "false" @logger.debug "HipChat adapter options: #{JSON.stringify @options}" # create Connector object connector = new Connector jid: @options.jid password: PI:PASSWORD:<PASSWORD>END_PI host: @options.host logger: @logger xmppDomain: @options.xmppDomain bosh: @options.bosh host = if @options.host then @options.host else "hipchat.com" @logger.info "Connecting HipChat adapter..." init = promise() connector.onTopic (channel, from, message) => @logger.info "Topic change: " + message author = getAuthor: => @robot.brain.userForName(from) or new User(from) author.room = @rooms[channel].name @receive new TopicMessage(author, message, 'id') connector.onDisconnect => @logger.info "Disconnected from #{host}" if @options.reconnect @waitAndReconnect() connector.onError => @logger.error [].slice.call(arguments).map(inspect).join(", ") if @options.reconnect @waitAndReconnect() firstTime = true connector.onConnect => @logger.info "Connected to #{host} as @#{connector.mention_name}" # Provide our name to Hubot @robot.name = connector.mention_name # Tell Hubot we're connected so it can load scripts if firstTime @emit "connected" @logger.debug "Sending connected event" saveUsers = (users) => # Save users to brain for user in users user.id = @userIdFromJid user.jid # userForId will not merge to an existing user if user.id of @robot.brain.data.users oldUser = @robot.brain.data.users[user.id] for key, value of oldUser unless key of user user[key] = value delete @robot.brain.data.users[user.id] @robot.brain.userForId user.id, user setRooms = (callback) => connector.getRooms (err, rooms, stanza) => if rooms for room in rooms @rooms[room.jid] = room else return @logger.error "Can't list rooms: #{errmsg err}" if callback? callback() joinRoom = (jid) => if jid and typeof jid is "object" jid = "#{jid.local}@#{jid.domain}" if jid in @options.rooms_blacklist.split(",") @logger.info "Not joining #{jid} because it is blacklisted" return @logger.info "Joining #{jid}" connector.join jid # Fetch user info connector.getRoster (err, users, stanza) => return init.reject err if err init.resolve users init .done (users) => saveUsers(users) setRooms => # Join requested rooms if @options.rooms is "All" or @options.rooms is "@All" for _, room of @rooms if !@options.rooms_join_public && room.guest_url != '' @logger.info "Not joining #{room.jid} because it is a public room" else joinRoom room.jid # Join all rooms else for room_jid in @options.rooms.split "," joinRoom room_jid .fail (err) => @logger.error "Can't list users: #{errmsg err}" if err connector.onRosterChange (users) => saveUsers(users) connector.onRoomPushes (room) => if @options.rooms is "All" or @options.rooms is "@All" if !@rooms[room.jid] joinRoom room.jid @rooms[room.jid] = room connector.onRoomDeleted (jid) => delete @rooms[jid] handleMessage = (opts) => # buffer message events until the roster fetch completes # to ensure user data is properly loaded init.done => {getAuthor, message, reply_to, room} = opts author = Object.create(getAuthor()) or {} author.reply_to = reply_to author.room = room @receive new TextMessage(author, message) if firstTime connector.onMessage (channel, from, message) => # reformat leading @mention name to be like "name: message" which is # what hubot expects mention_name = connector.mention_name regex = new RegExp "^@#{mention_name}\\b", "i" message = message.replace regex, "#{mention_name}: " handleMessage getAuthor: => @robot.brain.userForName(from) or new User(from) message: message reply_to: channel room: @rooms[channel].name connector.onPrivateMessage (from, message) => # remove leading @mention name if present and format the message like # "name: message" which is what hubot expects mention_name = connector.mention_name regex = new RegExp "^@?#{mention_name}\\b", "i" message = "#{mention_name}: #{message.replace regex, ""}" handleMessage getAuthor: => @robot.brain.userForId(@userIdFromJid from) message: message reply_to: from changePresence = (PresenceMessage, user_jid, room_jid, currentName) => # buffer presence events until the roster fetch completes # to ensure user data is properly loaded init.done => user = @robot.brain.userForId(@userIdFromJid(user_jid)) or {} if user user.room = room_jid # If an updated name was sent as part of a presence, update it now user.name = PI:NAME:<NAME>END_PIName if currentName.length @receive new PresenceMessage(user) if firstTime connector.onEnter (user_jid, room_jid, currentName) => changePresence EnterMessage, user_jid, room_jid, currentName connector.onLeave (user_jid, room_jid) -> changePresence LeaveMessage, user_jid, room_jid connector.onInvite (room_jid, from_jid, message) => action = if @options.autojoin then "joining" else "ignoring" @logger.info "Got invite to #{room_jid} from #{from_jid} - #{action}" joinRoom(room_jid) if @options.autojoin connector.getRoom room_jid, (err, room) => @rooms[room.jid] = room firstTime = false connector.connect() @connector = connector userIdFromJid: (jid) -> try jid.match(/^\d+_(\d+)@chat\./)[1] catch e @logger.error "Bad user JID: #{jid}" roomJidFromName: (name) -> for _, room of @rooms if room.name == name return room.jid targetJid: (user, room) -> # most common case - we're replying to a user in a room or 1-1 user?.reply_to or # allows user objects to be passed in user?.jid or if user?.search?(/@/) >= 0 user # allows user to be a jid string else @robot.brain.userForName(room)?.jid or @roomJidFromName(room) or room # this will happen if someone uses robot.messageRoom(jid, ...) # Convenience HTTP Methods for posting on behalf of the token'd user get: (path, callback) -> @request "GET", path, null, callback post: (path, body, callback) -> @request "POST", path, body, callback request: (method, path, body, callback) -> @logger.debug "Request:", method, path, body host = @options.host or "api.hipchat.com" headers = "Host": host unless @options.token return callback "No API token provided to Hubot", null options = agent : false host : host port : 443 path : path += "?auth_token=#{@options.token}" method : method headers: headers if method is "POST" headers["Content-Type"] = "application/x-www-form-urlencoded" options.headers["Content-Length"] = body.length request = HTTPS.request options, (response) => data = "" response.on "data", (chunk) -> data += chunk response.on "end", => if response.statusCode >= 400 @logger.error "HipChat API error: #{response.statusCode}" try callback null, JSON.parse(data) catch err callback null, data or { } response.on "error", (err) -> callback err, null if method is "POST" request.end(body, "binary") else request.end() request.on "error", (err) => @logger.error err @logger.error err.stack if err.stack callback err errmsg = (err) -> err + (if err.stack then '\n' + err.stack else '') exports.use = (robot) -> new HipChat robot
[ { "context": " the registration form for new users.\n\n @author Sebastian Sachtleben\n###\nclass Signup extends FormView\n\n\tentity: 'ui/m", "end": 192, "score": 0.9998971819877625, "start": 172, "tag": "NAME", "value": "Sebastian Sachtleben" } ]
app/assets/javascripts/site/views/signup.coffee
ssachtleben/herowar
1
FormView = require 'views/formView' templates = require 'templates' app = require 'application' ### The Signup shows the registration form for new users. @author Sebastian Sachtleben ### class Signup extends FormView entity: 'ui/me' id: 'signup' template: templates.get 'signup.tmpl' url: '/api/signup' events: 'submit form' : 'submitForm' 'change #inputUsername' : 'validateUsername' 'change #inputPassword' : 'validatePassword' 'change #inputEmail' : 'validateEmail' bindEvents: -> @listenTo @model, 'change:isGuest change:isUser', @redirectToHome if @model onSuccess: (data, textStatus, jqXHR) -> console.log 'Success' @model.set data @model.validateResponse(data) app.navigate 'play', true onError: (jqXHR, textStatus, errorThrown) -> console.log 'Error' return window.location = '/play' if jqXHR.status is 200 console.log $.parseJSON(jqXHR.responseText) validateUsername: (event) -> if event $CurrentTarget = $ event.currentTarget username = $CurrentTarget.val() if username.length <= 4 @setInputState $CurrentTarget, 'error', 'Username must be at least 5 characters' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkUsername/#{username}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'This username looks great.' unless data @setInputState $CurrentTarget, 'error', 'This username is already taken.' if data validatePassword: (event) -> if event $CurrentTarget = $ event.currentTarget password = $CurrentTarget.val() if password.length <= 4 @setInputState $CurrentTarget, 'error', 'Password must be at least 5 characters' else @setInputState $CurrentTarget, 'success', 'Password is okay' validateEmail: (event) -> if event $CurrentTarget = $ event.currentTarget email = $CurrentTarget.val() regex = /\S+@\S+\.\S+/ if !regex.test(email) @setInputState $CurrentTarget, 'error', 'Doesn\'t look like a valid email.' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkEmail/#{email}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'Email is ok' unless data @setInputState $CurrentTarget, 'error', 'Email is taken' if data render: -> @redirectToHome() super() redirectToHome: -> if @model?.get 'isUser' app.navigate '', true return Signup
74803
FormView = require 'views/formView' templates = require 'templates' app = require 'application' ### The Signup shows the registration form for new users. @author <NAME> ### class Signup extends FormView entity: 'ui/me' id: 'signup' template: templates.get 'signup.tmpl' url: '/api/signup' events: 'submit form' : 'submitForm' 'change #inputUsername' : 'validateUsername' 'change #inputPassword' : 'validatePassword' 'change #inputEmail' : 'validateEmail' bindEvents: -> @listenTo @model, 'change:isGuest change:isUser', @redirectToHome if @model onSuccess: (data, textStatus, jqXHR) -> console.log 'Success' @model.set data @model.validateResponse(data) app.navigate 'play', true onError: (jqXHR, textStatus, errorThrown) -> console.log 'Error' return window.location = '/play' if jqXHR.status is 200 console.log $.parseJSON(jqXHR.responseText) validateUsername: (event) -> if event $CurrentTarget = $ event.currentTarget username = $CurrentTarget.val() if username.length <= 4 @setInputState $CurrentTarget, 'error', 'Username must be at least 5 characters' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkUsername/#{username}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'This username looks great.' unless data @setInputState $CurrentTarget, 'error', 'This username is already taken.' if data validatePassword: (event) -> if event $CurrentTarget = $ event.currentTarget password = $CurrentTarget.val() if password.length <= 4 @setInputState $CurrentTarget, 'error', 'Password must be at least 5 characters' else @setInputState $CurrentTarget, 'success', 'Password is okay' validateEmail: (event) -> if event $CurrentTarget = $ event.currentTarget email = $CurrentTarget.val() regex = /\S+@\S+\.\S+/ if !regex.test(email) @setInputState $CurrentTarget, 'error', 'Doesn\'t look like a valid email.' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkEmail/#{email}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'Email is ok' unless data @setInputState $CurrentTarget, 'error', 'Email is taken' if data render: -> @redirectToHome() super() redirectToHome: -> if @model?.get 'isUser' app.navigate '', true return Signup
true
FormView = require 'views/formView' templates = require 'templates' app = require 'application' ### The Signup shows the registration form for new users. @author PI:NAME:<NAME>END_PI ### class Signup extends FormView entity: 'ui/me' id: 'signup' template: templates.get 'signup.tmpl' url: '/api/signup' events: 'submit form' : 'submitForm' 'change #inputUsername' : 'validateUsername' 'change #inputPassword' : 'validatePassword' 'change #inputEmail' : 'validateEmail' bindEvents: -> @listenTo @model, 'change:isGuest change:isUser', @redirectToHome if @model onSuccess: (data, textStatus, jqXHR) -> console.log 'Success' @model.set data @model.validateResponse(data) app.navigate 'play', true onError: (jqXHR, textStatus, errorThrown) -> console.log 'Error' return window.location = '/play' if jqXHR.status is 200 console.log $.parseJSON(jqXHR.responseText) validateUsername: (event) -> if event $CurrentTarget = $ event.currentTarget username = $CurrentTarget.val() if username.length <= 4 @setInputState $CurrentTarget, 'error', 'Username must be at least 5 characters' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkUsername/#{username}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'This username looks great.' unless data @setInputState $CurrentTarget, 'error', 'This username is already taken.' if data validatePassword: (event) -> if event $CurrentTarget = $ event.currentTarget password = $CurrentTarget.val() if password.length <= 4 @setInputState $CurrentTarget, 'error', 'Password must be at least 5 characters' else @setInputState $CurrentTarget, 'success', 'Password is okay' validateEmail: (event) -> if event $CurrentTarget = $ event.currentTarget email = $CurrentTarget.val() regex = /\S+@\S+\.\S+/ if !regex.test(email) @setInputState $CurrentTarget, 'error', 'Doesn\'t look like a valid email.' else @setInputState $CurrentTarget, '', 'Valdating ...' $.ajax dataType: @dataType type: @type url: "/api/checkEmail/#{email}" success: (data, textStatus, jqXHR) => @setInputState $CurrentTarget, 'success', 'Email is ok' unless data @setInputState $CurrentTarget, 'error', 'Email is taken' if data render: -> @redirectToHome() super() redirectToHome: -> if @model?.get 'isUser' app.navigate '', true return Signup
[ { "context": "y', ->\n describe 'vowel recognition', ->\n it \"adam\", ->\n name = \"Adam\"\n Duggarify.vowel(na", "end": 108, "score": 0.9917498230934143, "start": 104, "tag": "NAME", "value": "adam" }, { "context": " recognition', ->\n it \"adam\", ->\n name = \"Adam\"\n Duggarify.vowel(name).should.eq true\n i", "end": 132, "score": 0.9993689656257629, "start": 128, "tag": "NAME", "value": "Adam" }, { "context": " Duggarify.vowel(name).should.eq true\n it \"ellen\", ->\n name = \"ellen\"\n Duggarify.vowel(n", "end": 190, "score": 0.9479718208312988, "start": 185, "tag": "NAME", "value": "ellen" }, { "context": ").should.eq true\n it \"ellen\", ->\n name = \"ellen\"\n Duggarify.vowel(name).should.eq true\n i", "end": 215, "score": 0.9981042146682739, "start": 210, "tag": "NAME", "value": "ellen" }, { "context": " Duggarify.vowel(name).should.eq true\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.vowel(n", "end": 273, "score": 0.598878026008606, "start": 268, "tag": "NAME", "value": "lacey" }, { "context": ").should.eq true\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.vowel(name).should.eq false\n\n d", "end": 298, "score": 0.9983377456665039, "start": 293, "tag": "NAME", "value": "lacey" }, { "context": "scribe 'double consonant recognition', ->\n it \"scott\", ->\n name = \"scott\"\n Duggarify.double_", "end": 404, "score": 0.9925493001937866, "start": 399, "tag": "NAME", "value": "scott" }, { "context": "recognition', ->\n it \"scott\", ->\n name = \"scott\"\n Duggarify.double_cons(name).should.eq true", "end": 429, "score": 0.9986639618873596, "start": 424, "tag": "NAME", "value": "scott" }, { "context": "uggarify.double_cons(name).should.eq true\n it \"adam\", ->\n name = \"adam\"\n Duggarify.double_c", "end": 492, "score": 0.96058189868927, "start": 488, "tag": "NAME", "value": "adam" }, { "context": "e).should.eq true\n it \"adam\", ->\n name = \"adam\"\n Duggarify.double_cons(name).should.eq fals", "end": 516, "score": 0.9988922476768494, "start": 512, "tag": "NAME", "value": "adam" }, { "context": "ggarify.double_cons(name).should.eq false\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.double_", "end": 581, "score": 0.9465281367301941, "start": 576, "tag": "NAME", "value": "lacey" }, { "context": ".should.eq false\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.double_cons(name).should.eq fals", "end": 606, "score": 0.9981825351715088, "start": 601, "tag": "NAME", "value": "lacey" }, { "context": ".eq false\n\n describe 'J recognition', ->\n it \"jane-claire\", ->\n name = \"jane-claire\"\n Duggarify.j", "end": 709, "score": 0.9834307432174683, "start": 698, "tag": "NAME", "value": "jane-claire" }, { "context": "ition', ->\n it \"jane-claire\", ->\n name = \"jane-claire\"\n Duggarify.j_start(name).should.eq true\n ", "end": 740, "score": 0.9989892244338989, "start": 729, "tag": "NAME", "value": "jane-claire" }, { "context": " Duggarify.j_start(name).should.eq true\n it \"adam\", ->\n name = \"adam\"\n Duggarify.j_start(", "end": 799, "score": 0.9866881370544434, "start": 795, "tag": "NAME", "value": "adam" }, { "context": "e).should.eq true\n it \"adam\", ->\n name = \"adam\"\n Duggarify.j_start(name).should.eq false\n\n ", "end": 823, "score": 0.9991189241409302, "start": 819, "tag": "NAME", "value": "adam" }, { "context": "hould.eq false\n\n describe 'existing', ->\n it \"joshua\", ->\n name = \"joshua\"\n Duggarify.exists", "end": 912, "score": 0.9814789891242981, "start": 906, "tag": "NAME", "value": "joshua" }, { "context": " 'existing', ->\n it \"joshua\", ->\n name = \"joshua\"\n Duggarify.exists(name).should.eq true\n ", "end": 938, "score": 0.998673141002655, "start": 932, "tag": "NAME", "value": "joshua" }, { "context": "e).should.eq true\n it \"adam\", ->\n name = \"adam\"\n Duggarify.exists(name).should.eq false\n ", "end": 1020, "score": 0.9987910389900208, "start": 1016, "tag": "NAME", "value": "adam" }, { "context": " Duggarify.exists(name).should.eq false\n it \"michelle\", ->\n name = \"michelle\"\n Duggarify.exis", "end": 1083, "score": 0.993546724319458, "start": 1075, "tag": "NAME", "value": "michelle" }, { "context": "ould.eq false\n it \"michelle\", ->\n name = \"michelle\"\n Duggarify.exists(name).should.eq true\n\n d", "end": 1111, "score": 0.9992766380310059, "start": 1103, "tag": "NAME", "value": "michelle" }, { "context": "eq true\n\n describe 'duggarification', ->\n it \"scott\", ->\n name = \"scott\"\n Duggarify.name(na", "end": 1204, "score": 0.9929574131965637, "start": 1199, "tag": "NAME", "value": "scott" }, { "context": "arification', ->\n it \"scott\", ->\n name = \"scott\"\n Duggarify.name(name).should.eq \"J'cott\"\n ", "end": 1229, "score": 0.9985821843147278, "start": 1224, "tag": "NAME", "value": "scott" }, { "context": "e = \"scott\"\n Duggarify.name(name).should.eq \"J'cott\"\n it \"adam\", ->\n name = \"adam\"\n Dugg", "end": 1275, "score": 0.998274564743042, "start": 1269, "tag": "NAME", "value": "J'cott" }, { "context": "hould.eq \"J'cott\"\n it \"adam\", ->\n name = \"adam\"\n Duggarify.name(name).should.eq \"Jadam\"\n ", "end": 1313, "score": 0.9983839988708496, "start": 1309, "tag": "NAME", "value": "adam" }, { "context": "me = \"adam\"\n Duggarify.name(name).should.eq \"Jadam\"\n it \"lacey\", ->\n name = \"lacey\"\n Du", "end": 1358, "score": 0.9972387552261353, "start": 1353, "tag": "NAME", "value": "Jadam" }, { "context": " Duggarify.name(name).should.eq \"Jadam\"\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.name(n", "end": 1372, "score": 0.811852753162384, "start": 1368, "tag": "NAME", "value": "lace" }, { "context": "hould.eq \"Jadam\"\n it \"lacey\", ->\n name = \"lacey\"\n Duggarify.name(name).should.eq \"Jacey\"\n ", "end": 1398, "score": 0.998714804649353, "start": 1393, "tag": "NAME", "value": "lacey" }, { "context": "e = \"lacey\"\n Duggarify.name(name).should.eq \"Jacey\"\n it \"johannah\", ->\n name = \"johannah\"\n ", "end": 1443, "score": 0.9859180450439453, "start": 1438, "tag": "NAME", "value": "Jacey" }, { "context": " Duggarify.name(name).should.eq \"Jacey\"\n it \"johannah\", ->\n name = \"johannah\"\n Duggarify.name", "end": 1461, "score": 0.9957072734832764, "start": 1453, "tag": "NAME", "value": "johannah" }, { "context": "ld.eq \"Jacey\"\n it \"johannah\", ->\n name = \"johannah\"\n Duggarify.name(name).should.eq \"Johannah F", "end": 1489, "score": 0.9993267059326172, "start": 1481, "tag": "NAME", "value": "johannah" }, { "context": " \"johannah\"\n Duggarify.name(name).should.eq \"Johannah Faith\"\n it \"jane-claire\", ->\n name = \"Jan", "end": 1537, "score": 0.997424840927124, "start": 1529, "tag": "NAME", "value": "Johannah" }, { "context": "ah\"\n Duggarify.name(name).should.eq \"Johannah Faith\"\n it \"jane-claire\", ->\n name = \"Jane-Clai", "end": 1543, "score": 0.7653983235359192, "start": 1538, "tag": "NAME", "value": "Faith" }, { "context": "ify.name(name).should.eq \"Johannah Faith\"\n it \"jane-claire\", ->\n name = \"Jane-Claire\"\n Duggarify.n", "end": 1564, "score": 0.9992004632949829, "start": 1553, "tag": "NAME", "value": "jane-claire" }, { "context": "nah Faith\"\n it \"jane-claire\", ->\n name = \"Jane-Claire\"\n Duggarify.name(name).should.eq \"Jane-Clair", "end": 1595, "score": 0.9997967481613159, "start": 1584, "tag": "NAME", "value": "Jane-Claire" }, { "context": "ane-Claire\"\n Duggarify.name(name).should.eq \"Jane-Claire Bob\"\n it \"michelle\", ->\n name = \"michelle\"\n ", "end": 1650, "score": 0.9996147751808167, "start": 1635, "tag": "NAME", "value": "Jane-Claire Bob" }, { "context": "name(name).should.eq \"Jane-Claire Bob\"\n it \"michelle\", ->\n name = \"michelle\"\n Duggarify.name", "end": 1668, "score": 0.998434841632843, "start": 1663, "tag": "NAME", "value": "helle" }, { "context": "e-Claire Bob\"\n it \"michelle\", ->\n name = \"michelle\"\n Duggarify.name(name).should.eq \"Michelle\"\n", "end": 1696, "score": 0.9997690320014954, "start": 1688, "tag": "NAME", "value": "michelle" }, { "context": " \"michelle\"\n Duggarify.name(name).should.eq \"Michelle\"\n it \"grandma\", ->\n name = \"grandma\"\n ", "end": 1744, "score": 0.9997525215148926, "start": 1736, "tag": "NAME", "value": "Michelle" }, { "context": "Duggarify.name(name).should.eq \"Michelle\"\n it \"grandma\", ->\n name = \"grandma\"\n Duggarify.name(", "end": 1761, "score": 0.8702236413955688, "start": 1754, "tag": "NAME", "value": "grandma" }, { "context": ".eq \"Michelle\"\n it \"grandma\", ->\n name = \"grandma\"\n Duggarify.name(name).should.eq \"Grandma\"\n\n", "end": 1788, "score": 0.9996724128723145, "start": 1781, "tag": "NAME", "value": "grandma" }, { "context": "= \"grandma\"\n Duggarify.name(name).should.eq \"Grandma\"\n\n", "end": 1835, "score": 0.9983553886413574, "start": 1828, "tag": "NAME", "value": "Grandma" } ]
src/javascript/__tests__/duaggarify-spec.coffee
adampash/dug_name_generator
0
Duggarify = require '../duggarify' describe 'Duggarify', -> describe 'vowel recognition', -> it "adam", -> name = "Adam" Duggarify.vowel(name).should.eq true it "ellen", -> name = "ellen" Duggarify.vowel(name).should.eq true it "lacey", -> name = "lacey" Duggarify.vowel(name).should.eq false describe 'double consonant recognition', -> it "scott", -> name = "scott" Duggarify.double_cons(name).should.eq true it "adam", -> name = "adam" Duggarify.double_cons(name).should.eq false it "lacey", -> name = "lacey" Duggarify.double_cons(name).should.eq false describe 'J recognition', -> it "jane-claire", -> name = "jane-claire" Duggarify.j_start(name).should.eq true it "adam", -> name = "adam" Duggarify.j_start(name).should.eq false describe 'existing', -> it "joshua", -> name = "joshua" Duggarify.exists(name).should.eq true it "adam", -> name = "adam" Duggarify.exists(name).should.eq false it "michelle", -> name = "michelle" Duggarify.exists(name).should.eq true describe 'duggarification', -> it "scott", -> name = "scott" Duggarify.name(name).should.eq "J'cott" it "adam", -> name = "adam" Duggarify.name(name).should.eq "Jadam" it "lacey", -> name = "lacey" Duggarify.name(name).should.eq "Jacey" it "johannah", -> name = "johannah" Duggarify.name(name).should.eq "Johannah Faith" it "jane-claire", -> name = "Jane-Claire" Duggarify.name(name).should.eq "Jane-Claire Bob" it "michelle", -> name = "michelle" Duggarify.name(name).should.eq "Michelle" it "grandma", -> name = "grandma" Duggarify.name(name).should.eq "Grandma"
120115
Duggarify = require '../duggarify' describe 'Duggarify', -> describe 'vowel recognition', -> it "<NAME>", -> name = "<NAME>" Duggarify.vowel(name).should.eq true it "<NAME>", -> name = "<NAME>" Duggarify.vowel(name).should.eq true it "<NAME>", -> name = "<NAME>" Duggarify.vowel(name).should.eq false describe 'double consonant recognition', -> it "<NAME>", -> name = "<NAME>" Duggarify.double_cons(name).should.eq true it "<NAME>", -> name = "<NAME>" Duggarify.double_cons(name).should.eq false it "<NAME>", -> name = "<NAME>" Duggarify.double_cons(name).should.eq false describe 'J recognition', -> it "<NAME>", -> name = "<NAME>" Duggarify.j_start(name).should.eq true it "<NAME>", -> name = "<NAME>" Duggarify.j_start(name).should.eq false describe 'existing', -> it "<NAME>", -> name = "<NAME>" Duggarify.exists(name).should.eq true it "adam", -> name = "<NAME>" Duggarify.exists(name).should.eq false it "<NAME>", -> name = "<NAME>" Duggarify.exists(name).should.eq true describe 'duggarification', -> it "<NAME>", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>" it "adam", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>" it "<NAME>y", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>" it "<NAME>", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME> <NAME>" it "<NAME>", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>" it "mic<NAME>", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>" it "<NAME>", -> name = "<NAME>" Duggarify.name(name).should.eq "<NAME>"
true
Duggarify = require '../duggarify' describe 'Duggarify', -> describe 'vowel recognition', -> it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.vowel(name).should.eq true it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.vowel(name).should.eq true it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.vowel(name).should.eq false describe 'double consonant recognition', -> it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.double_cons(name).should.eq true it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.double_cons(name).should.eq false it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.double_cons(name).should.eq false describe 'J recognition', -> it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.j_start(name).should.eq true it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.j_start(name).should.eq false describe 'existing', -> it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.exists(name).should.eq true it "adam", -> name = "PI:NAME:<NAME>END_PI" Duggarify.exists(name).should.eq false it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.exists(name).should.eq true describe 'duggarification', -> it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI" it "adam", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI" it "PI:NAME:<NAME>END_PIy", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI" it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI" it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI" it "micPI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI" it "PI:NAME:<NAME>END_PI", -> name = "PI:NAME:<NAME>END_PI" Duggarify.name(name).should.eq "PI:NAME:<NAME>END_PI"
[ { "context": "8dd34438842e2db000005\"\n\t\t@allUserIds = [\"13213\", \"dsadas\", \"djsaiud89\"]\n\t\t@subscription = subscription =\n\t", "end": 543, "score": 0.772756814956665, "start": 537, "tag": "PASSWORD", "value": "dsadas" }, { "context": "2e2db000005\"\n\t\t@allUserIds = [\"13213\", \"dsadas\", \"djsaiud89\"]\n\t\t@subscription = subscription =\n\t\t\tadmin_id: @", "end": 556, "score": 0.9126100540161133, "start": 547, "tag": "PASSWORD", "value": "djsaiud89" }, { "context": "@subscription = subscription =\n\t\t\tadmin_id: @adminUser._id\n\t\t\tmember_ids: @allUserIds\n\t\t\tsave: sinon.stu", "end": 615, "score": 0.5376001000404358, "start": 611, "tag": "USERNAME", "value": "User" }, { "context": "scriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true\n\t\t\t\t@SubscriptionUpdater._", "end": 2632, "score": 0.7177772521972656, "start": 2623, "tag": "USERNAME", "value": "adminUser" }, { "context": "scriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true\n\t\t\t\t@SubscriptionUpdat", "end": 3133, "score": 0.5202178359031677, "start": 3128, "tag": "USERNAME", "value": "admin" }, { "context": "riptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true\n\t\t\t\tdone()\n\n\t\tit \"should r", "end": 4225, "score": 0.9746082425117493, "start": 4215, "tag": "USERNAME", "value": "@adminUser" }, { "context": "riptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true\n\t\t\t\tdone()\n\n\t\tit \"should u", "end": 4660, "score": 0.9988913536071777, "start": 4650, "tag": "USERNAME", "value": "@adminUser" }, { "context": "riptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true\n\t\t\t\t@SubscriptionUpdater._", "end": 4921, "score": 0.9988871216773987, "start": 4911, "tag": "USERNAME", "value": "@adminUser" }, { "context": "ptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[0]).should.equal true\n\t\t\t\t@SubscriptionUpdater", "end": 5014, "score": 0.6136534214019775, "start": 5007, "tag": "USERNAME", "value": "allUser" }, { "context": "ptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[1]).should.equal true\n\t\t\t\t@SubscriptionUpdater", "end": 5109, "score": 0.5729199647903442, "start": 5102, "tag": "USERNAME", "value": "allUser" }, { "context": " @otherUserId, =>\n\t\t\t\tsearchOps = \n\t\t\t\t\tadmin_id:@adminUser._id\n\t\t\t\tremoveOperation = \n\t\t\t\t\t\"$pull\": {member_", "end": 7217, "score": 0.7959830164909363, "start": 7208, "tag": "USERNAME", "value": "adminUser" } ]
test/UnitTests/coffee/Subscription/SubscriptionUpdaterTests.coffee
HasanSanli/web-sharelatex
0
SandboxedModule = require('sandboxed-module') should = require('chai').should() sinon = require 'sinon' modulePath = "../../../../app/js/Features/Subscription/SubscriptionUpdater" assert = require("chai").assert ObjectId = require('mongoose').Types.ObjectId describe "SubscriptionUpdater", -> beforeEach -> @recurlySubscription = uuid: "1238uoijdasjhd" plan: plan_code: "kjhsakjds" @adminUser = _id: @adminuser_id = "5208dd34438843e2db000007" @otherUserId = "5208dd34438842e2db000005" @allUserIds = ["13213", "dsadas", "djsaiud89"] @subscription = subscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"student_or_something" @groupSubscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"group_subscription" @updateStub = sinon.stub().callsArgWith(2, null) @findAndModifyStub = sinon.stub().callsArgWith(2, null, @subscription) @SubscriptionModel = class constructor: (opts)-> subscription.admin_id = opts.admin_id return subscription @remove: sinon.stub().yields() @SubscriptionModel.update = @updateStub @SubscriptionModel.findAndModify = @findAndModifyStub @SubscriptionLocator = getUsersSubscription: sinon.stub() getGroupSubscriptionMemberOf:sinon.stub() @Settings = freeTrialPlanCode: "collaborator" defaultPlanCode: "personal" @UserFeaturesUpdater = updateFeatures : sinon.stub().callsArgWith(2) @PlansLocator = findLocalPlanInSettings: sinon.stub().returns({}) @ReferalAllocator = assignBonus:sinon.stub().callsArgWith(1) @ReferalAllocator.cock = true @SubscriptionUpdater = SandboxedModule.require modulePath, requires: '../../models/Subscription': Subscription:@SubscriptionModel './UserFeaturesUpdater': @UserFeaturesUpdater './SubscriptionLocator': @SubscriptionLocator './PlansLocator': @PlansLocator "logger-sharelatex": log:-> 'settings-sharelatex': @Settings "../Referal/ReferalAllocator" : @ReferalAllocator describe "syncSubscription", -> beforeEach -> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionUpdater._updateSubscriptionFromRecurly = sinon.stub().callsArgWith(2) it "should update the subscription if the user already is admin of one", (done)-> @SubscriptionUpdater._createNewSubscription = sinon.stub() @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true done() it "should not call updateFeatures with group subscription if recurly subscription is not expired", (done)-> @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true @UserFeaturesUpdater.updateFeatures.called.should.equal false done() describe "_updateSubscriptionFromRecurly", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should update the subscription with token etc when not expired", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.recurlySubscription_id.should.equal @recurlySubscription.uuid @subscription.planCode.should.equal @recurlySubscription.plan.plan_code @subscription.freeTrial.allowed.should.equal true assert.equal(@subscription.freeTrial.expiresAt, undefined) assert.equal(@subscription.freeTrial.planCode, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should remove the recurlySubscription_id when expired", (done)-> @recurlySubscription.state = "expired" @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.equal(@subscription.recurlySubscription_id, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should update all the users features", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[0]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[1]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[2]).should.equal true done() it "should set group to true and save how many members can be added to group", (done)-> @PlansLocator.findLocalPlanInSettings.withArgs(@recurlySubscription.plan.plan_code).returns({groupPlan:true, membersLimit:5}) @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.membersLimit.should.equal 5 @subscription.groupPlan.should.equal true done() it "should not set group to true or set groupPlan", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.notEqual @subscription.membersLimit, 5 assert.notEqual @subscription.groupPlan, true done() describe "_createNewSubscription", -> it "should create a new subscription then update the subscription", (done)-> @SubscriptionUpdater._createNewSubscription @adminUser._id, => @subscription.admin_id.should.equal @adminUser._id @subscription.freeTrial.allowed.should.equal false @subscription.save.called.should.equal true done() describe "addUserToGroup", -> it "should add the users id to the group as a set", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => searchOps = admin_id: @adminUser._id insertOperation = "$addToSet": {member_ids:@otherUserId} @findAndModifyStub.calledWith(searchOps, insertOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => @UserFeaturesUpdater.updateFeatures.calledWith(@otherUserId, @subscription.planCode).should.equal true done() describe "removeUserFromGroup", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should pull the users id from the group", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => searchOps = admin_id:@adminUser._id removeOperation = "$pull": {member_ids:@otherUserId} @updateStub.calledWith(searchOps, removeOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@otherUserId).should.equal true done() describe "_setUsersMinimumFeatures", -> it "should call updateFeatures with the subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @subscription.planCode done() it "should call updateFeatures with the group subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call not call updateFeatures with users subscription if the subscription plan code is the default one (downgraded)", (done)-> @subscription.planCode = @Settings.defaultPlanCode @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call updateFeatures with default if there are no subscriptions for user", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @Settings.defaultPlanCode done() it "should call assignBonus", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> @ReferalAllocator.assignBonus.calledWith(@adminuser_id).should.equal true done() describe "deleteSubscription", -> beforeEach (done) -> @subscription_id = ObjectId().toString() @subscription = { "mock": "subscription", admin_id: ObjectId(), member_ids: [ ObjectId(), ObjectId(), ObjectId() ] } @SubscriptionLocator.getSubscription = sinon.stub().yields(null, @subscription) @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().yields() @SubscriptionUpdater.deleteSubscription @subscription_id, done it "should look up the subscription", -> @SubscriptionLocator.getSubscription .calledWith(@subscription_id) .should.equal true it "should remove the subscription", -> @SubscriptionModel.remove .calledWith({_id: ObjectId(@subscription_id)}) .should.equal true it "should downgrade the admin_id", -> @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(@subscription.admin_id) .should.equal true it "should downgrade all of the members", -> for user_id in @subscription.member_ids @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(user_id) .should.equal true
38634
SandboxedModule = require('sandboxed-module') should = require('chai').should() sinon = require 'sinon' modulePath = "../../../../app/js/Features/Subscription/SubscriptionUpdater" assert = require("chai").assert ObjectId = require('mongoose').Types.ObjectId describe "SubscriptionUpdater", -> beforeEach -> @recurlySubscription = uuid: "1238uoijdasjhd" plan: plan_code: "kjhsakjds" @adminUser = _id: @adminuser_id = "5208dd34438843e2db000007" @otherUserId = "5208dd34438842e2db000005" @allUserIds = ["13213", "<PASSWORD>", "<PASSWORD>"] @subscription = subscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"student_or_something" @groupSubscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"group_subscription" @updateStub = sinon.stub().callsArgWith(2, null) @findAndModifyStub = sinon.stub().callsArgWith(2, null, @subscription) @SubscriptionModel = class constructor: (opts)-> subscription.admin_id = opts.admin_id return subscription @remove: sinon.stub().yields() @SubscriptionModel.update = @updateStub @SubscriptionModel.findAndModify = @findAndModifyStub @SubscriptionLocator = getUsersSubscription: sinon.stub() getGroupSubscriptionMemberOf:sinon.stub() @Settings = freeTrialPlanCode: "collaborator" defaultPlanCode: "personal" @UserFeaturesUpdater = updateFeatures : sinon.stub().callsArgWith(2) @PlansLocator = findLocalPlanInSettings: sinon.stub().returns({}) @ReferalAllocator = assignBonus:sinon.stub().callsArgWith(1) @ReferalAllocator.cock = true @SubscriptionUpdater = SandboxedModule.require modulePath, requires: '../../models/Subscription': Subscription:@SubscriptionModel './UserFeaturesUpdater': @UserFeaturesUpdater './SubscriptionLocator': @SubscriptionLocator './PlansLocator': @PlansLocator "logger-sharelatex": log:-> 'settings-sharelatex': @Settings "../Referal/ReferalAllocator" : @ReferalAllocator describe "syncSubscription", -> beforeEach -> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionUpdater._updateSubscriptionFromRecurly = sinon.stub().callsArgWith(2) it "should update the subscription if the user already is admin of one", (done)-> @SubscriptionUpdater._createNewSubscription = sinon.stub() @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true done() it "should not call updateFeatures with group subscription if recurly subscription is not expired", (done)-> @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true @UserFeaturesUpdater.updateFeatures.called.should.equal false done() describe "_updateSubscriptionFromRecurly", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should update the subscription with token etc when not expired", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.recurlySubscription_id.should.equal @recurlySubscription.uuid @subscription.planCode.should.equal @recurlySubscription.plan.plan_code @subscription.freeTrial.allowed.should.equal true assert.equal(@subscription.freeTrial.expiresAt, undefined) assert.equal(@subscription.freeTrial.planCode, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should remove the recurlySubscription_id when expired", (done)-> @recurlySubscription.state = "expired" @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.equal(@subscription.recurlySubscription_id, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should update all the users features", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[0]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[1]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[2]).should.equal true done() it "should set group to true and save how many members can be added to group", (done)-> @PlansLocator.findLocalPlanInSettings.withArgs(@recurlySubscription.plan.plan_code).returns({groupPlan:true, membersLimit:5}) @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.membersLimit.should.equal 5 @subscription.groupPlan.should.equal true done() it "should not set group to true or set groupPlan", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.notEqual @subscription.membersLimit, 5 assert.notEqual @subscription.groupPlan, true done() describe "_createNewSubscription", -> it "should create a new subscription then update the subscription", (done)-> @SubscriptionUpdater._createNewSubscription @adminUser._id, => @subscription.admin_id.should.equal @adminUser._id @subscription.freeTrial.allowed.should.equal false @subscription.save.called.should.equal true done() describe "addUserToGroup", -> it "should add the users id to the group as a set", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => searchOps = admin_id: @adminUser._id insertOperation = "$addToSet": {member_ids:@otherUserId} @findAndModifyStub.calledWith(searchOps, insertOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => @UserFeaturesUpdater.updateFeatures.calledWith(@otherUserId, @subscription.planCode).should.equal true done() describe "removeUserFromGroup", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should pull the users id from the group", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => searchOps = admin_id:@adminUser._id removeOperation = "$pull": {member_ids:@otherUserId} @updateStub.calledWith(searchOps, removeOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@otherUserId).should.equal true done() describe "_setUsersMinimumFeatures", -> it "should call updateFeatures with the subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @subscription.planCode done() it "should call updateFeatures with the group subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call not call updateFeatures with users subscription if the subscription plan code is the default one (downgraded)", (done)-> @subscription.planCode = @Settings.defaultPlanCode @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call updateFeatures with default if there are no subscriptions for user", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @Settings.defaultPlanCode done() it "should call assignBonus", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> @ReferalAllocator.assignBonus.calledWith(@adminuser_id).should.equal true done() describe "deleteSubscription", -> beforeEach (done) -> @subscription_id = ObjectId().toString() @subscription = { "mock": "subscription", admin_id: ObjectId(), member_ids: [ ObjectId(), ObjectId(), ObjectId() ] } @SubscriptionLocator.getSubscription = sinon.stub().yields(null, @subscription) @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().yields() @SubscriptionUpdater.deleteSubscription @subscription_id, done it "should look up the subscription", -> @SubscriptionLocator.getSubscription .calledWith(@subscription_id) .should.equal true it "should remove the subscription", -> @SubscriptionModel.remove .calledWith({_id: ObjectId(@subscription_id)}) .should.equal true it "should downgrade the admin_id", -> @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(@subscription.admin_id) .should.equal true it "should downgrade all of the members", -> for user_id in @subscription.member_ids @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(user_id) .should.equal true
true
SandboxedModule = require('sandboxed-module') should = require('chai').should() sinon = require 'sinon' modulePath = "../../../../app/js/Features/Subscription/SubscriptionUpdater" assert = require("chai").assert ObjectId = require('mongoose').Types.ObjectId describe "SubscriptionUpdater", -> beforeEach -> @recurlySubscription = uuid: "1238uoijdasjhd" plan: plan_code: "kjhsakjds" @adminUser = _id: @adminuser_id = "5208dd34438843e2db000007" @otherUserId = "5208dd34438842e2db000005" @allUserIds = ["13213", "PI:PASSWORD:<PASSWORD>END_PI", "PI:PASSWORD:<PASSWORD>END_PI"] @subscription = subscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"student_or_something" @groupSubscription = admin_id: @adminUser._id member_ids: @allUserIds save: sinon.stub().callsArgWith(0) freeTrial:{} planCode:"group_subscription" @updateStub = sinon.stub().callsArgWith(2, null) @findAndModifyStub = sinon.stub().callsArgWith(2, null, @subscription) @SubscriptionModel = class constructor: (opts)-> subscription.admin_id = opts.admin_id return subscription @remove: sinon.stub().yields() @SubscriptionModel.update = @updateStub @SubscriptionModel.findAndModify = @findAndModifyStub @SubscriptionLocator = getUsersSubscription: sinon.stub() getGroupSubscriptionMemberOf:sinon.stub() @Settings = freeTrialPlanCode: "collaborator" defaultPlanCode: "personal" @UserFeaturesUpdater = updateFeatures : sinon.stub().callsArgWith(2) @PlansLocator = findLocalPlanInSettings: sinon.stub().returns({}) @ReferalAllocator = assignBonus:sinon.stub().callsArgWith(1) @ReferalAllocator.cock = true @SubscriptionUpdater = SandboxedModule.require modulePath, requires: '../../models/Subscription': Subscription:@SubscriptionModel './UserFeaturesUpdater': @UserFeaturesUpdater './SubscriptionLocator': @SubscriptionLocator './PlansLocator': @PlansLocator "logger-sharelatex": log:-> 'settings-sharelatex': @Settings "../Referal/ReferalAllocator" : @ReferalAllocator describe "syncSubscription", -> beforeEach -> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionUpdater._updateSubscriptionFromRecurly = sinon.stub().callsArgWith(2) it "should update the subscription if the user already is admin of one", (done)-> @SubscriptionUpdater._createNewSubscription = sinon.stub() @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true done() it "should not call updateFeatures with group subscription if recurly subscription is not expired", (done)-> @SubscriptionUpdater.syncSubscription @recurlySubscription, @adminUser._id, (err)=> @SubscriptionLocator.getUsersSubscription.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.called.should.equal true @SubscriptionUpdater._updateSubscriptionFromRecurly.calledWith(@recurlySubscription, @subscription).should.equal true @UserFeaturesUpdater.updateFeatures.called.should.equal false done() describe "_updateSubscriptionFromRecurly", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should update the subscription with token etc when not expired", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.recurlySubscription_id.should.equal @recurlySubscription.uuid @subscription.planCode.should.equal @recurlySubscription.plan.plan_code @subscription.freeTrial.allowed.should.equal true assert.equal(@subscription.freeTrial.expiresAt, undefined) assert.equal(@subscription.freeTrial.planCode, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should remove the recurlySubscription_id when expired", (done)-> @recurlySubscription.state = "expired" @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.equal(@subscription.recurlySubscription_id, undefined) @subscription.save.called.should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true done() it "should update all the users features", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@adminUser._id).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[0]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[1]).should.equal true @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@allUserIds[2]).should.equal true done() it "should set group to true and save how many members can be added to group", (done)-> @PlansLocator.findLocalPlanInSettings.withArgs(@recurlySubscription.plan.plan_code).returns({groupPlan:true, membersLimit:5}) @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> @subscription.membersLimit.should.equal 5 @subscription.groupPlan.should.equal true done() it "should not set group to true or set groupPlan", (done)-> @SubscriptionUpdater._updateSubscriptionFromRecurly @recurlySubscription, @subscription, (err)=> assert.notEqual @subscription.membersLimit, 5 assert.notEqual @subscription.groupPlan, true done() describe "_createNewSubscription", -> it "should create a new subscription then update the subscription", (done)-> @SubscriptionUpdater._createNewSubscription @adminUser._id, => @subscription.admin_id.should.equal @adminUser._id @subscription.freeTrial.allowed.should.equal false @subscription.save.called.should.equal true done() describe "addUserToGroup", -> it "should add the users id to the group as a set", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => searchOps = admin_id: @adminUser._id insertOperation = "$addToSet": {member_ids:@otherUserId} @findAndModifyStub.calledWith(searchOps, insertOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.addUserToGroup @adminUser._id, @otherUserId, => @UserFeaturesUpdater.updateFeatures.calledWith(@otherUserId, @subscription.planCode).should.equal true done() describe "removeUserFromGroup", -> beforeEach -> @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().callsArgWith(1) it "should pull the users id from the group", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => searchOps = admin_id:@adminUser._id removeOperation = "$pull": {member_ids:@otherUserId} @updateStub.calledWith(searchOps, removeOperation).should.equal true done() it "should update the users features", (done)-> @SubscriptionUpdater.removeUserFromGroup @adminUser._id, @otherUserId, => @SubscriptionUpdater._setUsersMinimumFeatures.calledWith(@otherUserId).should.equal true done() describe "_setUsersMinimumFeatures", -> it "should call updateFeatures with the subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @subscription.planCode done() it "should call updateFeatures with the group subscription if set", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminUser._id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call not call updateFeatures with users subscription if the subscription plan code is the default one (downgraded)", (done)-> @subscription.planCode = @Settings.defaultPlanCode @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null, @subscription) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null, @groupSubscription) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @groupSubscription.planCode done() it "should call updateFeatures with default if there are no subscriptions for user", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> args = @UserFeaturesUpdater.updateFeatures.args[0] assert.equal args[0], @adminUser._id assert.equal args[1], @Settings.defaultPlanCode done() it "should call assignBonus", (done)-> @SubscriptionLocator.getUsersSubscription.callsArgWith(1, null) @SubscriptionLocator.getGroupSubscriptionMemberOf.callsArgWith(1, null) @SubscriptionUpdater._setUsersMinimumFeatures @adminuser_id, (err)=> @ReferalAllocator.assignBonus.calledWith(@adminuser_id).should.equal true done() describe "deleteSubscription", -> beforeEach (done) -> @subscription_id = ObjectId().toString() @subscription = { "mock": "subscription", admin_id: ObjectId(), member_ids: [ ObjectId(), ObjectId(), ObjectId() ] } @SubscriptionLocator.getSubscription = sinon.stub().yields(null, @subscription) @SubscriptionUpdater._setUsersMinimumFeatures = sinon.stub().yields() @SubscriptionUpdater.deleteSubscription @subscription_id, done it "should look up the subscription", -> @SubscriptionLocator.getSubscription .calledWith(@subscription_id) .should.equal true it "should remove the subscription", -> @SubscriptionModel.remove .calledWith({_id: ObjectId(@subscription_id)}) .should.equal true it "should downgrade the admin_id", -> @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(@subscription.admin_id) .should.equal true it "should downgrade all of the members", -> for user_id in @subscription.member_ids @SubscriptionUpdater._setUsersMinimumFeatures .calledWith(user_id) .should.equal true
[ { "context": "erviceMock =\n parent:\n firstName: ''\n lastName: ''\n email: ''\n postSearch: ->\n\n beforeE", "end": 134, "score": 0.6924493312835693, "start": 126, "tag": "NAME", "value": "lastName" } ]
spec/javascripts/controllers/search_controller_spec.js.coffee
Exygy/Children-s-Council
1
describe 'SearchController', -> $scope = null $state = null SearchServiceMock = parent: firstName: '' lastName: '' email: '' postSearch: -> beforeEach module 'CCR' beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() $controller 'SearchController', { $scope: $scope, $state: $state, SearchService: SearchServiceMock } describe '$scope.parent', -> it 'populates scope with empty parent', -> expect($scope.parent).toEqual(SearchServiceMock.parent) describe '$scope.submitSearch', -> it 'submits search to SearchProvider', -> spyOn(SearchServiceMock, 'postSearch') $scope.submitSearch() expect(SearchServiceMock.postSearch).toHaveBeenCalled()
1175
describe 'SearchController', -> $scope = null $state = null SearchServiceMock = parent: firstName: '' <NAME>: '' email: '' postSearch: -> beforeEach module 'CCR' beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() $controller 'SearchController', { $scope: $scope, $state: $state, SearchService: SearchServiceMock } describe '$scope.parent', -> it 'populates scope with empty parent', -> expect($scope.parent).toEqual(SearchServiceMock.parent) describe '$scope.submitSearch', -> it 'submits search to SearchProvider', -> spyOn(SearchServiceMock, 'postSearch') $scope.submitSearch() expect(SearchServiceMock.postSearch).toHaveBeenCalled()
true
describe 'SearchController', -> $scope = null $state = null SearchServiceMock = parent: firstName: '' PI:NAME:<NAME>END_PI: '' email: '' postSearch: -> beforeEach module 'CCR' beforeEach inject ($rootScope, $controller) -> $scope = $rootScope.$new() $controller 'SearchController', { $scope: $scope, $state: $state, SearchService: SearchServiceMock } describe '$scope.parent', -> it 'populates scope with empty parent', -> expect($scope.parent).toEqual(SearchServiceMock.parent) describe '$scope.submitSearch', -> it 'submits search to SearchProvider', -> spyOn(SearchServiceMock, 'postSearch') $scope.submitSearch() expect(SearchServiceMock.postSearch).toHaveBeenCalled()
[ { "context": "###\n termap - Terminal Map Viewer\n by Michael Strassburger <codepoet@cpan.org>\n\n Using 2D spatial indexing ", "end": 60, "score": 0.9998729825019836, "start": 40, "tag": "NAME", "value": "Michael Strassburger" }, { "context": " - Terminal Map Viewer\n by Michael Strassburger <codepoet@cpan.org>\n\n Using 2D spatial indexing to avoid overlappin", "end": 79, "score": 0.999931812286377, "start": 62, "tag": "EMAIL", "value": "codepoet@cpan.org" } ]
src/LabelBuffer.coffee
82ndAirborneDiv/mapsc
1
### termap - Terminal Map Viewer by Michael Strassburger <codepoet@cpan.org> Using 2D spatial indexing to avoid overlapping labels and markers and to find labels underneath a mouse cursor's position ### rbush = require 'rbush' stringWidth = require 'string-width' module.exports = class LabelBuffer tree: null margin: 5 constructor: (@width, @height) -> @tree = rbush() clear: -> @tree.clear() project: (x, y) -> [Math.floor(x/2), Math.floor(y/4)] writeIfPossible: (text, x, y, feature, margin = @margin) -> point = @project x, y if @_hasSpace text, point[0], point[1] data = @_calculateArea text, point[0], point[1], margin data.feature = feature @tree.insert data else false featuresAt: (x, y) -> @tree.search minX: x, maxX: x, minY: y, maxY: y _hasSpace: (text, x, y) -> not @tree.collides @_calculateArea text, x, y _calculateArea: (text, x, y, margin = 0) -> minX: x-margin minY: y-margin/2 maxX: x+margin+stringWidth(text) maxY: y+margin/2
26546
### termap - Terminal Map Viewer by <NAME> <<EMAIL>> Using 2D spatial indexing to avoid overlapping labels and markers and to find labels underneath a mouse cursor's position ### rbush = require 'rbush' stringWidth = require 'string-width' module.exports = class LabelBuffer tree: null margin: 5 constructor: (@width, @height) -> @tree = rbush() clear: -> @tree.clear() project: (x, y) -> [Math.floor(x/2), Math.floor(y/4)] writeIfPossible: (text, x, y, feature, margin = @margin) -> point = @project x, y if @_hasSpace text, point[0], point[1] data = @_calculateArea text, point[0], point[1], margin data.feature = feature @tree.insert data else false featuresAt: (x, y) -> @tree.search minX: x, maxX: x, minY: y, maxY: y _hasSpace: (text, x, y) -> not @tree.collides @_calculateArea text, x, y _calculateArea: (text, x, y, margin = 0) -> minX: x-margin minY: y-margin/2 maxX: x+margin+stringWidth(text) maxY: y+margin/2
true
### termap - Terminal Map Viewer by PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> Using 2D spatial indexing to avoid overlapping labels and markers and to find labels underneath a mouse cursor's position ### rbush = require 'rbush' stringWidth = require 'string-width' module.exports = class LabelBuffer tree: null margin: 5 constructor: (@width, @height) -> @tree = rbush() clear: -> @tree.clear() project: (x, y) -> [Math.floor(x/2), Math.floor(y/4)] writeIfPossible: (text, x, y, feature, margin = @margin) -> point = @project x, y if @_hasSpace text, point[0], point[1] data = @_calculateArea text, point[0], point[1], margin data.feature = feature @tree.insert data else false featuresAt: (x, y) -> @tree.search minX: x, maxX: x, minY: y, maxY: y _hasSpace: (text, x, y) -> not @tree.collides @_calculateArea text, x, y _calculateArea: (text, x, y, margin = 0) -> minX: x-margin minY: y-margin/2 maxX: x+margin+stringWidth(text) maxY: y+margin/2
[ { "context": " list = new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}]\n\n listView = new Lis", "end": 601, "score": 0.9998392462730408, "start": 597, "tag": "NAME", "value": "Jack" }, { "context": " new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}]\n\n listView = new ListView model: li", "end": 616, "score": 0.9998165965080261, "start": 613, "tag": "NAME", "value": "Bob" }, { "context": ".length).to.equal 2\n\n list.add {name: 'Max'}\n\n expect(el.find('li').length).to.eq", "end": 785, "score": 0.9997835755348206, "start": 782, "tag": "NAME", "value": "Max" }, { "context": ").destroy()\n\n expect(el).to.have.text 'JackMax'\n\n it 'should run custom view function', -", "end": 920, "score": 0.9992448091506958, "start": 913, "tag": "NAME", "value": "JackMax" }, { "context": " list = new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}]\n\n listView = new Lis", "end": 2262, "score": 0.9998413324356079, "start": 2258, "tag": "NAME", "value": "Jack" }, { "context": " new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}]\n\n listView = new ListView model: li", "end": 2277, "score": 0.9998361468315125, "start": 2274, "tag": "NAME", "value": "Bob" }, { "context": "istView.$el\n\n expect(el).to.have.text 'BobJack'\n\n list.at(0).destroy()\n\n e", "end": 2405, "score": 0.9983764886856079, "start": 2398, "tag": "NAME", "value": "BobJack" }, { "context": ").destroy()\n\n expect(el).to.have.text 'BobJack'\n\n it 'should create view with el:', ->\n ", "end": 2486, "score": 0.9880656003952026, "start": 2479, "tag": "NAME", "value": "BobJack" }, { "context": "length).to.equal 0\n\n list.set([{name: 'Jack'}, {name: 'Bob'}])\n\n expect(el.find('l", "end": 3066, "score": 0.9998435974121094, "start": 3062, "tag": "NAME", "value": "Jack" }, { "context": " 0\n\n list.set([{name: 'Jack'}, {name: 'Bob'}])\n\n expect(el.find('li').length).to.", "end": 3081, "score": 0.9998453855514526, "start": 3078, "tag": "NAME", "value": "Bob" }, { "context": " list = new Backbone.Collection([{name: 'Jack'}, {name: 'Bob'}])\n\n listView = new Li", "end": 19002, "score": 0.9997630715370178, "start": 18998, "tag": "NAME", "value": "Jack" }, { "context": " new Backbone.Collection([{name: 'Jack'}, {name: 'Bob'}])\n\n listView = new ListView model: l", "end": 19017, "score": 0.9997962117195129, "start": 19014, "tag": "NAME", "value": "Bob" }, { "context": "istView.$el\n\n expect(el).to.have.text 'JackBob'\n\n list.add({name: 'Max'}, {at: 1})\n\n ", "end": 19146, "score": 0.9991086721420288, "start": 19139, "tag": "NAME", "value": "JackBob" }, { "context": "have.text 'JackBob'\n\n list.add({name: 'Max'}, {at: 1})\n\n expect(el).to.have.text ", "end": 19181, "score": 0.9997667670249939, "start": 19178, "tag": "NAME", "value": "Max" }, { "context": "}, {at: 1})\n\n expect(el).to.have.text 'JackMaxBob'\n\n it 'should create view own prop with vi", "end": 19242, "score": 0.9984772205352783, "start": 19232, "tag": "NAME", "value": "JackMaxBob" } ]
test/each.coffee
redexp/backbone-dom-view
13
define ['chai', 'backbone', 'backbone-dom-view'], ({expect}, Backbone, DomView) -> model = null beforeEach -> model = new Backbone.Model() describe 'each helper', -> it 'should create view for each item in collection', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View list = new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 2 list.add {name: 'Max'} expect(el.find('li').length).to.equal 3 list.at(1).destroy() expect(el).to.have.text 'JackMax' it 'should run custom view function', -> LiView = DomView.extend tagName: 'li' DivView = DomView.extend tagName: 'div' ListView = DomView.extend tagName: 'ul' template: '': each: view: (model)-> if model.get('type') is 'li' then LiView else DivView list = new Backbone.Collection [{type: 'li'}, {type: 'div'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.be.equal 1 expect(el.find('div').length).to.be.equal 1 it 'should run custom insertion/remove function', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'prepend' delHandler: (ul, view) -> expect(this).to.be.instanceOf ListView expect(view).to.be.instanceOf View list = new Backbone.Collection [{name: 'Jack'}, {name: 'Bob'}] listView = new ListView model: list el = listView.$el expect(el).to.have.text 'BobJack' list.at(0).destroy() expect(el).to.have.text 'BobJack' it 'should create view with el:', -> View = DomView.extend template: '': html: '@name' ListView = DomView.extend el: $('<ul><li class="test"></li></ul>') template: '': each: view: View el: '> *' list = new Backbone.Collection() listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 0 list.set([{name: 'Jack'}, {name: 'Bob'}]) expect(el.find('li').length).to.equal 2 expect(el.find('li')).to.have.class 'test' it 'should create view with el: as function', -> ViewDef = DomView.extend template: 'root': html: '@type' ListView = DomView.extend el: '<ul><li class="test1"></li></ul>' template: 'root': each: view: ViewDef el: -> '> .test1' list = new Backbone.Collection([{type: 1},{type: 2},{type: 3},{type: 4}]) listView = new ListView model: list el = listView.$el expect(el.find('li.test1').length).to.equal 4 it 'should have `parent` field', -> views = [] ListView = DomView.extend el: '<ul></ul>' template: '': each: view: (model) -> view = new Backbone.View(model: model) view.parent = true if model.get('parent') views.push(view); return view list = new Backbone.Collection([{parent: false}, {parent: true}]) listView = new ListView model: list expect(views[0].parent).to.be.equal listView expect(views[1].parent).to.be.equal true it 'should to be sorted by event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: true list = new Backbone.Collection() list.comparator = 'name'; view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' it 'should to be sorted by custom event and field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should to be sorted by order', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' order: 'desc' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '1' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should sort list by views event on event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: 'test' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 2}, {name: 3}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 2 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 1 it 'should sort list by views on event and set index to field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: event: 'test' field: 'order' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1, order: 0}, {name: 2, order: 1}, {name: 3, order: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 1 expect(list.at(0).get('order')).to.equal 2 expect(list.at(1).get('name')).to.equal 2 expect(list.at(1).get('order')).to.equal 0 expect(list.at(2).get('name')).to.equal 3 expect(list.at(2).get('order')).to.equal 1 it 'should iterate over plain array with collection class', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: Backbone.Collection view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should iterate over plain array with wrapper function', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: (list) -> expect(this).to.be.instanceOf DomView return new Backbone.Collection(list) view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should trigger added event', -> num = 0 Item = DomView.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> num++ expect(this.$el.parent().length).to.equal 1 template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' model = new Backbone.Collection([{name: 1},{name: 2}]) view = new ListView model: model expect(num).to.equal 2 x = 0; XItem = Item.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> x++ this.on 'tested', -> x++ expect(this.$el.parent().length).to.equal 1 XListView = ListView.extend template: '': each: addedEvent: 'tested' view: XItem view = new XListView model: model expect(x).to.equal 2 it 'should handle reset event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) view = new ListView model: list li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' list.reset([{name: 2}, {name: 3}]) li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '2' expect(li.eq(1)).to.have.text '3' it 'should iterate over model field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: 'list' view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) model = new Backbone.Model({list: list}) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' model.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should iterate over view field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' defaults: list: null initialize: -> this.set 'list', new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) template: '': each: field: 'list' view: Item el: '> *' model = new Backbone.Model() view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' view.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should have viewList as EachViewList', -> Item = DomView.extend defaults: selected: false initialize: -> this.set('selected', this.model.get('name') < 3) template: 'root': html: '@name' class: 'selected': '@selected' ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: Item el: '> *' list = new Backbone.Collection([{id: 1, name: 1}, {id: 2, name: 2}, {id: 3, name: 3}]) view = new ListView model: list viewList = view.getViewList('root') views = viewList.where({selected: true}) expect(views.length).to.equal 2 expect(views[0].$el).to.have.class 'selected' expect(views[1].$el).to.have.class 'selected' expect(viewList[list.at(2).cid].$el).not.to.have.class 'selected' views = viewList.where({selected: /^f/}) expect(views.length).to.equal 1 expect(views[0]).to.equal viewList[list.at(2).cid] views = viewList.findWhere({selected: false}) expect(views).to.equal viewList[list.at(2).cid] views = viewList.getByEl(view.$el.children().eq(1)) expect(views).to.equal viewList[list.at(1).cid] views = viewList.getByEl(view.$el.children().get(2)) expect(views).to.equal viewList[list.at(2).cid] expect(list.at(0)).to.equal viewList.get(list.at(0)).model expect(list.at(0)).to.equal viewList.get(list.at(0).id).model expect(list.at(0)).to.equal viewList.get(list.at(0).cid).model it 'should handle "at" option', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'appendAt' list = new Backbone.Collection([{name: 'Jack'}, {name: 'Bob'}]) listView = new ListView model: list el = listView.$el expect(el).to.have.text 'JackBob' list.add({name: 'Max'}, {at: 1}) expect(el).to.have.text 'JackMaxBob' it 'should create view own prop with viewList', -> ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: DomView viewProp: 'list' view = new ListView model: new Backbone.Collection([{}, {}]) expect(view.list).to.equal view.getViewList('root') it 'should trigger change:field', -> ListView = DomView.extend el: '<ul><li></li></ul>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: '> *' view = new ListView() num = 0 view.bind '@list', -> num++ expect(num).to.equal 1 view.get('list').add({id: 1}) expect(num).to.equal 2 view.get('list').remove(1) expect(num).to.equal 3 view.get('list').reset([{}, {}, {}]) expect(num).to.equal 4 it 'should accept el as jQuery object', -> ListView = DomView.extend el: '<div></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: (ul) -> expect(this).to.be.an.instanceof(ListView) expect(ul).to.be.an.instanceof(jQuery) return jQuery('<span>') view = new ListView() view.get('list').add([{}, {}]) expect(view.$el.find('> span').length).to.equal(2) it 'should accept el as object of types', -> ListView = DomView.extend el: '<div><span class="type-test1"></span><span data-type="test2"></span><span data-type="test3"></span></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: 'data-type': 'type' 'class': (model) -> 'type-' + model.get('type') view = new ListView() view.get('list').add([{type: 'test2'}, {type: 'test3'}, {type: 'test1'}]) items = view.$el.children() expect(items.length).to.equal(3) expect(items.eq(0)).to.have.attr 'data-type', 'test2' expect(items.eq(1)).to.have.attr 'data-type', 'test3' expect(items.eq(2)).to.have.class 'type-test1' it 'should remove class from clone', -> ListView = DomView.extend el: '<ul><li class="hidden test"></li></ul>' defaults: -> list: new Backbone.Collection([{}, {}]) template: 'root': each: field: 'list' view: DomView el: '> *' removeClass: 'hidden' view = new ListView() expect(view.$el.children().length).to.equal(2) expect(view.$el.find('.hidden').length).to.equal(0) expect(view.$el.find('.test').length).to.equal(2)
4337
define ['chai', 'backbone', 'backbone-dom-view'], ({expect}, Backbone, DomView) -> model = null beforeEach -> model = new Backbone.Model() describe 'each helper', -> it 'should create view for each item in collection', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View list = new Backbone.Collection [{name: '<NAME>'}, {name: '<NAME>'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 2 list.add {name: '<NAME>'} expect(el.find('li').length).to.equal 3 list.at(1).destroy() expect(el).to.have.text '<NAME>' it 'should run custom view function', -> LiView = DomView.extend tagName: 'li' DivView = DomView.extend tagName: 'div' ListView = DomView.extend tagName: 'ul' template: '': each: view: (model)-> if model.get('type') is 'li' then LiView else DivView list = new Backbone.Collection [{type: 'li'}, {type: 'div'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.be.equal 1 expect(el.find('div').length).to.be.equal 1 it 'should run custom insertion/remove function', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'prepend' delHandler: (ul, view) -> expect(this).to.be.instanceOf ListView expect(view).to.be.instanceOf View list = new Backbone.Collection [{name: '<NAME>'}, {name: '<NAME>'}] listView = new ListView model: list el = listView.$el expect(el).to.have.text '<NAME>' list.at(0).destroy() expect(el).to.have.text '<NAME>' it 'should create view with el:', -> View = DomView.extend template: '': html: '@name' ListView = DomView.extend el: $('<ul><li class="test"></li></ul>') template: '': each: view: View el: '> *' list = new Backbone.Collection() listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 0 list.set([{name: '<NAME>'}, {name: '<NAME>'}]) expect(el.find('li').length).to.equal 2 expect(el.find('li')).to.have.class 'test' it 'should create view with el: as function', -> ViewDef = DomView.extend template: 'root': html: '@type' ListView = DomView.extend el: '<ul><li class="test1"></li></ul>' template: 'root': each: view: ViewDef el: -> '> .test1' list = new Backbone.Collection([{type: 1},{type: 2},{type: 3},{type: 4}]) listView = new ListView model: list el = listView.$el expect(el.find('li.test1').length).to.equal 4 it 'should have `parent` field', -> views = [] ListView = DomView.extend el: '<ul></ul>' template: '': each: view: (model) -> view = new Backbone.View(model: model) view.parent = true if model.get('parent') views.push(view); return view list = new Backbone.Collection([{parent: false}, {parent: true}]) listView = new ListView model: list expect(views[0].parent).to.be.equal listView expect(views[1].parent).to.be.equal true it 'should to be sorted by event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: true list = new Backbone.Collection() list.comparator = 'name'; view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' it 'should to be sorted by custom event and field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should to be sorted by order', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' order: 'desc' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '1' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should sort list by views event on event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: 'test' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 2}, {name: 3}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 2 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 1 it 'should sort list by views on event and set index to field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: event: 'test' field: 'order' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1, order: 0}, {name: 2, order: 1}, {name: 3, order: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 1 expect(list.at(0).get('order')).to.equal 2 expect(list.at(1).get('name')).to.equal 2 expect(list.at(1).get('order')).to.equal 0 expect(list.at(2).get('name')).to.equal 3 expect(list.at(2).get('order')).to.equal 1 it 'should iterate over plain array with collection class', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: Backbone.Collection view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should iterate over plain array with wrapper function', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: (list) -> expect(this).to.be.instanceOf DomView return new Backbone.Collection(list) view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should trigger added event', -> num = 0 Item = DomView.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> num++ expect(this.$el.parent().length).to.equal 1 template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' model = new Backbone.Collection([{name: 1},{name: 2}]) view = new ListView model: model expect(num).to.equal 2 x = 0; XItem = Item.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> x++ this.on 'tested', -> x++ expect(this.$el.parent().length).to.equal 1 XListView = ListView.extend template: '': each: addedEvent: 'tested' view: XItem view = new XListView model: model expect(x).to.equal 2 it 'should handle reset event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) view = new ListView model: list li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' list.reset([{name: 2}, {name: 3}]) li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '2' expect(li.eq(1)).to.have.text '3' it 'should iterate over model field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: 'list' view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) model = new Backbone.Model({list: list}) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' model.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should iterate over view field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' defaults: list: null initialize: -> this.set 'list', new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) template: '': each: field: 'list' view: Item el: '> *' model = new Backbone.Model() view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' view.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should have viewList as EachViewList', -> Item = DomView.extend defaults: selected: false initialize: -> this.set('selected', this.model.get('name') < 3) template: 'root': html: '@name' class: 'selected': '@selected' ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: Item el: '> *' list = new Backbone.Collection([{id: 1, name: 1}, {id: 2, name: 2}, {id: 3, name: 3}]) view = new ListView model: list viewList = view.getViewList('root') views = viewList.where({selected: true}) expect(views.length).to.equal 2 expect(views[0].$el).to.have.class 'selected' expect(views[1].$el).to.have.class 'selected' expect(viewList[list.at(2).cid].$el).not.to.have.class 'selected' views = viewList.where({selected: /^f/}) expect(views.length).to.equal 1 expect(views[0]).to.equal viewList[list.at(2).cid] views = viewList.findWhere({selected: false}) expect(views).to.equal viewList[list.at(2).cid] views = viewList.getByEl(view.$el.children().eq(1)) expect(views).to.equal viewList[list.at(1).cid] views = viewList.getByEl(view.$el.children().get(2)) expect(views).to.equal viewList[list.at(2).cid] expect(list.at(0)).to.equal viewList.get(list.at(0)).model expect(list.at(0)).to.equal viewList.get(list.at(0).id).model expect(list.at(0)).to.equal viewList.get(list.at(0).cid).model it 'should handle "at" option', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'appendAt' list = new Backbone.Collection([{name: '<NAME>'}, {name: '<NAME>'}]) listView = new ListView model: list el = listView.$el expect(el).to.have.text '<NAME>' list.add({name: '<NAME>'}, {at: 1}) expect(el).to.have.text '<NAME>' it 'should create view own prop with viewList', -> ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: DomView viewProp: 'list' view = new ListView model: new Backbone.Collection([{}, {}]) expect(view.list).to.equal view.getViewList('root') it 'should trigger change:field', -> ListView = DomView.extend el: '<ul><li></li></ul>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: '> *' view = new ListView() num = 0 view.bind '@list', -> num++ expect(num).to.equal 1 view.get('list').add({id: 1}) expect(num).to.equal 2 view.get('list').remove(1) expect(num).to.equal 3 view.get('list').reset([{}, {}, {}]) expect(num).to.equal 4 it 'should accept el as jQuery object', -> ListView = DomView.extend el: '<div></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: (ul) -> expect(this).to.be.an.instanceof(ListView) expect(ul).to.be.an.instanceof(jQuery) return jQuery('<span>') view = new ListView() view.get('list').add([{}, {}]) expect(view.$el.find('> span').length).to.equal(2) it 'should accept el as object of types', -> ListView = DomView.extend el: '<div><span class="type-test1"></span><span data-type="test2"></span><span data-type="test3"></span></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: 'data-type': 'type' 'class': (model) -> 'type-' + model.get('type') view = new ListView() view.get('list').add([{type: 'test2'}, {type: 'test3'}, {type: 'test1'}]) items = view.$el.children() expect(items.length).to.equal(3) expect(items.eq(0)).to.have.attr 'data-type', 'test2' expect(items.eq(1)).to.have.attr 'data-type', 'test3' expect(items.eq(2)).to.have.class 'type-test1' it 'should remove class from clone', -> ListView = DomView.extend el: '<ul><li class="hidden test"></li></ul>' defaults: -> list: new Backbone.Collection([{}, {}]) template: 'root': each: field: 'list' view: DomView el: '> *' removeClass: 'hidden' view = new ListView() expect(view.$el.children().length).to.equal(2) expect(view.$el.find('.hidden').length).to.equal(0) expect(view.$el.find('.test').length).to.equal(2)
true
define ['chai', 'backbone', 'backbone-dom-view'], ({expect}, Backbone, DomView) -> model = null beforeEach -> model = new Backbone.Model() describe 'each helper', -> it 'should create view for each item in collection', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View list = new Backbone.Collection [{name: 'PI:NAME:<NAME>END_PI'}, {name: 'PI:NAME:<NAME>END_PI'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 2 list.add {name: 'PI:NAME:<NAME>END_PI'} expect(el.find('li').length).to.equal 3 list.at(1).destroy() expect(el).to.have.text 'PI:NAME:<NAME>END_PI' it 'should run custom view function', -> LiView = DomView.extend tagName: 'li' DivView = DomView.extend tagName: 'div' ListView = DomView.extend tagName: 'ul' template: '': each: view: (model)-> if model.get('type') is 'li' then LiView else DivView list = new Backbone.Collection [{type: 'li'}, {type: 'div'}] listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.be.equal 1 expect(el.find('div').length).to.be.equal 1 it 'should run custom insertion/remove function', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'prepend' delHandler: (ul, view) -> expect(this).to.be.instanceOf ListView expect(view).to.be.instanceOf View list = new Backbone.Collection [{name: 'PI:NAME:<NAME>END_PI'}, {name: 'PI:NAME:<NAME>END_PI'}] listView = new ListView model: list el = listView.$el expect(el).to.have.text 'PI:NAME:<NAME>END_PI' list.at(0).destroy() expect(el).to.have.text 'PI:NAME:<NAME>END_PI' it 'should create view with el:', -> View = DomView.extend template: '': html: '@name' ListView = DomView.extend el: $('<ul><li class="test"></li></ul>') template: '': each: view: View el: '> *' list = new Backbone.Collection() listView = new ListView model: list el = listView.$el expect(el.find('li').length).to.equal 0 list.set([{name: 'PI:NAME:<NAME>END_PI'}, {name: 'PI:NAME:<NAME>END_PI'}]) expect(el.find('li').length).to.equal 2 expect(el.find('li')).to.have.class 'test' it 'should create view with el: as function', -> ViewDef = DomView.extend template: 'root': html: '@type' ListView = DomView.extend el: '<ul><li class="test1"></li></ul>' template: 'root': each: view: ViewDef el: -> '> .test1' list = new Backbone.Collection([{type: 1},{type: 2},{type: 3},{type: 4}]) listView = new ListView model: list el = listView.$el expect(el.find('li.test1').length).to.equal 4 it 'should have `parent` field', -> views = [] ListView = DomView.extend el: '<ul></ul>' template: '': each: view: (model) -> view = new Backbone.View(model: model) view.parent = true if model.get('parent') views.push(view); return view list = new Backbone.Collection([{parent: false}, {parent: true}]) listView = new ListView model: list expect(views[0].parent).to.be.equal listView expect(views[1].parent).to.be.equal true it 'should to be sorted by event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: true list = new Backbone.Collection() list.comparator = 'name'; view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' it 'should to be sorted by custom event and field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should to be sorted by order', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sort: event: 'test' field: 'name' order: 'desc' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 3}, {name: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '3' expect(li.eq(2)).to.have.text '2' list.trigger('test') li = view.$el.children() expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '1' expect(list.at(0).get('name')).to.equal 1 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 2 it 'should sort list by views event on event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: 'test' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1}, {name: 2}, {name: 3}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 2 expect(list.at(1).get('name')).to.equal 3 expect(list.at(2).get('name')).to.equal 1 it 'should sort list by views on event and set index to field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' sortByViews: event: 'test' field: 'order' list = new Backbone.Collection() view = new ListView model: list list.set([{name: 1, order: 0}, {name: 2, order: 1}, {name: 3, order: 2}]) li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' li.eq(0).insertAfter(li.eq(2)) view.trigger('test') expect(list.at(0).get('name')).to.equal 1 expect(list.at(0).get('order')).to.equal 2 expect(list.at(1).get('name')).to.equal 2 expect(list.at(1).get('order')).to.equal 0 expect(list.at(2).get('name')).to.equal 3 expect(list.at(2).get('order')).to.equal 1 it 'should iterate over plain array with collection class', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: Backbone.Collection view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should iterate over plain array with wrapper function', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: name: 'list' wrapper: (list) -> expect(this).to.be.instanceOf DomView return new Backbone.Collection(list) view: Item el: '> *' model = new Backbone.Model({ list: [{name: 1},{name: 2}] }) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' model.set('list', [{name: 3}, {name: 4}, {name: 5}]) li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '3' expect(li.eq(1)).to.have.text '4' expect(li.eq(2)).to.have.text '5' model.set('list', [{name: 6}]) li = view.$el.children() expect(li.length).to.equal 1 expect(li.eq(0)).to.have.text '6' it 'should trigger added event', -> num = 0 Item = DomView.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> num++ expect(this.$el.parent().length).to.equal 1 template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' model = new Backbone.Collection([{name: 1},{name: 2}]) view = new ListView model: model expect(num).to.equal 2 x = 0; XItem = Item.extend initialize: -> expect(this.$el.parent().length).to.equal 0 this.on 'added', -> x++ this.on 'tested', -> x++ expect(this.$el.parent().length).to.equal 1 XListView = ListView.extend template: '': each: addedEvent: 'tested' view: XItem view = new XListView model: model expect(x).to.equal 2 it 'should handle reset event', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) view = new ListView model: list li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' list.reset([{name: 2}, {name: 3}]) li = view.$el.children() expect(li.length).to.equal 2 expect(li.eq(0)).to.have.text '2' expect(li.eq(1)).to.have.text '3' it 'should iterate over model field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' template: '': each: field: 'list' view: Item el: '> *' list = new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) model = new Backbone.Model({list: list}) view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' model.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should iterate over view field', -> Item = DomView.extend template: '': html: '@name' ListView = DomView.extend el: '<ul><li></li></ul>' defaults: list: null initialize: -> this.set 'list', new Backbone.Collection([{name: 1}, {name: 2}, {name: 3}]) template: '': each: field: 'list' view: Item el: '> *' model = new Backbone.Model() view = new ListView model: model li = view.$el.children() expect(li.length).to.equal 3 expect(li.eq(0)).to.have.text '1' expect(li.eq(1)).to.have.text '2' expect(li.eq(2)).to.have.text '3' view.get('list').add({name: 4}) expect(view.$el.children().eq(3)).to.have.text '4' it 'should have viewList as EachViewList', -> Item = DomView.extend defaults: selected: false initialize: -> this.set('selected', this.model.get('name') < 3) template: 'root': html: '@name' class: 'selected': '@selected' ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: Item el: '> *' list = new Backbone.Collection([{id: 1, name: 1}, {id: 2, name: 2}, {id: 3, name: 3}]) view = new ListView model: list viewList = view.getViewList('root') views = viewList.where({selected: true}) expect(views.length).to.equal 2 expect(views[0].$el).to.have.class 'selected' expect(views[1].$el).to.have.class 'selected' expect(viewList[list.at(2).cid].$el).not.to.have.class 'selected' views = viewList.where({selected: /^f/}) expect(views.length).to.equal 1 expect(views[0]).to.equal viewList[list.at(2).cid] views = viewList.findWhere({selected: false}) expect(views).to.equal viewList[list.at(2).cid] views = viewList.getByEl(view.$el.children().eq(1)) expect(views).to.equal viewList[list.at(1).cid] views = viewList.getByEl(view.$el.children().get(2)) expect(views).to.equal viewList[list.at(2).cid] expect(list.at(0)).to.equal viewList.get(list.at(0)).model expect(list.at(0)).to.equal viewList.get(list.at(0).id).model expect(list.at(0)).to.equal viewList.get(list.at(0).cid).model it 'should handle "at" option', -> View = DomView.extend tagName: 'li' template: '': html: '@name' ListView = DomView.extend tagName: 'ul' template: '': each: view: View addHandler: 'appendAt' list = new Backbone.Collection([{name: 'PI:NAME:<NAME>END_PI'}, {name: 'PI:NAME:<NAME>END_PI'}]) listView = new ListView model: list el = listView.$el expect(el).to.have.text 'PI:NAME:<NAME>END_PI' list.add({name: 'PI:NAME:<NAME>END_PI'}, {at: 1}) expect(el).to.have.text 'PI:NAME:<NAME>END_PI' it 'should create view own prop with viewList', -> ListView = DomView.extend el: '<ul><li></li></ul>' template: 'root': each: view: DomView viewProp: 'list' view = new ListView model: new Backbone.Collection([{}, {}]) expect(view.list).to.equal view.getViewList('root') it 'should trigger change:field', -> ListView = DomView.extend el: '<ul><li></li></ul>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: '> *' view = new ListView() num = 0 view.bind '@list', -> num++ expect(num).to.equal 1 view.get('list').add({id: 1}) expect(num).to.equal 2 view.get('list').remove(1) expect(num).to.equal 3 view.get('list').reset([{}, {}, {}]) expect(num).to.equal 4 it 'should accept el as jQuery object', -> ListView = DomView.extend el: '<div></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: (ul) -> expect(this).to.be.an.instanceof(ListView) expect(ul).to.be.an.instanceof(jQuery) return jQuery('<span>') view = new ListView() view.get('list').add([{}, {}]) expect(view.$el.find('> span').length).to.equal(2) it 'should accept el as object of types', -> ListView = DomView.extend el: '<div><span class="type-test1"></span><span data-type="test2"></span><span data-type="test3"></span></div>' defaults: -> list: new Backbone.Collection() template: 'root': each: field: 'list' view: DomView el: 'data-type': 'type' 'class': (model) -> 'type-' + model.get('type') view = new ListView() view.get('list').add([{type: 'test2'}, {type: 'test3'}, {type: 'test1'}]) items = view.$el.children() expect(items.length).to.equal(3) expect(items.eq(0)).to.have.attr 'data-type', 'test2' expect(items.eq(1)).to.have.attr 'data-type', 'test3' expect(items.eq(2)).to.have.class 'type-test1' it 'should remove class from clone', -> ListView = DomView.extend el: '<ul><li class="hidden test"></li></ul>' defaults: -> list: new Backbone.Collection([{}, {}]) template: 'root': each: field: 'list' view: DomView el: '> *' removeClass: 'hidden' view = new ListView() expect(view.$el.children().length).to.equal(2) expect(view.$el.find('.hidden').length).to.equal(0) expect(view.$el.find('.test').length).to.equal(2)
[ { "context": "e login\n localStorage.setItem 'grid-token', '93c76ec0-d14b-11e3-9c1a-0800200c9a66'\n localStorage.setItem 'grid-user', JSON.str", "end": 258, "score": 0.9939930438995361, "start": 222, "tag": "PASSWORD", "value": "93c76ec0-d14b-11e3-9c1a-0800200c9a66" }, { "context": "cff0-d14c-11e3-9c1a-0800200c9a66'\n email: 'user@domain.com'\n name: 'Test User'\n avatar: 'https", "end": 399, "score": 0.9998971819877625, "start": 384, "tag": "EMAIL", "value": "user@domain.com" }, { "context": "'\n email: 'user@domain.com'\n name: 'Test User'\n avatar: 'https://secure.gravatar.com/ava", "end": 425, "score": 0.994972288608551, "start": 416, "tag": "NAME", "value": "Test User" } ]
spec/Initialization.coffee
taylorzane/noflo-ui
1
describe 'NoFlo UI initialization', -> win = null doc = null db = null before (done) -> @timeout 75000 unless localStorage.getItem 'grid-token' # Fake login localStorage.setItem 'grid-token', '93c76ec0-d14b-11e3-9c1a-0800200c9a66' localStorage.setItem 'grid-user', JSON.stringify uuid: '11eecff0-d14c-11e3-9c1a-0800200c9a66' email: 'user@domain.com' name: 'Test User' avatar: 'https://secure.gravatar.com/avatar/995f27ce7205a79c55d4e44223cd6de0' iframe = document.getElementById 'app' iframe.src = '../index.html' iframe.onload = -> win = iframe.contentWindow doc = iframe.contentDocument setTimeout -> done() , 5000 after -> db.close() describe 'on startup', -> it 'should start the NoFlo process', (done) -> @timeout 75000 checkNoFlo = -> chai.expect(win.nofloStarted).to.be.a 'boolean' if win.nofloDBReady chai.expect(win.nofloDBReady).to.be.a 'boolean' return done() setTimeout checkNoFlo, 1000 setTimeout checkNoFlo, 1000 it 'should start with the main screen', -> chai.expect(win.location.hash).to.equal '' describe 'NoFlo PrepareStorage', -> it 'should have created the IndexedDB database', (done) -> indexedDB = win.overrideIndexedDB or win.indexedDB chai.expect(indexedDB).to.be.an 'object' req = indexedDB.open 'noflo-ui', 4 req.onerror = -> chai.expect(true).to.equal false done() req.onupgradeneeded = (e) => e.target.transaction.abort() throw new Error 'We didn\'t get a ready database' req.onsuccess = (event) -> db = event.target.result chai.expect(db).to.be.an 'object' done() it 'should have created the project store', -> chai.expect(db.objectStoreNames.contains('projects')).to.equal true it 'should have created the graph store', -> chai.expect(db.objectStoreNames.contains('graphs')).to.equal true it 'should have created the component store', -> chai.expect(db.objectStoreNames.contains('components')).to.equal true it 'should have created the runtime store', -> chai.expect(db.objectStoreNames.contains('runtimes')).to.equal true it 'should have created the spec store', -> chai.expect(db.objectStoreNames.contains('specs')).to.equal true
156502
describe 'NoFlo UI initialization', -> win = null doc = null db = null before (done) -> @timeout 75000 unless localStorage.getItem 'grid-token' # Fake login localStorage.setItem 'grid-token', '<PASSWORD>' localStorage.setItem 'grid-user', JSON.stringify uuid: '11eecff0-d14c-11e3-9c1a-0800200c9a66' email: '<EMAIL>' name: '<NAME>' avatar: 'https://secure.gravatar.com/avatar/995f27ce7205a79c55d4e44223cd6de0' iframe = document.getElementById 'app' iframe.src = '../index.html' iframe.onload = -> win = iframe.contentWindow doc = iframe.contentDocument setTimeout -> done() , 5000 after -> db.close() describe 'on startup', -> it 'should start the NoFlo process', (done) -> @timeout 75000 checkNoFlo = -> chai.expect(win.nofloStarted).to.be.a 'boolean' if win.nofloDBReady chai.expect(win.nofloDBReady).to.be.a 'boolean' return done() setTimeout checkNoFlo, 1000 setTimeout checkNoFlo, 1000 it 'should start with the main screen', -> chai.expect(win.location.hash).to.equal '' describe 'NoFlo PrepareStorage', -> it 'should have created the IndexedDB database', (done) -> indexedDB = win.overrideIndexedDB or win.indexedDB chai.expect(indexedDB).to.be.an 'object' req = indexedDB.open 'noflo-ui', 4 req.onerror = -> chai.expect(true).to.equal false done() req.onupgradeneeded = (e) => e.target.transaction.abort() throw new Error 'We didn\'t get a ready database' req.onsuccess = (event) -> db = event.target.result chai.expect(db).to.be.an 'object' done() it 'should have created the project store', -> chai.expect(db.objectStoreNames.contains('projects')).to.equal true it 'should have created the graph store', -> chai.expect(db.objectStoreNames.contains('graphs')).to.equal true it 'should have created the component store', -> chai.expect(db.objectStoreNames.contains('components')).to.equal true it 'should have created the runtime store', -> chai.expect(db.objectStoreNames.contains('runtimes')).to.equal true it 'should have created the spec store', -> chai.expect(db.objectStoreNames.contains('specs')).to.equal true
true
describe 'NoFlo UI initialization', -> win = null doc = null db = null before (done) -> @timeout 75000 unless localStorage.getItem 'grid-token' # Fake login localStorage.setItem 'grid-token', 'PI:PASSWORD:<PASSWORD>END_PI' localStorage.setItem 'grid-user', JSON.stringify uuid: '11eecff0-d14c-11e3-9c1a-0800200c9a66' email: 'PI:EMAIL:<EMAIL>END_PI' name: 'PI:NAME:<NAME>END_PI' avatar: 'https://secure.gravatar.com/avatar/995f27ce7205a79c55d4e44223cd6de0' iframe = document.getElementById 'app' iframe.src = '../index.html' iframe.onload = -> win = iframe.contentWindow doc = iframe.contentDocument setTimeout -> done() , 5000 after -> db.close() describe 'on startup', -> it 'should start the NoFlo process', (done) -> @timeout 75000 checkNoFlo = -> chai.expect(win.nofloStarted).to.be.a 'boolean' if win.nofloDBReady chai.expect(win.nofloDBReady).to.be.a 'boolean' return done() setTimeout checkNoFlo, 1000 setTimeout checkNoFlo, 1000 it 'should start with the main screen', -> chai.expect(win.location.hash).to.equal '' describe 'NoFlo PrepareStorage', -> it 'should have created the IndexedDB database', (done) -> indexedDB = win.overrideIndexedDB or win.indexedDB chai.expect(indexedDB).to.be.an 'object' req = indexedDB.open 'noflo-ui', 4 req.onerror = -> chai.expect(true).to.equal false done() req.onupgradeneeded = (e) => e.target.transaction.abort() throw new Error 'We didn\'t get a ready database' req.onsuccess = (event) -> db = event.target.result chai.expect(db).to.be.an 'object' done() it 'should have created the project store', -> chai.expect(db.objectStoreNames.contains('projects')).to.equal true it 'should have created the graph store', -> chai.expect(db.objectStoreNames.contains('graphs')).to.equal true it 'should have created the component store', -> chai.expect(db.objectStoreNames.contains('components')).to.equal true it 'should have created the runtime store', -> chai.expect(db.objectStoreNames.contains('runtimes')).to.equal true it 'should have created the spec store', -> chai.expect(db.objectStoreNames.contains('specs')).to.equal true
[ { "context": "meters: [\n {\n 'key': 'question_id',\n 'description': '<p>ID of the Questi", "end": 1008, "score": 0.7898721694946289, "start": 1006, "tag": "KEY", "value": "id" }, { "context": "element': 'string',\n 'content': 'question_id'\n },\n 'value': {", "end": 3405, "score": 0.6235373020172119, "start": 3397, "tag": "KEY", "value": "question" }, { "context": " parameters: [\n {\n 'key': 'question_id',\n 'description': '',\n 'typ", "end": 3662, "score": 0.9753060340881348, "start": 3651, "tag": "KEY", "value": "question_id" } ]
test/getUriParameters-test.coffee
apiaryio/metamorphoses
1
{assert} = require('chai') getUriParameters = require('../src/adapters/refract/getUriParameters') describe('Transformation • Refract • getUriParameters' , -> context('Transforming URI Parameters without error', -> tests = [ { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'description': 'ID of the Question in form of an integer' }, 'attributes': { 'typeAttributes': [ 'required' ] }, 'content': { 'key': { 'element': 'string', 'content': 'question_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': 'question_id', 'description': '<p>ID of the Question in form of an integer</p>\n', 'type': 'number', 'required': true, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': [ [ { 'element': 'number', 'content': 2 } ] ], 'default': [ { 'element': 'number', 'content': 1 } ] }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '1', 'example': '2', 'values': [ '1', '2', '3' ] } ] }, # Parameter is optional by default with no type attributes { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'content': { 'key': { 'element': 'string', 'content': 'question_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': 'question_id', 'description': '', 'type': 'number', 'required': false, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: undefined, parameters: undefined, }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'title': 'datetime', 'description': 'Filter for posts since the specified date' }, 'content': { 'key': { 'element': 'string', 'content': 'since' }, 'value': { 'element': 'string', 'content': 'thursday' } } } ] }, parameters: [ { 'key': 'since', 'description': '<p>Filter for posts since the specified date</p>\n', 'type': 'datetime', 'required': false, 'default': '', 'example': 'thursday', 'values': [ ] } ] }, { hrefVariables: { "element": "hrefVariables", "meta": {}, "attributes": {}, "content": [ { "element": "member", "meta": {}, "attributes": {}, "content": { "key": { "element": "string", "meta": {}, "attributes": {}, "content": "filters" }, "value": { "element": "array", "meta": {}, "attributes": {}, "content": [ { "element": "enum", "meta": {}, "attributes": {}, "content": [ { "element": "string", "meta": {}, "attributes": {}, "content": "wifi" }, { "element": "string", "meta": {}, "attributes": {}, "content": "accept_cards" }, { "element": "string", "meta": {}, "attributes": {}, "content": "open_now" } ] } ] } } } ] }, parameters: [{ "default": "" "description": "" "example": "" "key": "filters" "required": false "type": "array" "values": [ "wifi", "accept_cards", "open_now" ] }] }, # Sample and default attributes specify no content, just type { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': { 'element': 'number', }, 'default': { 'element': 'number', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '', 'example': '', 'values': [ '1', '2', '3' ] } ] }, # Default attribute's content is empty array { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'array', 'attributes': { 'samples': { 'element': 'array', }, 'default': { 'content': [], 'element': 'array', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'array', 'required': false, 'default': [], 'example': '', 'values': [ '1', '2', '3' ] } ] }, ] it('should be transformed into a `parameter` object', -> tests.map((test) -> assert.deepEqual(getUriParameters(test.hrefVariables), test.parameters) ) ) ) )
815
{assert} = require('chai') getUriParameters = require('../src/adapters/refract/getUriParameters') describe('Transformation • Refract • getUriParameters' , -> context('Transforming URI Parameters without error', -> tests = [ { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'description': 'ID of the Question in form of an integer' }, 'attributes': { 'typeAttributes': [ 'required' ] }, 'content': { 'key': { 'element': 'string', 'content': 'question_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': 'question_<KEY>', 'description': '<p>ID of the Question in form of an integer</p>\n', 'type': 'number', 'required': true, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': [ [ { 'element': 'number', 'content': 2 } ] ], 'default': [ { 'element': 'number', 'content': 1 } ] }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '1', 'example': '2', 'values': [ '1', '2', '3' ] } ] }, # Parameter is optional by default with no type attributes { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'content': { 'key': { 'element': 'string', 'content': '<KEY>_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': '<KEY>', 'description': '', 'type': 'number', 'required': false, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: undefined, parameters: undefined, }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'title': 'datetime', 'description': 'Filter for posts since the specified date' }, 'content': { 'key': { 'element': 'string', 'content': 'since' }, 'value': { 'element': 'string', 'content': 'thursday' } } } ] }, parameters: [ { 'key': 'since', 'description': '<p>Filter for posts since the specified date</p>\n', 'type': 'datetime', 'required': false, 'default': '', 'example': 'thursday', 'values': [ ] } ] }, { hrefVariables: { "element": "hrefVariables", "meta": {}, "attributes": {}, "content": [ { "element": "member", "meta": {}, "attributes": {}, "content": { "key": { "element": "string", "meta": {}, "attributes": {}, "content": "filters" }, "value": { "element": "array", "meta": {}, "attributes": {}, "content": [ { "element": "enum", "meta": {}, "attributes": {}, "content": [ { "element": "string", "meta": {}, "attributes": {}, "content": "wifi" }, { "element": "string", "meta": {}, "attributes": {}, "content": "accept_cards" }, { "element": "string", "meta": {}, "attributes": {}, "content": "open_now" } ] } ] } } } ] }, parameters: [{ "default": "" "description": "" "example": "" "key": "filters" "required": false "type": "array" "values": [ "wifi", "accept_cards", "open_now" ] }] }, # Sample and default attributes specify no content, just type { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': { 'element': 'number', }, 'default': { 'element': 'number', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '', 'example': '', 'values': [ '1', '2', '3' ] } ] }, # Default attribute's content is empty array { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'array', 'attributes': { 'samples': { 'element': 'array', }, 'default': { 'content': [], 'element': 'array', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'array', 'required': false, 'default': [], 'example': '', 'values': [ '1', '2', '3' ] } ] }, ] it('should be transformed into a `parameter` object', -> tests.map((test) -> assert.deepEqual(getUriParameters(test.hrefVariables), test.parameters) ) ) ) )
true
{assert} = require('chai') getUriParameters = require('../src/adapters/refract/getUriParameters') describe('Transformation • Refract • getUriParameters' , -> context('Transforming URI Parameters without error', -> tests = [ { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'description': 'ID of the Question in form of an integer' }, 'attributes': { 'typeAttributes': [ 'required' ] }, 'content': { 'key': { 'element': 'string', 'content': 'question_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': 'question_PI:KEY:<KEY>END_PI', 'description': '<p>ID of the Question in form of an integer</p>\n', 'type': 'number', 'required': true, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': [ [ { 'element': 'number', 'content': 2 } ] ], 'default': [ { 'element': 'number', 'content': 1 } ] }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '1', 'example': '2', 'values': [ '1', '2', '3' ] } ] }, # Parameter is optional by default with no type attributes { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'content': { 'key': { 'element': 'string', 'content': 'PI:KEY:<KEY>END_PI_id' }, 'value': { 'element': 'number', 'content': 1 } } } ] }, parameters: [ { 'key': 'PI:KEY:<KEY>END_PI', 'description': '', 'type': 'number', 'required': false, 'default': '', 'example': '1', 'values': [ ] } ] }, { hrefVariables: undefined, parameters: undefined, }, { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'meta': { 'title': 'datetime', 'description': 'Filter for posts since the specified date' }, 'content': { 'key': { 'element': 'string', 'content': 'since' }, 'value': { 'element': 'string', 'content': 'thursday' } } } ] }, parameters: [ { 'key': 'since', 'description': '<p>Filter for posts since the specified date</p>\n', 'type': 'datetime', 'required': false, 'default': '', 'example': 'thursday', 'values': [ ] } ] }, { hrefVariables: { "element": "hrefVariables", "meta": {}, "attributes": {}, "content": [ { "element": "member", "meta": {}, "attributes": {}, "content": { "key": { "element": "string", "meta": {}, "attributes": {}, "content": "filters" }, "value": { "element": "array", "meta": {}, "attributes": {}, "content": [ { "element": "enum", "meta": {}, "attributes": {}, "content": [ { "element": "string", "meta": {}, "attributes": {}, "content": "wifi" }, { "element": "string", "meta": {}, "attributes": {}, "content": "accept_cards" }, { "element": "string", "meta": {}, "attributes": {}, "content": "open_now" } ] } ] } } } ] }, parameters: [{ "default": "" "description": "" "example": "" "key": "filters" "required": false "type": "array" "values": [ "wifi", "accept_cards", "open_now" ] }] }, # Sample and default attributes specify no content, just type { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'enum', 'attributes': { 'samples': { 'element': 'number', }, 'default': { 'element': 'number', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'enum', 'required': false, 'default': '', 'example': '', 'values': [ '1', '2', '3' ] } ] }, # Default attribute's content is empty array { hrefVariables: { 'element': 'hrefVariables', 'content': [ { 'element': 'member', 'attributes': { 'typeAttributes': [ 'optional' ] }, 'content': { 'key': { 'element': 'string', 'content': 'page' }, 'value': { 'element': 'array', 'attributes': { 'samples': { 'element': 'array', }, 'default': { 'content': [], 'element': 'array', } }, 'content': [ { 'element': 'number', 'content': 1 }, { 'element': 'number', 'content': 2 }, { 'element': 'number', 'content': 3 } ] } } } ] }, parameters: [ { 'key': 'page', 'description': '', 'type': 'array', 'required': false, 'default': [], 'example': '', 'values': [ '1', '2', '3' ] } ] }, ] it('should be transformed into a `parameter` object', -> tests.map((test) -> assert.deepEqual(getUriParameters(test.hrefVariables), test.parameters) ) ) ) )
[ { "context": "\" data-on-keyup=\"MyLib.onKeyup\" type=\"text\" name=\"testName\" value=\"testValue\" />\n </div>\n \"\"\"\n", "end": 291, "score": 0.606076180934906, "start": 287, "tag": "NAME", "value": "test" }, { "context": "ta-on-keyup=\"MyLib.onKeyup\" type=\"text\" name=\"testName\" value=\"testValue\" />\n </div>\n \"\"\"\n\n d", "end": 295, "score": 0.3174772262573242, "start": 291, "tag": "NAME", "value": "Name" } ]
test/keyup.coffee
andrewchilds/fastbinder
6
target = null beforeEach -> target = null describe 'Scroll Event Handling', -> beforeEach -> spyOn(MyLib, 'onKeyup').and.callFake -> target = @ false fixture """ <div id="parent"> <input id="test" data-on-keyup="MyLib.onKeyup" type="text" name="testName" value="testValue" /> </div> """ describe 'with a keyup delay of 10ms', -> beforeEach (done) -> $.fastbinder.setOptions({ keyupDelay: 10 }) $('#test').focus() $('#test').keyup() $('#test').blur() setTimeout done, 20 it 'should handle keyup events on the element with a delay', -> expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] describe 'without a keyup delay', -> beforeEach -> $.fastbinder.setOptions({ keyupDelay: 0 }) it 'should handle keyup events on the element', -> $('#test').focus() $('#test').keyup() $('#test').blur() expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] it 'should ignore keyup events on a parent element', -> $('#parent').focus() $('#parent').keyup() $('#parent').blur() expect(MyLib.onKeyup).not.toHaveBeenCalled()
73909
target = null beforeEach -> target = null describe 'Scroll Event Handling', -> beforeEach -> spyOn(MyLib, 'onKeyup').and.callFake -> target = @ false fixture """ <div id="parent"> <input id="test" data-on-keyup="MyLib.onKeyup" type="text" name="<NAME> <NAME>" value="testValue" /> </div> """ describe 'with a keyup delay of 10ms', -> beforeEach (done) -> $.fastbinder.setOptions({ keyupDelay: 10 }) $('#test').focus() $('#test').keyup() $('#test').blur() setTimeout done, 20 it 'should handle keyup events on the element with a delay', -> expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] describe 'without a keyup delay', -> beforeEach -> $.fastbinder.setOptions({ keyupDelay: 0 }) it 'should handle keyup events on the element', -> $('#test').focus() $('#test').keyup() $('#test').blur() expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] it 'should ignore keyup events on a parent element', -> $('#parent').focus() $('#parent').keyup() $('#parent').blur() expect(MyLib.onKeyup).not.toHaveBeenCalled()
true
target = null beforeEach -> target = null describe 'Scroll Event Handling', -> beforeEach -> spyOn(MyLib, 'onKeyup').and.callFake -> target = @ false fixture """ <div id="parent"> <input id="test" data-on-keyup="MyLib.onKeyup" type="text" name="PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI" value="testValue" /> </div> """ describe 'with a keyup delay of 10ms', -> beforeEach (done) -> $.fastbinder.setOptions({ keyupDelay: 10 }) $('#test').focus() $('#test').keyup() $('#test').blur() setTimeout done, 20 it 'should handle keyup events on the element with a delay', -> expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] describe 'without a keyup delay', -> beforeEach -> $.fastbinder.setOptions({ keyupDelay: 0 }) it 'should handle keyup events on the element', -> $('#test').focus() $('#test').keyup() $('#test').blur() expect(MyLib.onKeyup).toHaveBeenCalled() expect(target).toBe $('#test')[0] it 'should ignore keyup events on a parent element', -> $('#parent').focus() $('#parent').keyup() $('#parent').blur() expect(MyLib.onKeyup).not.toHaveBeenCalled()
[ { "context": "ask object has an ID', ->\n task = { name : 'bad' }\n\n driver.create task\n\n .then -> thro", "end": 2924, "score": 0.6964540481567383, "start": 2921, "tag": "NAME", "value": "bad" }, { "context": "= {\n id : 'my-test-id'\n name : 'my-test-name'\n }\n\n driver.create task\n\n .then (", "end": 3504, "score": 0.7638103365898132, "start": 3492, "tag": "NAME", "value": "my-test-name" }, { "context": "ql 'my-test-id'\n expect(task.name).to.eql 'my-test-name'\n\n expect(driver.store['my-test-", "end": 3643, "score": 0.9349005222320557, "start": 3641, "tag": "NAME", "value": "my" } ]
test/lib/driver-memory.spec.coffee
scull7/uow-store
0
bluebird = require 'bluebird' MemoryDriver = require '../../lib/driver-memory.js' TaskLock = require 'uow-lock' describe 'Memory Driver', -> driver = null before -> driver = new MemoryDriver() describe '::findReady', -> beforeEach -> @clock = sinon.useFakeTimers() driver = new MemoryDriver() t1 = driver.create { id : 'ready-1' name : 'ready-task-one' status : 'ready' } t2 = driver.create { id : 'not-ready-1' name : 'not-ready-task-one' status : 'new' } t3 = driver.create { id : 'ready-2' name : 'ready-task-two' status : 'ready' } t4 = driver.create { id : 'not-ready-2' name : 'not-ready-task-two' status : 'new' } bluebird.join t1, t2, t3, t4 afterEach -> @clock.restore() it 'should start the ready search if the option is set.', (done) -> tick = @clock.tick.bind(@) initDriver = new MemoryDriver({ runTaskSearch: true }) initDriver.on 'task::ready', (taskId) -> expect(taskId).to.eql 'ready-on-start' done() t1 = initDriver.create { id : 'ready-on-start' name : 'ready-on-start' status : 'ready' } .then -> tick 501 it 'should emit ready events for all ready, unlocked tasks.', (done) -> readyTasks = [] driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 2 setTimeout -> expect(readyTasks.length).to.eql 2 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 driver.findReady() @clock.tick(10) it 'should call the task after the set delay if search is turned on', (done) -> driver.runTaskSearch = true driver.taskReadyDelay = 100 readyTasks = [] tick = @clock.tick.bind(@) driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 3 setTimeout -> expect(readyTasks.length).to.eql 3 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 tick 10 driver.findReady() driver.getById 'ready-2' .then (task) -> task.status = 'success' driver.update task .then -> tick 101 describe '::create', -> it 'should be a function with an arity of one', -> expect(driver.create).to.be.a 'function' expect(driver.create.length).to.eql 1 it 'should throw an exception if the task object has an ID', -> task = { name : 'bad' } driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw an exception if the task object already exists', -> task = { id : 'duplicate-id' } driver.create task .then (task) -> driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdExists' it 'should store the new task', -> task = { id : 'my-test-id' name : 'my-test-name' } driver.create task .then (task) -> expect(task.id).to.eql 'my-test-id' expect(task.name).to.eql 'my-test-name' expect(driver.store['my-test-id']).to.eql task describe '::update', -> it 'should be a function with an arity of one', -> expect(driver.update).to.be.a 'function' expect(driver.update.length).to.eql 1 it 'should throw a TypeError if the task doesn\'t have an ID', -> task = { name : 'not-saved' } driver.update task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw a RangeError if the task is not found', -> task = id : 'not-found' name : 'not-found-name' driver.update task .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should update the stored task', -> task = id : 'update-test' name : 'update-test-name' driver.create task .then (task) -> task.updated = 1 driver.update task .then (task) -> expect(task.id).to.eql 'update-test' expect(task.name).to.eql 'update-test-name' expect(task.updated).to.eql 1 describe '::getById', -> it 'should be a function with an arity of one', -> expect(driver.getById).to.be.a 'function' expect(driver.getById.length).to.eql 1 it 'should throw a RangeError when the task is not found', -> task = id : 'not-found-id' name : 'not-found-name' driver.getById(task.id) .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should return the saved task object', -> task = id : 'found-id' name : 'found-name' driver.create task .then -> driver.getById 'found-id' .then (task) -> expect(task.id).to.eql 'found-id' expect(task.name).to.eql 'found-name'
134165
bluebird = require 'bluebird' MemoryDriver = require '../../lib/driver-memory.js' TaskLock = require 'uow-lock' describe 'Memory Driver', -> driver = null before -> driver = new MemoryDriver() describe '::findReady', -> beforeEach -> @clock = sinon.useFakeTimers() driver = new MemoryDriver() t1 = driver.create { id : 'ready-1' name : 'ready-task-one' status : 'ready' } t2 = driver.create { id : 'not-ready-1' name : 'not-ready-task-one' status : 'new' } t3 = driver.create { id : 'ready-2' name : 'ready-task-two' status : 'ready' } t4 = driver.create { id : 'not-ready-2' name : 'not-ready-task-two' status : 'new' } bluebird.join t1, t2, t3, t4 afterEach -> @clock.restore() it 'should start the ready search if the option is set.', (done) -> tick = @clock.tick.bind(@) initDriver = new MemoryDriver({ runTaskSearch: true }) initDriver.on 'task::ready', (taskId) -> expect(taskId).to.eql 'ready-on-start' done() t1 = initDriver.create { id : 'ready-on-start' name : 'ready-on-start' status : 'ready' } .then -> tick 501 it 'should emit ready events for all ready, unlocked tasks.', (done) -> readyTasks = [] driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 2 setTimeout -> expect(readyTasks.length).to.eql 2 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 driver.findReady() @clock.tick(10) it 'should call the task after the set delay if search is turned on', (done) -> driver.runTaskSearch = true driver.taskReadyDelay = 100 readyTasks = [] tick = @clock.tick.bind(@) driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 3 setTimeout -> expect(readyTasks.length).to.eql 3 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 tick 10 driver.findReady() driver.getById 'ready-2' .then (task) -> task.status = 'success' driver.update task .then -> tick 101 describe '::create', -> it 'should be a function with an arity of one', -> expect(driver.create).to.be.a 'function' expect(driver.create.length).to.eql 1 it 'should throw an exception if the task object has an ID', -> task = { name : '<NAME>' } driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw an exception if the task object already exists', -> task = { id : 'duplicate-id' } driver.create task .then (task) -> driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdExists' it 'should store the new task', -> task = { id : 'my-test-id' name : '<NAME>' } driver.create task .then (task) -> expect(task.id).to.eql 'my-test-id' expect(task.name).to.eql '<NAME>-test-name' expect(driver.store['my-test-id']).to.eql task describe '::update', -> it 'should be a function with an arity of one', -> expect(driver.update).to.be.a 'function' expect(driver.update.length).to.eql 1 it 'should throw a TypeError if the task doesn\'t have an ID', -> task = { name : 'not-saved' } driver.update task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw a RangeError if the task is not found', -> task = id : 'not-found' name : 'not-found-name' driver.update task .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should update the stored task', -> task = id : 'update-test' name : 'update-test-name' driver.create task .then (task) -> task.updated = 1 driver.update task .then (task) -> expect(task.id).to.eql 'update-test' expect(task.name).to.eql 'update-test-name' expect(task.updated).to.eql 1 describe '::getById', -> it 'should be a function with an arity of one', -> expect(driver.getById).to.be.a 'function' expect(driver.getById.length).to.eql 1 it 'should throw a RangeError when the task is not found', -> task = id : 'not-found-id' name : 'not-found-name' driver.getById(task.id) .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should return the saved task object', -> task = id : 'found-id' name : 'found-name' driver.create task .then -> driver.getById 'found-id' .then (task) -> expect(task.id).to.eql 'found-id' expect(task.name).to.eql 'found-name'
true
bluebird = require 'bluebird' MemoryDriver = require '../../lib/driver-memory.js' TaskLock = require 'uow-lock' describe 'Memory Driver', -> driver = null before -> driver = new MemoryDriver() describe '::findReady', -> beforeEach -> @clock = sinon.useFakeTimers() driver = new MemoryDriver() t1 = driver.create { id : 'ready-1' name : 'ready-task-one' status : 'ready' } t2 = driver.create { id : 'not-ready-1' name : 'not-ready-task-one' status : 'new' } t3 = driver.create { id : 'ready-2' name : 'ready-task-two' status : 'ready' } t4 = driver.create { id : 'not-ready-2' name : 'not-ready-task-two' status : 'new' } bluebird.join t1, t2, t3, t4 afterEach -> @clock.restore() it 'should start the ready search if the option is set.', (done) -> tick = @clock.tick.bind(@) initDriver = new MemoryDriver({ runTaskSearch: true }) initDriver.on 'task::ready', (taskId) -> expect(taskId).to.eql 'ready-on-start' done() t1 = initDriver.create { id : 'ready-on-start' name : 'ready-on-start' status : 'ready' } .then -> tick 501 it 'should emit ready events for all ready, unlocked tasks.', (done) -> readyTasks = [] driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 2 setTimeout -> expect(readyTasks.length).to.eql 2 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 driver.findReady() @clock.tick(10) it 'should call the task after the set delay if search is turned on', (done) -> driver.runTaskSearch = true driver.taskReadyDelay = 100 readyTasks = [] tick = @clock.tick.bind(@) driver.on 'task::ready', (taskId) -> readyTasks.push taskId if readyTasks.length >= 3 setTimeout -> expect(readyTasks.length).to.eql 3 expect(readyTasks.indexOf('not-ready-1')).to.eql -1 expect(readyTasks.indexOf('not-ready-2')).to.eql -1 done() , 5 tick 10 driver.findReady() driver.getById 'ready-2' .then (task) -> task.status = 'success' driver.update task .then -> tick 101 describe '::create', -> it 'should be a function with an arity of one', -> expect(driver.create).to.be.a 'function' expect(driver.create.length).to.eql 1 it 'should throw an exception if the task object has an ID', -> task = { name : 'PI:NAME:<NAME>END_PI' } driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw an exception if the task object already exists', -> task = { id : 'duplicate-id' } driver.create task .then (task) -> driver.create task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdExists' it 'should store the new task', -> task = { id : 'my-test-id' name : 'PI:NAME:<NAME>END_PI' } driver.create task .then (task) -> expect(task.id).to.eql 'my-test-id' expect(task.name).to.eql 'PI:NAME:<NAME>END_PI-test-name' expect(driver.store['my-test-id']).to.eql task describe '::update', -> it 'should be a function with an arity of one', -> expect(driver.update).to.be.a 'function' expect(driver.update.length).to.eql 1 it 'should throw a TypeError if the task doesn\'t have an ID', -> task = { name : 'not-saved' } driver.update task .then -> throw new Error('UnexpectedSuccess') .catch TypeError, (e) -> expect(e.message).to.eql 'TaskIdNotPresent' it 'should throw a RangeError if the task is not found', -> task = id : 'not-found' name : 'not-found-name' driver.update task .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should update the stored task', -> task = id : 'update-test' name : 'update-test-name' driver.create task .then (task) -> task.updated = 1 driver.update task .then (task) -> expect(task.id).to.eql 'update-test' expect(task.name).to.eql 'update-test-name' expect(task.updated).to.eql 1 describe '::getById', -> it 'should be a function with an arity of one', -> expect(driver.getById).to.be.a 'function' expect(driver.getById.length).to.eql 1 it 'should throw a RangeError when the task is not found', -> task = id : 'not-found-id' name : 'not-found-name' driver.getById(task.id) .then -> throw new Error('UnexpectedSuccess') .catch RangeError, (e) -> expect(e.message).to.eql 'TaskNotFound' it 'should return the saved task object', -> task = id : 'found-id' name : 'found-name' driver.create task .then -> driver.getById 'found-id' .then (task) -> expect(task.id).to.eql 'found-id' expect(task.name).to.eql 'found-name'
[ { "context": "reEach ->\n @kue = require 'kue'\n @redisKey = UUID.v1()\n @client = redis.createClient @redisKey\n ", "end": 325, "score": 0.663592517375946, "start": 318, "tag": "KEY", "value": "UUID.v1" } ]
test/pong-job-processor-spec.coffee
octoblu/nanocyte-interval-service
0
_ = require 'lodash' PongJobProcessor = require '../src/pong-job-processor' RegisterJobProcessor = require '../src/register-job-processor' redis = require 'fakeredis' debug = require('debug')('mocha-test') UUID = require 'uuid' describe 'PongJobProcessor', -> beforeEach -> @kue = require 'kue' @redisKey = UUID.v1() @client = redis.createClient @redisKey @client = _.bindAll @client, _.functionsIn(@client) @queue = @kue.createQueue jobEvents: false redis: createClientFactory: => redis.createClient @redisKey options = { @client } @sut = new PongJobProcessor options describe '->processJob', -> context 'when an interval is ok', -> beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should set the bucket pong count', (done) -> @client.hget 'ping:count:the-bucket', 'total:pong', (error, data) => expect(parseInt(data)).to.equal 1 done() it 'should reset the interval ping count', (done) -> @client.hexists 'ping:count:total', 'some-flow-id:some-node-id', (error, data) => expect(data).to.equal 0 done() context 'when an interval has previously failed, but now passes', -> beforeEach (done) -> @client.hset 'ping:count:total', 'some-flow-id:some-node-id', 2, done beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should reset all ping counts', (done) -> @client.exists 'ping:count:total', (error, data) => expect(data).to.equal 0 done()
140413
_ = require 'lodash' PongJobProcessor = require '../src/pong-job-processor' RegisterJobProcessor = require '../src/register-job-processor' redis = require 'fakeredis' debug = require('debug')('mocha-test') UUID = require 'uuid' describe 'PongJobProcessor', -> beforeEach -> @kue = require 'kue' @redisKey = <KEY>() @client = redis.createClient @redisKey @client = _.bindAll @client, _.functionsIn(@client) @queue = @kue.createQueue jobEvents: false redis: createClientFactory: => redis.createClient @redisKey options = { @client } @sut = new PongJobProcessor options describe '->processJob', -> context 'when an interval is ok', -> beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should set the bucket pong count', (done) -> @client.hget 'ping:count:the-bucket', 'total:pong', (error, data) => expect(parseInt(data)).to.equal 1 done() it 'should reset the interval ping count', (done) -> @client.hexists 'ping:count:total', 'some-flow-id:some-node-id', (error, data) => expect(data).to.equal 0 done() context 'when an interval has previously failed, but now passes', -> beforeEach (done) -> @client.hset 'ping:count:total', 'some-flow-id:some-node-id', 2, done beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should reset all ping counts', (done) -> @client.exists 'ping:count:total', (error, data) => expect(data).to.equal 0 done()
true
_ = require 'lodash' PongJobProcessor = require '../src/pong-job-processor' RegisterJobProcessor = require '../src/register-job-processor' redis = require 'fakeredis' debug = require('debug')('mocha-test') UUID = require 'uuid' describe 'PongJobProcessor', -> beforeEach -> @kue = require 'kue' @redisKey = PI:KEY:<KEY>END_PI() @client = redis.createClient @redisKey @client = _.bindAll @client, _.functionsIn(@client) @queue = @kue.createQueue jobEvents: false redis: createClientFactory: => redis.createClient @redisKey options = { @client } @sut = new PongJobProcessor options describe '->processJob', -> context 'when an interval is ok', -> beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should set the bucket pong count', (done) -> @client.hget 'ping:count:the-bucket', 'total:pong', (error, data) => expect(parseInt(data)).to.equal 1 done() it 'should reset the interval ping count', (done) -> @client.hexists 'ping:count:total', 'some-flow-id:some-node-id', (error, data) => expect(data).to.equal 0 done() context 'when an interval has previously failed, but now passes', -> beforeEach (done) -> @client.hset 'ping:count:total', 'some-flow-id:some-node-id', 2, done beforeEach (done) -> @pongJob = @queue.create 'pong', {sendTo: 'some-flow-id', nodeId: 'some-node-id', bucket: 'the-bucket'} @pongJob.events(false).save done beforeEach (done) -> @sut.processJob @pongJob, {}, done it 'should reset all ping counts', (done) -> @client.exists 'ping:count:total', (error, data) => expect(data).to.equal 0 done()
[ { "context": " =\n\tversion: 1\n\tslug: 'beaglebone-pocket'\n\tname: 'PocketBeagle'\n\tarch: 'armv7hf'\n\tstate: 'experimenta", "end": 190, "score": 0.8576775789260864, "start": 189, "tag": "NAME", "value": "P" }, { "context": "ion: 1\n\tslug: 'beaglebone-pocket'\n\tname: 'PocketBeagle'\n\tarch: 'armv7hf'\n\tstate: 'experimental'\n\n\timageD", "end": 201, "score": 0.525069534778595, "start": 197, "tag": "NAME", "value": "agle" } ]
beaglebone-pocket.coffee
Johnsel/balena-beaglebone
0
deviceTypesCommon = require '@resin.io/device-types/common' { networkOptions, commonImg, instructions } = deviceTypesCommon module.exports = version: 1 slug: 'beaglebone-pocket' name: 'PocketBeagle' arch: 'armv7hf' state: 'experimental' imageDownloadAlerts: [ { type: 'warning' message: 'To obtain internet connectivity from a Linux host via onboard microUSB, open nm-connection-editor on the host and edit the connection created by PocketBeagle when plugged. In the "IPv4 Settings" tab > Method > select "Shared to other computers". Then disconnect the board and plug it back in.' } ] instructions: commonImg.instructions gettingStartedLink: windows: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' osx: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' linux: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' supportsBlink: true yocto: machine: 'beaglebone-pocket' image: 'resin-image' fstype: 'resinos-img' version: 'yocto-thud' deployArtifact: 'resin-image-beaglebone-pocket.resinos-img' compressed: true options: [ networkOptions.group ] configuration: config: partition: primary: 1 path: '/config.json' initialization: commonImg.initialization
10120
deviceTypesCommon = require '@resin.io/device-types/common' { networkOptions, commonImg, instructions } = deviceTypesCommon module.exports = version: 1 slug: 'beaglebone-pocket' name: '<NAME>ocketBe<NAME>' arch: 'armv7hf' state: 'experimental' imageDownloadAlerts: [ { type: 'warning' message: 'To obtain internet connectivity from a Linux host via onboard microUSB, open nm-connection-editor on the host and edit the connection created by PocketBeagle when plugged. In the "IPv4 Settings" tab > Method > select "Shared to other computers". Then disconnect the board and plug it back in.' } ] instructions: commonImg.instructions gettingStartedLink: windows: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' osx: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' linux: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' supportsBlink: true yocto: machine: 'beaglebone-pocket' image: 'resin-image' fstype: 'resinos-img' version: 'yocto-thud' deployArtifact: 'resin-image-beaglebone-pocket.resinos-img' compressed: true options: [ networkOptions.group ] configuration: config: partition: primary: 1 path: '/config.json' initialization: commonImg.initialization
true
deviceTypesCommon = require '@resin.io/device-types/common' { networkOptions, commonImg, instructions } = deviceTypesCommon module.exports = version: 1 slug: 'beaglebone-pocket' name: 'PI:NAME:<NAME>END_PIocketBePI:NAME:<NAME>END_PI' arch: 'armv7hf' state: 'experimental' imageDownloadAlerts: [ { type: 'warning' message: 'To obtain internet connectivity from a Linux host via onboard microUSB, open nm-connection-editor on the host and edit the connection created by PocketBeagle when plugged. In the "IPv4 Settings" tab > Method > select "Shared to other computers". Then disconnect the board and plug it back in.' } ] instructions: commonImg.instructions gettingStartedLink: windows: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' osx: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' linux: 'https://docs.resin.io/pocketbeagle/nodejs/getting-started/#adding-your-first-device' supportsBlink: true yocto: machine: 'beaglebone-pocket' image: 'resin-image' fstype: 'resinos-img' version: 'yocto-thud' deployArtifact: 'resin-image-beaglebone-pocket.resinos-img' compressed: true options: [ networkOptions.group ] configuration: config: partition: primary: 1 path: '/config.json' initialization: commonImg.initialization
[ { "context": "\nfixture =\n name: 'mittens'\n age: 7\n\nmodule.exports = (props) ->\n if props", "end": 27, "score": 0.9989773631095886, "start": 20, "tag": "NAME", "value": "mittens" } ]
spec/fixtures/helpers/object.coffee
rstone770/inheritor
0
fixture = name: 'mittens' age: 7 module.exports = (props) -> if props return props else return fixture
179190
fixture = name: '<NAME>' age: 7 module.exports = (props) -> if props return props else return fixture
true
fixture = name: 'PI:NAME:<NAME>END_PI' age: 7 module.exports = (props) -> if props return props else return fixture
[ { "context": "# @author alteredq / http://alteredqualia.com/\n# @author aladjev.and", "end": 18, "score": 0.9567625522613525, "start": 10, "tag": "USERNAME", "value": "alteredq" }, { "context": "hor alteredq / http://alteredqualia.com/\n# @author aladjev.andrew@gmail.com\n\n#= require new_src/loaders/loader\n#= require new", "end": 81, "score": 0.9999067783355713, "start": 57, "tag": "EMAIL", "value": "aladjev.andrew@gmail.com" } ]
source/javascripts/new_src/loaders/binary.coffee
andrew-aladev/three.js
0
# @author alteredq / http://alteredqualia.com/ # @author aladjev.andrew@gmail.com #= require new_src/loaders/loader #= require new_src/core/geometry #= require new_src/core/vector_3 #= require new_src/core/face_3 #= require new_src/core/face_4 #= require new_src/core/uv class BinaryLoader extends THREE.Loader constructor: (showStatus) -> super showStatus # Load models generated by slim OBJ converter with BINARY option (converter_obj_three_slim.py -t binary) # - binary models consist of two files: JS and BIN # - parameters # - url (required) # - callback (required) # - texturePath (optional: if not specified, textures will be assumed to be in the same folder as JS model file) # - binaryPath (optional: if not specified, binary file will be assumed to be in the same folder as JS model file) load: (url, callback, texturePath, binaryPath) -> texturePath = (if texturePath then texturePath else @extractUrlBase(url)) binaryPath = (if binaryPath then binaryPath else @extractUrlBase(url)) callbackProgress = (if @showProgress then @updateProgress else null) @onLoadStart() #1 load JS part via web worker @loadAjaxJSON this, url, callback, texturePath, binaryPath, callbackProgress loadAjaxJSON: (context, url, callback, texturePath, binaryPath, callbackProgress) -> xhr = new XMLHttpRequest() xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 json = JSON.parse(xhr.responseText) context.loadAjaxBuffers json, callback, binaryPath, texturePath, callbackProgress else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" xhr.open "GET", url, true xhr.overrideMimeType "text/plain; charset=x-user-defined" if xhr.overrideMimeType xhr.setRequestHeader "Content-Type", "text/plain" xhr.send null loadAjaxBuffers: (json, callback, binaryPath, texturePath, callbackProgress) -> self = this xhr = new XMLHttpRequest() url = binaryPath + "/" + json.buffers length = 0 xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 self.createBinModel xhr.response, callback, texturePath, json.materials else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" else if xhr.readyState is 3 if callbackProgress length = xhr.getResponseHeader("Content-Length") if length is 0 callbackProgress total: length loaded: xhr.responseText.length else length = xhr.getResponseHeader("Content-Length") if xhr.readyState is 2 xhr.open "GET", url, true xhr.responseType = "arraybuffer" xhr.send null # Binary AJAX parser createBinModel: (data, callback, texturePath, materials) -> callback new BinaryModel(data, texturePath, materials, this) class BinaryModel extends THREE.Geometry constructor: (data, texturePath, materials, binaryLoader) -> @data = data @texturePath = texturePath @materials = materials @binaryLoader = binaryLoader @currentOffset = 0 @normals = [] @uvs = [] super() @binaryLoader.initMaterials this, @materials, @texturePath @md = BinaryModel.parseMetaData @data, @currentOffset @currentOffset += @md.header_bytes # @md.vertex_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.material_index_bytes = Uint16Array.BYTES_PER_ELEMENT # @md.normal_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.uv_index_bytes = Uint32Array.BYTES_PER_ELEMENT # buffers sizes @tri_size = @md.vertex_index_bytes * 3 + @md.material_index_bytes @quad_size = @md.vertex_index_bytes * 4 + @md.material_index_bytes @len_tri_flat = @md.ntri_flat * @tri_size @len_tri_smooth = @md.ntri_smooth * (@tri_size + @md.normal_index_bytes * 3) @len_tri_flat_uv = @md.ntri_flat_uv * (@tri_size + @md.uv_index_bytes * 3) @len_tri_smooth_uv = @md.ntri_smooth_uv * (@tri_size + @md.normal_index_bytes * 3 + @md.uv_index_bytes * 3) @len_quad_flat = @md.nquad_flat * @quad_size @len_quad_smooth = @md.nquad_smooth * (@quad_size + @md.normal_index_bytes * 4) @len_quad_flat_uv = @md.nquad_flat_uv * (@quad_size + @md.uv_index_bytes * 4) @len_quad_smooth_uv = @md.nquad_smooth_uv * (@quad_size + @md.normal_index_bytes * 4 + @md.uv_index_bytes * 4) # read buffers @currentOffset += @init_vertices @currentOffset @currentOffset += @init_normals @currentOffset @currentOffset += BinaryModel.handlePadding @md.nnormals * 3 @currentOffset += @init_uvs @currentOffset @start_tri_flat = @currentOffset @start_tri_smooth = @start_tri_flat + @len_tri_flat + BinaryModel.handlePadding @md.ntri_flat * 2 @start_tri_flat_uv = @start_tri_smooth + @len_tri_smooth + BinaryModel.handlePadding @md.ntri_smooth * 2 @start_tri_smooth_uv = @start_tri_flat_uv + @len_tri_flat_uv + BinaryModel.handlePadding @md.ntri_flat_uv * 2 @start_quad_flat = @start_tri_smooth_uv + @len_tri_smooth_uv + BinaryModel.handlePadding @md.ntri_smooth_uv * 2 @start_quad_smooth = @start_quad_flat + @len_quad_flat + BinaryModel.handlePadding @md.nquad_flat * 2 @start_quad_flat_uv = @start_quad_smooth + @len_quad_smooth + BinaryModel.handlePadding @md.nquad_smooth * 2 @start_quad_smooth_uv = @start_quad_flat_uv + @len_quad_flat_uv + BinaryModel.handlePadding @md.nquad_flat_uv * 2 # have to first process faces with uvs # so that face and uv indices match @init_triangles_flat_uv @start_tri_flat_uv @init_triangles_smooth_uv @start_tri_smooth_uv @init_quads_flat_uv @start_quad_flat_uv @init_quads_smooth_uv @start_quad_smooth_uv # now we can process untextured faces @init_triangles_flat @start_tri_flat @init_triangles_smooth @start_tri_smooth @init_quads_flat @start_quad_flat @init_quads_smooth @start_quad_smooth @computeCentroids() @computeFaceNormals() @computeTangents() if @binaryLoader.hasNormals this @handlePadding: (n) -> if (n % 4) 4 - n % 4 else 0 @parseMetaData: (data, offset) -> meta = signature: BinaryModel.parseString data, offset, 12 header_bytes: BinaryModel.parseUChar8 data, offset + 12 vertex_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 13 normal_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 14 uv_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 15 vertex_index_bytes: BinaryModel.parseUChar8 data, offset + 16 normal_index_bytes: BinaryModel.parseUChar8 data, offset + 17 uv_index_bytes: BinaryModel.parseUChar8 data, offset + 18 material_index_bytes: BinaryModel.parseUChar8 data, offset + 19 nvertices: BinaryModel.parseUInt32 data, offset + 20 nnormals: BinaryModel.parseUInt32 data, offset + 20 + 4 * 1 nuvs: BinaryModel.parseUInt32 data, offset + 20 + 4 * 2 ntri_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 3 ntri_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 4 ntri_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 5 ntri_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 6 nquad_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 7 nquad_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 8 nquad_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 9 nquad_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 10 # console.log "signature: ", meta.signature # console.log "header_bytes: ", meta.header_bytes # console.log "vertex_coordinate_bytes: ", meta.vertex_coordinate_bytes # console.log "normal_coordinate_bytes: ", meta.normal_coordinate_bytes # console.log "uv_coordinate_bytes: ", meta.uv_coordinate_bytes # console.log "vertex_index_bytes: ", meta.vertex_index_bytes # console.log "normal_index_bytes: ", meta.normal_index_bytes # console.log "uv_index_bytes: ", meta.uv_index_bytes # console.log "material_index_bytes: ", meta.material_index_bytes # console.log "nvertices: ", meta.nvertices # console.log "nnormals: ", meta.nnormals # console.log "nuvs: ", meta.nuvs # console.log "ntri_flat: ", meta.ntri_flat # console.log "ntri_smooth: ", meta.ntri_smooth # console.log "ntri_flat_uv: ", meta.ntri_flat_uv # console.log "ntri_smooth_uv: ", meta.ntri_smooth_uv # console.log "nquad_flat: ", meta.nquad_flat # console.log "nquad_smooth: " , meta.nquad_smooth # console.log "nquad_flat_uv: ", meta.nquad_flat_uv # console.log "nquad_smooth_uv: ", meta.nquad_smooth_uv # total = meta.header_bytes + # + meta.nvertices * meta.vertex_coordinate_bytes * 3 # + meta.nnormals * meta.normal_coordinate_bytes * 3 # + meta.nuvs * meta.uv_coordinate_bytes * 2 # # + meta.ntri_flat * (meta.vertex_index_bytes * 3 + meta.material_index_bytes) # + meta.ntri_smooth * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3) # + meta.ntri_flat_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.uv_index_bytes * 3) # + meta.ntri_smooth_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3 + meta.uv_index_bytes * 3) # # + meta.nquad_flat * (meta.vertex_index_bytes * 4 + meta.material_index_bytes) # + meta.nquad_smooth * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4) # + meta.nquad_flat_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.uv_index_bytes * 4) # + meta.nquad_smooth_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4 + meta.uv_index_bytes * 4) # console.log "total bytes: ", total meta @parseString: (data, offset, length) -> charArray = new Uint8Array data, offset, length text = "" for i in [0...length] text += String.fromCharCode charArray[offset + i] text @parseUChar8: (data, offset) -> charArray = new Uint8Array data, offset, 1 charArray[0] @parseUInt32: (data, offset) -> intArray = new Uint32Array data, offset, 1 intArray[0] vertex: (x, y, z) -> @vertices.push new THREE.Vector3(x, y, z) f3: (a, b, c, mi) -> @faces.push new THREE.Face3(a, b, c, null, null, mi) f4: (a, b, c, d, mi) -> @faces.push new THREE.Face4(a, b, c, d, null, null, mi) f3n: (a, b, c, mi, na, nb, nc) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] @faces.push new THREE.Face3(a, b, c, [ new THREE.Vector3 nax, nay, naz new THREE.Vector3 nbx, nby, nbz new THREE.Vector3 ncx, ncy, ncz ], null, mi) f4n: (a, b, c, d, mi, na, nb, nc, nd) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] ndx = @normals[nd * 3] ndy = @normals[nd * 3 + 1] ndz = @normals[nd * 3 + 2] @faces.push new THREE.Face4(a, b, c, d, [ new THREE.Vector3(nax, nay, naz) new THREE.Vector3(nbx, nby, nbz) new THREE.Vector3(ncx, ncy, ncz) new THREE.Vector3(ndx, ndy, ndz) ], null, mi) @uv3: (where, u1, v1, u2, v2, u3, v3) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) where.push uv @uv4: (where, u1, v1, u2, v2, u3, v3, u4, v4) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) uv.push new THREE.UV(u4, v4) where.push uv init_vertices: (start) -> nElements = @md.nvertices coordArray = new Float32Array @data, start, nElements * 3 for i in [0...nElements] x = coordArray[i * 3] y = coordArray[i * 3 + 1] z = coordArray[i * 3 + 2] @vertex x, y, z nElements * 3 * Float32Array.BYTES_PER_ELEMENT init_normals: (start) -> nElements = @md.nnormals if nElements normalArray = new Int8Array @data, start, nElements * 3 for i in [0...nElements] x = normalArray[i * 3] y = normalArray[i * 3 + 1] z = normalArray[i * 3 + 2] @normals.push x / 127, y / 127, z / 127 nElements * 3 * Int8Array.BYTES_PER_ELEMENT init_uvs: (start) -> nElements = @md.nuvs if nElements uvArray = new Float32Array @data, start, nElements * 2 for i in [0...nElements] u = uvArray[i * 2] v = uvArray[i * 2 + 1] @uvs.push u, v nElements * 2 * Float32Array.BYTES_PER_ELEMENT init_uvs3: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 3 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 3] uvb = uvIndexBuffer[i * 3 + 1] uvc = uvIndexBuffer[i * 3 + 2] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] BinaryModel.uv3 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3 init_uvs4: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 4 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 4] uvb = uvIndexBuffer[i * 4 + 1] uvc = uvIndexBuffer[i * 4 + 2] uvd = uvIndexBuffer[i * 4 + 3] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] u4 = uvs[uvd * 2] v4 = uvs[uvd * 2 + 1] BinaryModel.uv4 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3, u4, v4 init_faces3_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3 a, b, c, m init_faces4_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4 a, b, c, d, m init_faces3_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] na = normalIndexBuffer[i * 3] nb = normalIndexBuffer[i * 3 + 1] nc = normalIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3n a, b, c, m, na, nb, nc init_faces4_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] na = normalIndexBuffer[i * 4] nb = normalIndexBuffer[i * 4 + 1] nc = normalIndexBuffer[i * 4 + 2] nd = normalIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4n a, b, c, d, m, na, nb, nc, nd init_triangles_flat: (start) -> nElements = @md.ntri_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials init_triangles_flat_uv: (start) -> nElements = @md.ntri_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials @init_uvs3 nElements, offsetUvs init_triangles_smooth: (start) -> nElements = @md.ntri_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials init_triangles_smooth_uv: (start) -> nElements = @md.ntri_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs3 nElements, offsetUvs init_quads_flat: (start) -> nElements = @md.nquad_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials init_quads_flat_uv: (start) -> nElements = @md.nquad_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials @init_uvs4 nElements, offsetUvs init_quads_smooth: (start) -> nElements = @md.nquad_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials init_quads_smooth_uv: (start) -> nElements = @md.nquad_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs4 nElements, offsetUvs namespace "THREE", (exports) -> exports.BinaryLoader = BinaryLoader exports.BinaryModel = BinaryModel
16923
# @author alteredq / http://alteredqualia.com/ # @author <EMAIL> #= require new_src/loaders/loader #= require new_src/core/geometry #= require new_src/core/vector_3 #= require new_src/core/face_3 #= require new_src/core/face_4 #= require new_src/core/uv class BinaryLoader extends THREE.Loader constructor: (showStatus) -> super showStatus # Load models generated by slim OBJ converter with BINARY option (converter_obj_three_slim.py -t binary) # - binary models consist of two files: JS and BIN # - parameters # - url (required) # - callback (required) # - texturePath (optional: if not specified, textures will be assumed to be in the same folder as JS model file) # - binaryPath (optional: if not specified, binary file will be assumed to be in the same folder as JS model file) load: (url, callback, texturePath, binaryPath) -> texturePath = (if texturePath then texturePath else @extractUrlBase(url)) binaryPath = (if binaryPath then binaryPath else @extractUrlBase(url)) callbackProgress = (if @showProgress then @updateProgress else null) @onLoadStart() #1 load JS part via web worker @loadAjaxJSON this, url, callback, texturePath, binaryPath, callbackProgress loadAjaxJSON: (context, url, callback, texturePath, binaryPath, callbackProgress) -> xhr = new XMLHttpRequest() xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 json = JSON.parse(xhr.responseText) context.loadAjaxBuffers json, callback, binaryPath, texturePath, callbackProgress else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" xhr.open "GET", url, true xhr.overrideMimeType "text/plain; charset=x-user-defined" if xhr.overrideMimeType xhr.setRequestHeader "Content-Type", "text/plain" xhr.send null loadAjaxBuffers: (json, callback, binaryPath, texturePath, callbackProgress) -> self = this xhr = new XMLHttpRequest() url = binaryPath + "/" + json.buffers length = 0 xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 self.createBinModel xhr.response, callback, texturePath, json.materials else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" else if xhr.readyState is 3 if callbackProgress length = xhr.getResponseHeader("Content-Length") if length is 0 callbackProgress total: length loaded: xhr.responseText.length else length = xhr.getResponseHeader("Content-Length") if xhr.readyState is 2 xhr.open "GET", url, true xhr.responseType = "arraybuffer" xhr.send null # Binary AJAX parser createBinModel: (data, callback, texturePath, materials) -> callback new BinaryModel(data, texturePath, materials, this) class BinaryModel extends THREE.Geometry constructor: (data, texturePath, materials, binaryLoader) -> @data = data @texturePath = texturePath @materials = materials @binaryLoader = binaryLoader @currentOffset = 0 @normals = [] @uvs = [] super() @binaryLoader.initMaterials this, @materials, @texturePath @md = BinaryModel.parseMetaData @data, @currentOffset @currentOffset += @md.header_bytes # @md.vertex_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.material_index_bytes = Uint16Array.BYTES_PER_ELEMENT # @md.normal_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.uv_index_bytes = Uint32Array.BYTES_PER_ELEMENT # buffers sizes @tri_size = @md.vertex_index_bytes * 3 + @md.material_index_bytes @quad_size = @md.vertex_index_bytes * 4 + @md.material_index_bytes @len_tri_flat = @md.ntri_flat * @tri_size @len_tri_smooth = @md.ntri_smooth * (@tri_size + @md.normal_index_bytes * 3) @len_tri_flat_uv = @md.ntri_flat_uv * (@tri_size + @md.uv_index_bytes * 3) @len_tri_smooth_uv = @md.ntri_smooth_uv * (@tri_size + @md.normal_index_bytes * 3 + @md.uv_index_bytes * 3) @len_quad_flat = @md.nquad_flat * @quad_size @len_quad_smooth = @md.nquad_smooth * (@quad_size + @md.normal_index_bytes * 4) @len_quad_flat_uv = @md.nquad_flat_uv * (@quad_size + @md.uv_index_bytes * 4) @len_quad_smooth_uv = @md.nquad_smooth_uv * (@quad_size + @md.normal_index_bytes * 4 + @md.uv_index_bytes * 4) # read buffers @currentOffset += @init_vertices @currentOffset @currentOffset += @init_normals @currentOffset @currentOffset += BinaryModel.handlePadding @md.nnormals * 3 @currentOffset += @init_uvs @currentOffset @start_tri_flat = @currentOffset @start_tri_smooth = @start_tri_flat + @len_tri_flat + BinaryModel.handlePadding @md.ntri_flat * 2 @start_tri_flat_uv = @start_tri_smooth + @len_tri_smooth + BinaryModel.handlePadding @md.ntri_smooth * 2 @start_tri_smooth_uv = @start_tri_flat_uv + @len_tri_flat_uv + BinaryModel.handlePadding @md.ntri_flat_uv * 2 @start_quad_flat = @start_tri_smooth_uv + @len_tri_smooth_uv + BinaryModel.handlePadding @md.ntri_smooth_uv * 2 @start_quad_smooth = @start_quad_flat + @len_quad_flat + BinaryModel.handlePadding @md.nquad_flat * 2 @start_quad_flat_uv = @start_quad_smooth + @len_quad_smooth + BinaryModel.handlePadding @md.nquad_smooth * 2 @start_quad_smooth_uv = @start_quad_flat_uv + @len_quad_flat_uv + BinaryModel.handlePadding @md.nquad_flat_uv * 2 # have to first process faces with uvs # so that face and uv indices match @init_triangles_flat_uv @start_tri_flat_uv @init_triangles_smooth_uv @start_tri_smooth_uv @init_quads_flat_uv @start_quad_flat_uv @init_quads_smooth_uv @start_quad_smooth_uv # now we can process untextured faces @init_triangles_flat @start_tri_flat @init_triangles_smooth @start_tri_smooth @init_quads_flat @start_quad_flat @init_quads_smooth @start_quad_smooth @computeCentroids() @computeFaceNormals() @computeTangents() if @binaryLoader.hasNormals this @handlePadding: (n) -> if (n % 4) 4 - n % 4 else 0 @parseMetaData: (data, offset) -> meta = signature: BinaryModel.parseString data, offset, 12 header_bytes: BinaryModel.parseUChar8 data, offset + 12 vertex_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 13 normal_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 14 uv_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 15 vertex_index_bytes: BinaryModel.parseUChar8 data, offset + 16 normal_index_bytes: BinaryModel.parseUChar8 data, offset + 17 uv_index_bytes: BinaryModel.parseUChar8 data, offset + 18 material_index_bytes: BinaryModel.parseUChar8 data, offset + 19 nvertices: BinaryModel.parseUInt32 data, offset + 20 nnormals: BinaryModel.parseUInt32 data, offset + 20 + 4 * 1 nuvs: BinaryModel.parseUInt32 data, offset + 20 + 4 * 2 ntri_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 3 ntri_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 4 ntri_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 5 ntri_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 6 nquad_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 7 nquad_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 8 nquad_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 9 nquad_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 10 # console.log "signature: ", meta.signature # console.log "header_bytes: ", meta.header_bytes # console.log "vertex_coordinate_bytes: ", meta.vertex_coordinate_bytes # console.log "normal_coordinate_bytes: ", meta.normal_coordinate_bytes # console.log "uv_coordinate_bytes: ", meta.uv_coordinate_bytes # console.log "vertex_index_bytes: ", meta.vertex_index_bytes # console.log "normal_index_bytes: ", meta.normal_index_bytes # console.log "uv_index_bytes: ", meta.uv_index_bytes # console.log "material_index_bytes: ", meta.material_index_bytes # console.log "nvertices: ", meta.nvertices # console.log "nnormals: ", meta.nnormals # console.log "nuvs: ", meta.nuvs # console.log "ntri_flat: ", meta.ntri_flat # console.log "ntri_smooth: ", meta.ntri_smooth # console.log "ntri_flat_uv: ", meta.ntri_flat_uv # console.log "ntri_smooth_uv: ", meta.ntri_smooth_uv # console.log "nquad_flat: ", meta.nquad_flat # console.log "nquad_smooth: " , meta.nquad_smooth # console.log "nquad_flat_uv: ", meta.nquad_flat_uv # console.log "nquad_smooth_uv: ", meta.nquad_smooth_uv # total = meta.header_bytes + # + meta.nvertices * meta.vertex_coordinate_bytes * 3 # + meta.nnormals * meta.normal_coordinate_bytes * 3 # + meta.nuvs * meta.uv_coordinate_bytes * 2 # # + meta.ntri_flat * (meta.vertex_index_bytes * 3 + meta.material_index_bytes) # + meta.ntri_smooth * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3) # + meta.ntri_flat_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.uv_index_bytes * 3) # + meta.ntri_smooth_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3 + meta.uv_index_bytes * 3) # # + meta.nquad_flat * (meta.vertex_index_bytes * 4 + meta.material_index_bytes) # + meta.nquad_smooth * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4) # + meta.nquad_flat_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.uv_index_bytes * 4) # + meta.nquad_smooth_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4 + meta.uv_index_bytes * 4) # console.log "total bytes: ", total meta @parseString: (data, offset, length) -> charArray = new Uint8Array data, offset, length text = "" for i in [0...length] text += String.fromCharCode charArray[offset + i] text @parseUChar8: (data, offset) -> charArray = new Uint8Array data, offset, 1 charArray[0] @parseUInt32: (data, offset) -> intArray = new Uint32Array data, offset, 1 intArray[0] vertex: (x, y, z) -> @vertices.push new THREE.Vector3(x, y, z) f3: (a, b, c, mi) -> @faces.push new THREE.Face3(a, b, c, null, null, mi) f4: (a, b, c, d, mi) -> @faces.push new THREE.Face4(a, b, c, d, null, null, mi) f3n: (a, b, c, mi, na, nb, nc) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] @faces.push new THREE.Face3(a, b, c, [ new THREE.Vector3 nax, nay, naz new THREE.Vector3 nbx, nby, nbz new THREE.Vector3 ncx, ncy, ncz ], null, mi) f4n: (a, b, c, d, mi, na, nb, nc, nd) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] ndx = @normals[nd * 3] ndy = @normals[nd * 3 + 1] ndz = @normals[nd * 3 + 2] @faces.push new THREE.Face4(a, b, c, d, [ new THREE.Vector3(nax, nay, naz) new THREE.Vector3(nbx, nby, nbz) new THREE.Vector3(ncx, ncy, ncz) new THREE.Vector3(ndx, ndy, ndz) ], null, mi) @uv3: (where, u1, v1, u2, v2, u3, v3) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) where.push uv @uv4: (where, u1, v1, u2, v2, u3, v3, u4, v4) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) uv.push new THREE.UV(u4, v4) where.push uv init_vertices: (start) -> nElements = @md.nvertices coordArray = new Float32Array @data, start, nElements * 3 for i in [0...nElements] x = coordArray[i * 3] y = coordArray[i * 3 + 1] z = coordArray[i * 3 + 2] @vertex x, y, z nElements * 3 * Float32Array.BYTES_PER_ELEMENT init_normals: (start) -> nElements = @md.nnormals if nElements normalArray = new Int8Array @data, start, nElements * 3 for i in [0...nElements] x = normalArray[i * 3] y = normalArray[i * 3 + 1] z = normalArray[i * 3 + 2] @normals.push x / 127, y / 127, z / 127 nElements * 3 * Int8Array.BYTES_PER_ELEMENT init_uvs: (start) -> nElements = @md.nuvs if nElements uvArray = new Float32Array @data, start, nElements * 2 for i in [0...nElements] u = uvArray[i * 2] v = uvArray[i * 2 + 1] @uvs.push u, v nElements * 2 * Float32Array.BYTES_PER_ELEMENT init_uvs3: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 3 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 3] uvb = uvIndexBuffer[i * 3 + 1] uvc = uvIndexBuffer[i * 3 + 2] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] BinaryModel.uv3 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3 init_uvs4: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 4 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 4] uvb = uvIndexBuffer[i * 4 + 1] uvc = uvIndexBuffer[i * 4 + 2] uvd = uvIndexBuffer[i * 4 + 3] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] u4 = uvs[uvd * 2] v4 = uvs[uvd * 2 + 1] BinaryModel.uv4 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3, u4, v4 init_faces3_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3 a, b, c, m init_faces4_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4 a, b, c, d, m init_faces3_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] na = normalIndexBuffer[i * 3] nb = normalIndexBuffer[i * 3 + 1] nc = normalIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3n a, b, c, m, na, nb, nc init_faces4_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] na = normalIndexBuffer[i * 4] nb = normalIndexBuffer[i * 4 + 1] nc = normalIndexBuffer[i * 4 + 2] nd = normalIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4n a, b, c, d, m, na, nb, nc, nd init_triangles_flat: (start) -> nElements = @md.ntri_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials init_triangles_flat_uv: (start) -> nElements = @md.ntri_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials @init_uvs3 nElements, offsetUvs init_triangles_smooth: (start) -> nElements = @md.ntri_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials init_triangles_smooth_uv: (start) -> nElements = @md.ntri_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs3 nElements, offsetUvs init_quads_flat: (start) -> nElements = @md.nquad_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials init_quads_flat_uv: (start) -> nElements = @md.nquad_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials @init_uvs4 nElements, offsetUvs init_quads_smooth: (start) -> nElements = @md.nquad_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials init_quads_smooth_uv: (start) -> nElements = @md.nquad_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs4 nElements, offsetUvs namespace "THREE", (exports) -> exports.BinaryLoader = BinaryLoader exports.BinaryModel = BinaryModel
true
# @author alteredq / http://alteredqualia.com/ # @author PI:EMAIL:<EMAIL>END_PI #= require new_src/loaders/loader #= require new_src/core/geometry #= require new_src/core/vector_3 #= require new_src/core/face_3 #= require new_src/core/face_4 #= require new_src/core/uv class BinaryLoader extends THREE.Loader constructor: (showStatus) -> super showStatus # Load models generated by slim OBJ converter with BINARY option (converter_obj_three_slim.py -t binary) # - binary models consist of two files: JS and BIN # - parameters # - url (required) # - callback (required) # - texturePath (optional: if not specified, textures will be assumed to be in the same folder as JS model file) # - binaryPath (optional: if not specified, binary file will be assumed to be in the same folder as JS model file) load: (url, callback, texturePath, binaryPath) -> texturePath = (if texturePath then texturePath else @extractUrlBase(url)) binaryPath = (if binaryPath then binaryPath else @extractUrlBase(url)) callbackProgress = (if @showProgress then @updateProgress else null) @onLoadStart() #1 load JS part via web worker @loadAjaxJSON this, url, callback, texturePath, binaryPath, callbackProgress loadAjaxJSON: (context, url, callback, texturePath, binaryPath, callbackProgress) -> xhr = new XMLHttpRequest() xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 json = JSON.parse(xhr.responseText) context.loadAjaxBuffers json, callback, binaryPath, texturePath, callbackProgress else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" xhr.open "GET", url, true xhr.overrideMimeType "text/plain; charset=x-user-defined" if xhr.overrideMimeType xhr.setRequestHeader "Content-Type", "text/plain" xhr.send null loadAjaxBuffers: (json, callback, binaryPath, texturePath, callbackProgress) -> self = this xhr = new XMLHttpRequest() url = binaryPath + "/" + json.buffers length = 0 xhr.onreadystatechange = -> if xhr.readyState is 4 if xhr.status is 200 or xhr.status is 0 self.createBinModel xhr.response, callback, texturePath, json.materials else console.error "THREE.BinaryLoader: Couldn't load [" + url + "] [" + xhr.status + "]" else if xhr.readyState is 3 if callbackProgress length = xhr.getResponseHeader("Content-Length") if length is 0 callbackProgress total: length loaded: xhr.responseText.length else length = xhr.getResponseHeader("Content-Length") if xhr.readyState is 2 xhr.open "GET", url, true xhr.responseType = "arraybuffer" xhr.send null # Binary AJAX parser createBinModel: (data, callback, texturePath, materials) -> callback new BinaryModel(data, texturePath, materials, this) class BinaryModel extends THREE.Geometry constructor: (data, texturePath, materials, binaryLoader) -> @data = data @texturePath = texturePath @materials = materials @binaryLoader = binaryLoader @currentOffset = 0 @normals = [] @uvs = [] super() @binaryLoader.initMaterials this, @materials, @texturePath @md = BinaryModel.parseMetaData @data, @currentOffset @currentOffset += @md.header_bytes # @md.vertex_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.material_index_bytes = Uint16Array.BYTES_PER_ELEMENT # @md.normal_index_bytes = Uint32Array.BYTES_PER_ELEMENT # @md.uv_index_bytes = Uint32Array.BYTES_PER_ELEMENT # buffers sizes @tri_size = @md.vertex_index_bytes * 3 + @md.material_index_bytes @quad_size = @md.vertex_index_bytes * 4 + @md.material_index_bytes @len_tri_flat = @md.ntri_flat * @tri_size @len_tri_smooth = @md.ntri_smooth * (@tri_size + @md.normal_index_bytes * 3) @len_tri_flat_uv = @md.ntri_flat_uv * (@tri_size + @md.uv_index_bytes * 3) @len_tri_smooth_uv = @md.ntri_smooth_uv * (@tri_size + @md.normal_index_bytes * 3 + @md.uv_index_bytes * 3) @len_quad_flat = @md.nquad_flat * @quad_size @len_quad_smooth = @md.nquad_smooth * (@quad_size + @md.normal_index_bytes * 4) @len_quad_flat_uv = @md.nquad_flat_uv * (@quad_size + @md.uv_index_bytes * 4) @len_quad_smooth_uv = @md.nquad_smooth_uv * (@quad_size + @md.normal_index_bytes * 4 + @md.uv_index_bytes * 4) # read buffers @currentOffset += @init_vertices @currentOffset @currentOffset += @init_normals @currentOffset @currentOffset += BinaryModel.handlePadding @md.nnormals * 3 @currentOffset += @init_uvs @currentOffset @start_tri_flat = @currentOffset @start_tri_smooth = @start_tri_flat + @len_tri_flat + BinaryModel.handlePadding @md.ntri_flat * 2 @start_tri_flat_uv = @start_tri_smooth + @len_tri_smooth + BinaryModel.handlePadding @md.ntri_smooth * 2 @start_tri_smooth_uv = @start_tri_flat_uv + @len_tri_flat_uv + BinaryModel.handlePadding @md.ntri_flat_uv * 2 @start_quad_flat = @start_tri_smooth_uv + @len_tri_smooth_uv + BinaryModel.handlePadding @md.ntri_smooth_uv * 2 @start_quad_smooth = @start_quad_flat + @len_quad_flat + BinaryModel.handlePadding @md.nquad_flat * 2 @start_quad_flat_uv = @start_quad_smooth + @len_quad_smooth + BinaryModel.handlePadding @md.nquad_smooth * 2 @start_quad_smooth_uv = @start_quad_flat_uv + @len_quad_flat_uv + BinaryModel.handlePadding @md.nquad_flat_uv * 2 # have to first process faces with uvs # so that face and uv indices match @init_triangles_flat_uv @start_tri_flat_uv @init_triangles_smooth_uv @start_tri_smooth_uv @init_quads_flat_uv @start_quad_flat_uv @init_quads_smooth_uv @start_quad_smooth_uv # now we can process untextured faces @init_triangles_flat @start_tri_flat @init_triangles_smooth @start_tri_smooth @init_quads_flat @start_quad_flat @init_quads_smooth @start_quad_smooth @computeCentroids() @computeFaceNormals() @computeTangents() if @binaryLoader.hasNormals this @handlePadding: (n) -> if (n % 4) 4 - n % 4 else 0 @parseMetaData: (data, offset) -> meta = signature: BinaryModel.parseString data, offset, 12 header_bytes: BinaryModel.parseUChar8 data, offset + 12 vertex_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 13 normal_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 14 uv_coordinate_bytes: BinaryModel.parseUChar8 data, offset + 15 vertex_index_bytes: BinaryModel.parseUChar8 data, offset + 16 normal_index_bytes: BinaryModel.parseUChar8 data, offset + 17 uv_index_bytes: BinaryModel.parseUChar8 data, offset + 18 material_index_bytes: BinaryModel.parseUChar8 data, offset + 19 nvertices: BinaryModel.parseUInt32 data, offset + 20 nnormals: BinaryModel.parseUInt32 data, offset + 20 + 4 * 1 nuvs: BinaryModel.parseUInt32 data, offset + 20 + 4 * 2 ntri_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 3 ntri_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 4 ntri_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 5 ntri_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 6 nquad_flat: BinaryModel.parseUInt32 data, offset + 20 + 4 * 7 nquad_smooth: BinaryModel.parseUInt32 data, offset + 20 + 4 * 8 nquad_flat_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 9 nquad_smooth_uv: BinaryModel.parseUInt32 data, offset + 20 + 4 * 10 # console.log "signature: ", meta.signature # console.log "header_bytes: ", meta.header_bytes # console.log "vertex_coordinate_bytes: ", meta.vertex_coordinate_bytes # console.log "normal_coordinate_bytes: ", meta.normal_coordinate_bytes # console.log "uv_coordinate_bytes: ", meta.uv_coordinate_bytes # console.log "vertex_index_bytes: ", meta.vertex_index_bytes # console.log "normal_index_bytes: ", meta.normal_index_bytes # console.log "uv_index_bytes: ", meta.uv_index_bytes # console.log "material_index_bytes: ", meta.material_index_bytes # console.log "nvertices: ", meta.nvertices # console.log "nnormals: ", meta.nnormals # console.log "nuvs: ", meta.nuvs # console.log "ntri_flat: ", meta.ntri_flat # console.log "ntri_smooth: ", meta.ntri_smooth # console.log "ntri_flat_uv: ", meta.ntri_flat_uv # console.log "ntri_smooth_uv: ", meta.ntri_smooth_uv # console.log "nquad_flat: ", meta.nquad_flat # console.log "nquad_smooth: " , meta.nquad_smooth # console.log "nquad_flat_uv: ", meta.nquad_flat_uv # console.log "nquad_smooth_uv: ", meta.nquad_smooth_uv # total = meta.header_bytes + # + meta.nvertices * meta.vertex_coordinate_bytes * 3 # + meta.nnormals * meta.normal_coordinate_bytes * 3 # + meta.nuvs * meta.uv_coordinate_bytes * 2 # # + meta.ntri_flat * (meta.vertex_index_bytes * 3 + meta.material_index_bytes) # + meta.ntri_smooth * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3) # + meta.ntri_flat_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.uv_index_bytes * 3) # + meta.ntri_smooth_uv * (meta.vertex_index_bytes * 3 + meta.material_index_bytes + meta.normal_index_bytes * 3 + meta.uv_index_bytes * 3) # # + meta.nquad_flat * (meta.vertex_index_bytes * 4 + meta.material_index_bytes) # + meta.nquad_smooth * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4) # + meta.nquad_flat_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.uv_index_bytes * 4) # + meta.nquad_smooth_uv * (meta.vertex_index_bytes * 4 + meta.material_index_bytes + meta.normal_index_bytes * 4 + meta.uv_index_bytes * 4) # console.log "total bytes: ", total meta @parseString: (data, offset, length) -> charArray = new Uint8Array data, offset, length text = "" for i in [0...length] text += String.fromCharCode charArray[offset + i] text @parseUChar8: (data, offset) -> charArray = new Uint8Array data, offset, 1 charArray[0] @parseUInt32: (data, offset) -> intArray = new Uint32Array data, offset, 1 intArray[0] vertex: (x, y, z) -> @vertices.push new THREE.Vector3(x, y, z) f3: (a, b, c, mi) -> @faces.push new THREE.Face3(a, b, c, null, null, mi) f4: (a, b, c, d, mi) -> @faces.push new THREE.Face4(a, b, c, d, null, null, mi) f3n: (a, b, c, mi, na, nb, nc) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] @faces.push new THREE.Face3(a, b, c, [ new THREE.Vector3 nax, nay, naz new THREE.Vector3 nbx, nby, nbz new THREE.Vector3 ncx, ncy, ncz ], null, mi) f4n: (a, b, c, d, mi, na, nb, nc, nd) -> nax = @normals[na * 3] nay = @normals[na * 3 + 1] naz = @normals[na * 3 + 2] nbx = @normals[nb * 3] nby = @normals[nb * 3 + 1] nbz = @normals[nb * 3 + 2] ncx = @normals[nc * 3] ncy = @normals[nc * 3 + 1] ncz = @normals[nc * 3 + 2] ndx = @normals[nd * 3] ndy = @normals[nd * 3 + 1] ndz = @normals[nd * 3 + 2] @faces.push new THREE.Face4(a, b, c, d, [ new THREE.Vector3(nax, nay, naz) new THREE.Vector3(nbx, nby, nbz) new THREE.Vector3(ncx, ncy, ncz) new THREE.Vector3(ndx, ndy, ndz) ], null, mi) @uv3: (where, u1, v1, u2, v2, u3, v3) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) where.push uv @uv4: (where, u1, v1, u2, v2, u3, v3, u4, v4) -> uv = [] uv.push new THREE.UV(u1, v1) uv.push new THREE.UV(u2, v2) uv.push new THREE.UV(u3, v3) uv.push new THREE.UV(u4, v4) where.push uv init_vertices: (start) -> nElements = @md.nvertices coordArray = new Float32Array @data, start, nElements * 3 for i in [0...nElements] x = coordArray[i * 3] y = coordArray[i * 3 + 1] z = coordArray[i * 3 + 2] @vertex x, y, z nElements * 3 * Float32Array.BYTES_PER_ELEMENT init_normals: (start) -> nElements = @md.nnormals if nElements normalArray = new Int8Array @data, start, nElements * 3 for i in [0...nElements] x = normalArray[i * 3] y = normalArray[i * 3 + 1] z = normalArray[i * 3 + 2] @normals.push x / 127, y / 127, z / 127 nElements * 3 * Int8Array.BYTES_PER_ELEMENT init_uvs: (start) -> nElements = @md.nuvs if nElements uvArray = new Float32Array @data, start, nElements * 2 for i in [0...nElements] u = uvArray[i * 2] v = uvArray[i * 2 + 1] @uvs.push u, v nElements * 2 * Float32Array.BYTES_PER_ELEMENT init_uvs3: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 3 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 3] uvb = uvIndexBuffer[i * 3 + 1] uvc = uvIndexBuffer[i * 3 + 2] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] BinaryModel.uv3 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3 init_uvs4: (nElements, offset) -> uvIndexBuffer = new Uint32Array @data, offset, 4 * nElements for i in [0...nElements] uva = uvIndexBuffer[i * 4] uvb = uvIndexBuffer[i * 4 + 1] uvc = uvIndexBuffer[i * 4 + 2] uvd = uvIndexBuffer[i * 4 + 3] u1 = uvs[uva * 2] v1 = uvs[uva * 2 + 1] u2 = uvs[uvb * 2] v2 = uvs[uvb * 2 + 1] u3 = uvs[uvc * 2] v3 = uvs[uvc * 2 + 1] u4 = uvs[uvd * 2] v4 = uvs[uvd * 2 + 1] BinaryModel.uv4 @binaryLoader.faceVertexUvs[0], u1, v1, u2, v2, u3, v3, u4, v4 init_faces3_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3 a, b, c, m init_faces4_flat: (nElements, offsetVertices, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4 a, b, c, d, m init_faces3_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 3 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 3 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 3] b = vertexIndexBuffer[i * 3 + 1] c = vertexIndexBuffer[i * 3 + 2] na = normalIndexBuffer[i * 3] nb = normalIndexBuffer[i * 3 + 1] nc = normalIndexBuffer[i * 3 + 2] m = materialIndexBuffer[i] @f3n a, b, c, m, na, nb, nc init_faces4_smooth: (nElements, offsetVertices, offsetNormals, offsetMaterials) -> vertexIndexBuffer = new Uint32Array @data, offsetVertices, 4 * nElements normalIndexBuffer = new Uint32Array @data, offsetNormals, 4 * nElements materialIndexBuffer = new Uint16Array @data, offsetMaterials, nElements for i in [0...nElements] a = vertexIndexBuffer[i * 4] b = vertexIndexBuffer[i * 4 + 1] c = vertexIndexBuffer[i * 4 + 2] d = vertexIndexBuffer[i * 4 + 3] na = normalIndexBuffer[i * 4] nb = normalIndexBuffer[i * 4 + 1] nc = normalIndexBuffer[i * 4 + 2] nd = normalIndexBuffer[i * 4 + 3] m = materialIndexBuffer[i] @f4n a, b, c, d, m, na, nb, nc, nd init_triangles_flat: (start) -> nElements = @md.ntri_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials init_triangles_flat_uv: (start) -> nElements = @md.ntri_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_flat nElements, start, offsetMaterials @init_uvs3 nElements, offsetUvs init_triangles_smooth: (start) -> nElements = @md.ntri_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials init_triangles_smooth_uv: (start) -> nElements = @md.ntri_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 3 @init_faces3_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs3 nElements, offsetUvs init_quads_flat: (start) -> nElements = @md.nquad_flat if nElements offsetMaterials = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials init_quads_flat_uv: (start) -> nElements = @md.nquad_flat_uv if nElements offsetUvs = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_flat nElements, start, offsetMaterials @init_uvs4 nElements, offsetUvs init_quads_smooth: (start) -> nElements = @md.nquad_smooth if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials init_quads_smooth_uv: (start) -> nElements = @md.nquad_smooth_uv if nElements offsetNormals = start + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetUvs = offsetNormals + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 offsetMaterials = offsetUvs + nElements * Uint32Array.BYTES_PER_ELEMENT * 4 @init_faces4_smooth nElements, start, offsetNormals, offsetMaterials @init_uvs4 nElements, offsetUvs namespace "THREE", (exports) -> exports.BinaryLoader = BinaryLoader exports.BinaryModel = BinaryModel
[ { "context": "ailSubject: 'my current items'\n\t\temailRecipient: 'you@me.com'\n\t\tsaveFilename: 'barn'\n\t\tmaxColumns: 10\n\t\tcolumn", "end": 276, "score": 0.9999183416366577, "start": 266, "tag": "EMAIL", "value": "you@me.com" } ]
coffeescript/config.coffee
cybernetics/tyto
1
define [], -> config = autoSave: true showIntroModalOnLoad: false introModalId: 'tytoIntroModal' helpModalId: 'tytoHelpModal' infoModalId: 'tytoInfoModal' DOMId: 'barn' DOMElementSelector: '.barn' emailSubject: 'my current items' emailRecipient: 'you@me.com' saveFilename: 'barn' maxColumns: 10 columns: [ title: 'A column' items: [ content: "I'm your first item, and just like all items I am draggable between columns by using the move icon." collapsed: false title:"Item header." , collapsed: false content: 'there are actions available above for you to add columns and items, export your board, load a board etc.' title: "Click to edit me!" ] , title: 'Another column' items: [ collapsed: false content: "You can also collapse/expand items by clicking the plus/minus icon." title: "collapsible" , collapsed: false content: "If you want to just get started you can wipe the board using the menu above." title: "Wipe" ] , title: 'Click me to edit' items: [ collapsed: false title: "edit me" content: 'you can click an item to enter edit mode and edit it.' , collapsed: true content: "I was collapsed." title: "collapsed" ] , title: 'Done' items: [ content: 'You can also drag columns to resort their ordering using the move icon at the top next to the remove icon.' , title: "saving" content: "As long as you've accepted the use of cookies all your tasks are saved in the browser so no worries about losing everything." collapsed: true ] ]
69193
define [], -> config = autoSave: true showIntroModalOnLoad: false introModalId: 'tytoIntroModal' helpModalId: 'tytoHelpModal' infoModalId: 'tytoInfoModal' DOMId: 'barn' DOMElementSelector: '.barn' emailSubject: 'my current items' emailRecipient: '<EMAIL>' saveFilename: 'barn' maxColumns: 10 columns: [ title: 'A column' items: [ content: "I'm your first item, and just like all items I am draggable between columns by using the move icon." collapsed: false title:"Item header." , collapsed: false content: 'there are actions available above for you to add columns and items, export your board, load a board etc.' title: "Click to edit me!" ] , title: 'Another column' items: [ collapsed: false content: "You can also collapse/expand items by clicking the plus/minus icon." title: "collapsible" , collapsed: false content: "If you want to just get started you can wipe the board using the menu above." title: "Wipe" ] , title: 'Click me to edit' items: [ collapsed: false title: "edit me" content: 'you can click an item to enter edit mode and edit it.' , collapsed: true content: "I was collapsed." title: "collapsed" ] , title: 'Done' items: [ content: 'You can also drag columns to resort their ordering using the move icon at the top next to the remove icon.' , title: "saving" content: "As long as you've accepted the use of cookies all your tasks are saved in the browser so no worries about losing everything." collapsed: true ] ]
true
define [], -> config = autoSave: true showIntroModalOnLoad: false introModalId: 'tytoIntroModal' helpModalId: 'tytoHelpModal' infoModalId: 'tytoInfoModal' DOMId: 'barn' DOMElementSelector: '.barn' emailSubject: 'my current items' emailRecipient: 'PI:EMAIL:<EMAIL>END_PI' saveFilename: 'barn' maxColumns: 10 columns: [ title: 'A column' items: [ content: "I'm your first item, and just like all items I am draggable between columns by using the move icon." collapsed: false title:"Item header." , collapsed: false content: 'there are actions available above for you to add columns and items, export your board, load a board etc.' title: "Click to edit me!" ] , title: 'Another column' items: [ collapsed: false content: "You can also collapse/expand items by clicking the plus/minus icon." title: "collapsible" , collapsed: false content: "If you want to just get started you can wipe the board using the menu above." title: "Wipe" ] , title: 'Click me to edit' items: [ collapsed: false title: "edit me" content: 'you can click an item to enter edit mode and edit it.' , collapsed: true content: "I was collapsed." title: "collapsed" ] , title: 'Done' items: [ content: 'You can also drag columns to resort their ordering using the move icon at the top next to the remove icon.' , title: "saving" content: "As long as you've accepted the use of cookies all your tasks are saved in the browser so no worries about losing everything." collapsed: true ] ]
[ { "context": "### ^\nBSD 3-Clause License\n\nCopyright (c) 2017, Stephan Jorek\nAll rights reserved.\n\nRedistribution and use in s", "end": 61, "score": 0.9998369216918945, "start": 48, "tag": "NAME", "value": "Stephan Jorek" } ]
src/Unordered/AttributeMap.coffee
sjorek/goatee-rules.js
0
### ^ BSD 3-Clause License Copyright (c) 2017, Stephan Jorek All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### RuleMap = require './RuleMap' { dashify } = require '../Utility' ### # # AttributeMaps … # ----------------- # # … look like “attribute-key: expression; another-key: value”. They # provide a implementation of unordered `RuleMap`s having its keys # normalized to dash-seperation. ### ###* # ------------- # @class AttributeMap # @namespace GoateeRules.Unordered ### class AttributeMap extends RuleMap ###* # ------------- # @method normalizeKey # @param {String} string # @return {String} ### normalizeKey: (string) -> dashify super(string) module.exports = AttributeMap
222311
### ^ BSD 3-Clause License Copyright (c) 2017, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### RuleMap = require './RuleMap' { dashify } = require '../Utility' ### # # AttributeMaps … # ----------------- # # … look like “attribute-key: expression; another-key: value”. They # provide a implementation of unordered `RuleMap`s having its keys # normalized to dash-seperation. ### ###* # ------------- # @class AttributeMap # @namespace GoateeRules.Unordered ### class AttributeMap extends RuleMap ###* # ------------- # @method normalizeKey # @param {String} string # @return {String} ### normalizeKey: (string) -> dashify super(string) module.exports = AttributeMap
true
### ^ BSD 3-Clause License Copyright (c) 2017, PI:NAME:<NAME>END_PI All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### RuleMap = require './RuleMap' { dashify } = require '../Utility' ### # # AttributeMaps … # ----------------- # # … look like “attribute-key: expression; another-key: value”. They # provide a implementation of unordered `RuleMap`s having its keys # normalized to dash-seperation. ### ###* # ------------- # @class AttributeMap # @namespace GoateeRules.Unordered ### class AttributeMap extends RuleMap ###* # ------------- # @method normalizeKey # @param {String} string # @return {String} ### normalizeKey: (string) -> dashify super(string) module.exports = AttributeMap
[ { "context": "\n# Copyright Joyent, Inc. and other Node contributors.\n#\n# Permission", "end": 19, "score": 0.9996035099029541, "start": 13, "tag": "NAME", "value": "Joyent" } ]
test/simple/test-event-emitter-listeners-side-effects.coffee
lxe/io.coffee
0
# Copyright Joyent, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. common = require("../common") assert = require("assert") events = require("events") EventEmitter = require("events").EventEmitter assert = require("assert") e = new EventEmitter fl = undefined # foo listeners fl = e.listeners("foo") assert Array.isArray(fl) assert fl.length is 0 assert.deepEqual e._events, {} e.on "foo", assert.fail fl = e.listeners("foo") assert e._events.foo is assert.fail assert Array.isArray(fl) assert fl.length is 1 assert fl[0] is assert.fail e.listeners "bar" assert not e._events.hasOwnProperty("bar") e.on "foo", assert.ok fl = e.listeners("foo") assert Array.isArray(e._events.foo) assert e._events.foo.length is 2 assert e._events.foo[0] is assert.fail assert e._events.foo[1] is assert.ok assert Array.isArray(fl) assert fl.length is 2 assert fl[0] is assert.fail assert fl[1] is assert.ok console.log "ok"
21566
# Copyright <NAME>, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. common = require("../common") assert = require("assert") events = require("events") EventEmitter = require("events").EventEmitter assert = require("assert") e = new EventEmitter fl = undefined # foo listeners fl = e.listeners("foo") assert Array.isArray(fl) assert fl.length is 0 assert.deepEqual e._events, {} e.on "foo", assert.fail fl = e.listeners("foo") assert e._events.foo is assert.fail assert Array.isArray(fl) assert fl.length is 1 assert fl[0] is assert.fail e.listeners "bar" assert not e._events.hasOwnProperty("bar") e.on "foo", assert.ok fl = e.listeners("foo") assert Array.isArray(e._events.foo) assert e._events.foo.length is 2 assert e._events.foo[0] is assert.fail assert e._events.foo[1] is assert.ok assert Array.isArray(fl) assert fl.length is 2 assert fl[0] is assert.fail assert fl[1] is assert.ok console.log "ok"
true
# Copyright PI:NAME:<NAME>END_PI, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. common = require("../common") assert = require("assert") events = require("events") EventEmitter = require("events").EventEmitter assert = require("assert") e = new EventEmitter fl = undefined # foo listeners fl = e.listeners("foo") assert Array.isArray(fl) assert fl.length is 0 assert.deepEqual e._events, {} e.on "foo", assert.fail fl = e.listeners("foo") assert e._events.foo is assert.fail assert Array.isArray(fl) assert fl.length is 1 assert fl[0] is assert.fail e.listeners "bar" assert not e._events.hasOwnProperty("bar") e.on "foo", assert.ok fl = e.listeners("foo") assert Array.isArray(e._events.foo) assert e._events.foo.length is 2 assert e._events.foo[0] is assert.fail assert e._events.foo[1] is assert.ok assert Array.isArray(fl) assert fl.length is 2 assert fl[0] is assert.fail assert fl[1] is assert.ok console.log "ok"
[ { "context": "il\n _name: @userProfile.name\n _password: @userProfile.password\n _newPassword: @userProfile.newPassword\n ", "end": 968, "score": 0.9967989921569824, "start": 947, "tag": "PASSWORD", "value": "@userProfile.password" }, { "context": "assword: @userProfile.password\n _newPassword: @userProfile.newPassword\n _newConfirmedPassword: @userProfile.newConf", "end": 1013, "score": 0.9945330023765564, "start": 989, "tag": "PASSWORD", "value": "@userProfile.newPassword" }, { "context": "erProfile.newPassword\n _newConfirmedPassword: @userProfile.newConfirmedPassword\n\n @updateInProgress = true\n\n @messageServic", "end": 1076, "score": 0.9785881638526917, "start": 1043, "tag": "PASSWORD", "value": "@userProfile.newConfirmedPassword" } ]
app/coffee/controllers/authentication/edit_profile.coffee
justinpyvis/phpdraft
0
class EditProfileController extends BaseController @register 'EditProfileController' @inject '$rootScope', '$scope', '$sessionStorage', '$location', 'authenticationService', 'api', 'workingModalService', 'messageService', 'subscriptionKeys' initialize: => @$scope.showPassword = false @_loadUserProfileData() _loadUserProfileData: -> loadSuccess = (data) => @userProfile = data errorHandler = (response) -> @messageService.showError "Unable to load user profile" @api.Authentication.getProfile({}, loadSuccess, errorHandler) passwordInputType: => if @$scope.showPassword 'text' else 'password' submitClicked: => if @form.$valid @update() profileFormIsInvalid: => return @updateInProgress or not @form.$valid update: => @workingModalService.openModal() updateModel = _email: @userProfile.email _name: @userProfile.name _password: @userProfile.password _newPassword: @userProfile.newPassword _newConfirmedPassword: @userProfile.newConfirmedPassword @updateInProgress = true @messageService.closeToasts() updateSuccessHandler = (response) => @updateInProgress = false @workingModalService.closeModal() @form.$setPristine() if response.invalidateLogin == true @authenticationService.uncacheSession() if response.sendEmail == true @messageService.showInfo "Your email was updated. In order to login again you must verify your email address. An email has been sent to that account to activate it. You will be logged out for now. See you soon!" @$location.path '/home' else @messageService.showInfo "Since you changed your password, we had to log you out and log you back in again. But no biggie - just enter your new password now to login again." @$location.path '/login' else if @$sessionStorage.user_name != @userProfile.name @authenticationService.cacheName(@userProfile.name) @messageService.showInfo "User profile information updated!" @sendToPreviousPath() updateFailureHandler = (response) => @updateInProgress = false @workingModalService.closeModal() if response.status is 400 and response.data.errors?.length > 0 updateError = response.data.errors?.join('\n') else updateError = "Whoops! We hit a snag - looks like it's on our end (#{response.data.status})" @messageService.showError "#{updateError}", 'Unable to update your user profile' @api.Authentication.setProfile(updateModel, updateSuccessHandler, updateFailureHandler)
34470
class EditProfileController extends BaseController @register 'EditProfileController' @inject '$rootScope', '$scope', '$sessionStorage', '$location', 'authenticationService', 'api', 'workingModalService', 'messageService', 'subscriptionKeys' initialize: => @$scope.showPassword = false @_loadUserProfileData() _loadUserProfileData: -> loadSuccess = (data) => @userProfile = data errorHandler = (response) -> @messageService.showError "Unable to load user profile" @api.Authentication.getProfile({}, loadSuccess, errorHandler) passwordInputType: => if @$scope.showPassword 'text' else 'password' submitClicked: => if @form.$valid @update() profileFormIsInvalid: => return @updateInProgress or not @form.$valid update: => @workingModalService.openModal() updateModel = _email: @userProfile.email _name: @userProfile.name _password: <PASSWORD> _newPassword: <PASSWORD> _newConfirmedPassword: <PASSWORD> @updateInProgress = true @messageService.closeToasts() updateSuccessHandler = (response) => @updateInProgress = false @workingModalService.closeModal() @form.$setPristine() if response.invalidateLogin == true @authenticationService.uncacheSession() if response.sendEmail == true @messageService.showInfo "Your email was updated. In order to login again you must verify your email address. An email has been sent to that account to activate it. You will be logged out for now. See you soon!" @$location.path '/home' else @messageService.showInfo "Since you changed your password, we had to log you out and log you back in again. But no biggie - just enter your new password now to login again." @$location.path '/login' else if @$sessionStorage.user_name != @userProfile.name @authenticationService.cacheName(@userProfile.name) @messageService.showInfo "User profile information updated!" @sendToPreviousPath() updateFailureHandler = (response) => @updateInProgress = false @workingModalService.closeModal() if response.status is 400 and response.data.errors?.length > 0 updateError = response.data.errors?.join('\n') else updateError = "Whoops! We hit a snag - looks like it's on our end (#{response.data.status})" @messageService.showError "#{updateError}", 'Unable to update your user profile' @api.Authentication.setProfile(updateModel, updateSuccessHandler, updateFailureHandler)
true
class EditProfileController extends BaseController @register 'EditProfileController' @inject '$rootScope', '$scope', '$sessionStorage', '$location', 'authenticationService', 'api', 'workingModalService', 'messageService', 'subscriptionKeys' initialize: => @$scope.showPassword = false @_loadUserProfileData() _loadUserProfileData: -> loadSuccess = (data) => @userProfile = data errorHandler = (response) -> @messageService.showError "Unable to load user profile" @api.Authentication.getProfile({}, loadSuccess, errorHandler) passwordInputType: => if @$scope.showPassword 'text' else 'password' submitClicked: => if @form.$valid @update() profileFormIsInvalid: => return @updateInProgress or not @form.$valid update: => @workingModalService.openModal() updateModel = _email: @userProfile.email _name: @userProfile.name _password: PI:PASSWORD:<PASSWORD>END_PI _newPassword: PI:PASSWORD:<PASSWORD>END_PI _newConfirmedPassword: PI:PASSWORD:<PASSWORD>END_PI @updateInProgress = true @messageService.closeToasts() updateSuccessHandler = (response) => @updateInProgress = false @workingModalService.closeModal() @form.$setPristine() if response.invalidateLogin == true @authenticationService.uncacheSession() if response.sendEmail == true @messageService.showInfo "Your email was updated. In order to login again you must verify your email address. An email has been sent to that account to activate it. You will be logged out for now. See you soon!" @$location.path '/home' else @messageService.showInfo "Since you changed your password, we had to log you out and log you back in again. But no biggie - just enter your new password now to login again." @$location.path '/login' else if @$sessionStorage.user_name != @userProfile.name @authenticationService.cacheName(@userProfile.name) @messageService.showInfo "User profile information updated!" @sendToPreviousPath() updateFailureHandler = (response) => @updateInProgress = false @workingModalService.closeModal() if response.status is 400 and response.data.errors?.length > 0 updateError = response.data.errors?.join('\n') else updateError = "Whoops! We hit a snag - looks like it's on our end (#{response.data.status})" @messageService.showError "#{updateError}", 'Unable to update your user profile' @api.Authentication.setProfile(updateModel, updateSuccessHandler, updateFailureHandler)
[ { "context": "cess', ->\n cookies = undefined;\n himself = \"ToBeUpdateViewer3\"\n before (done) ->\n auth.login(server, ", "end": 433, "score": 0.9588266611099243, "start": 416, "tag": "USERNAME", "value": "ToBeUpdateViewer3" }, { "context": "re (done) ->\n auth.login(server, {username: himself, password:\"password\"}, 200, \n (res)->\n", "end": 501, "score": 0.71468186378479, "start": 494, "tag": "USERNAME", "value": "himself" }, { "context": " auth.login(server, {username: himself, password:\"password\"}, 200, \n (res)->\n cook", "end": 521, "score": 0.9995306730270386, "start": 513, "tag": "PASSWORD", "value": "password" }, { "context": "{\n role: \"viewer\",\n email: \"test@test.com\"\n }\n user.update(server, cookies, \"", "end": 793, "score": 0.9999220967292786, "start": 780, "tag": "EMAIL", "value": "test@test.com" }, { "context": "(done) ->\n payload = {\n email: \"updateemail@test.com\",\n position: \"QA Manager\",\n ", "end": 1126, "score": 0.9999260306358337, "start": 1106, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": " position: \"QA Manager\",\n displayname: \"#1 Boss\",\n settings: {\n la", "end": 1193, "score": 0.9234079122543335, "start": 1190, "tag": "NAME", "value": "\"#1" }, { "context": "sition: \"QA Manager\",\n displayname: \"#1 Boss\",\n settings: {\n languag", "end": 1198, "score": 0.9860142469406128, "start": 1194, "tag": "NAME", "value": "Boss" }, { "context": ") ->\n rs.body.username.should.equal himself\n rs.body.email.should.equal 'updat", "end": 1710, "score": 0.8905332088470459, "start": 1703, "tag": "USERNAME", "value": "himself" }, { "context": "mself\n rs.body.email.should.equal 'updateemail@test.com'\n rs.body.displayname.should.equal", "end": 1775, "score": 0.9999262690544128, "start": 1755, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": " rs.body.displayname.should.equal '#1 Boss'\n rs.body.role.should.equal 'viewe", "end": 1834, "score": 0.9487085342407227, "start": 1830, "tag": "NAME", "value": "Boss" }, { "context": "ne) ->\n auth.login(server, {username: \"admin@test.com\", password:\"password\"}, 200, \n (res)->", "end": 2568, "score": 0.9999122619628906, "start": 2554, "tag": "EMAIL", "value": "admin@test.com" }, { "context": "in(server, {username: \"admin@test.com\", password:\"password\"}, 200, \n (res)->\n # lo", "end": 2589, "score": 0.9993939399719238, "start": 2581, "tag": "PASSWORD", "value": "password" }, { "context": "ders['set-cookie'].pop().split(';')[0],{username:\"ToBeUpdateViewer3\"},200,\n (r) ->\n ", "end": 2785, "score": 0.9634684920310974, "start": 2768, "tag": "USERNAME", "value": "ToBeUpdateViewer3" }, { "context": "cess', ->\n cookies = undefined;\n himself = \"ToBeUpdateViewer2\"\n before (done) ->\n auth.login(server, ", "end": 5558, "score": 0.8858217597007751, "start": 5541, "tag": "USERNAME", "value": "ToBeUpdateViewer2" }, { "context": " auth.login(server, {username: himself, password:\"password\"}, 200, \n (res)->\n cook", "end": 5646, "score": 0.9995002746582031, "start": 5638, "tag": "PASSWORD", "value": "password" }, { "context": "{\n role: \"viewer\",\n email: \"test@test.com\"\n }\n user.update(server, cookies, \"", "end": 5918, "score": 0.999912440776825, "start": 5905, "tag": "EMAIL", "value": "test@test.com" }, { "context": "(done) ->\n payload = {\n email: \"updateemail@test.com\",\n position: \"QA Manager\",\n ", "end": 6597, "score": 0.9999220967292786, "start": 6577, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": "->\n rs.body.username.should.equal 'ToBeUpdateViewer2'\n rs.body.email.should.equal 'upda", "end": 7192, "score": 0.9993343353271484, "start": 7175, "tag": "USERNAME", "value": "ToBeUpdateViewer2" }, { "context": "wer2'\n rs.body.email.should.equal 'updateemail@test.com'\n rs.body.displayname.should.equal", "end": 7258, "score": 0.9999306797981262, "start": 7238, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": " (done) ->\n auth.login(server, {username: \"admin@test.com\", password:\"password\"}, 200, \n (res)->", "end": 8043, "score": 0.9999176263809204, "start": 8029, "tag": "EMAIL", "value": "admin@test.com" }, { "context": "in(server, {username: \"admin@test.com\", password:\"password\"}, 200, \n (res)->\n cook", "end": 8064, "score": 0.9992971420288086, "start": 8056, "tag": "PASSWORD", "value": "password" }, { "context": "ne) ->\n payload = {\n username: \"TestSignUpUser\",\n password: \"TestSignUpUser\",\n ", "end": 8328, "score": 0.9997289180755615, "start": 8314, "tag": "USERNAME", "value": "TestSignUpUser" }, { "context": "sername: \"TestSignUpUser\",\n password: \"TestSignUpUser\",\n role: \"admin\",\n email: \"", "end": 8368, "score": 0.9989292621612549, "start": 8354, "tag": "PASSWORD", "value": "TestSignUpUser" }, { "context": "\",\n role: \"admin\",\n email: \"test@test.com\",\n settings: {\n report:", "end": 8431, "score": 0.9999276399612427, "start": 8418, "tag": "EMAIL", "value": "test@test.com" }, { "context": "rs) ->\n rs.body.username.should.equal 'TestSignUpUser'\n rs.body.email.should.equal 'test@tes", "end": 8835, "score": 0.9996902346611023, "start": 8821, "tag": "USERNAME", "value": "TestSignUpUser" }, { "context": "gnUpUser'\n rs.body.email.should.equal 'test@test.com'\n rs.body.displayname.should.equal 'Te", "end": 8890, "score": 0.9999281167984009, "start": 8877, "tag": "EMAIL", "value": "test@test.com" }, { "context": "om'\n rs.body.displayname.should.equal 'TestSignUpUser'\n rs.body.role.should.equal 'admin'\n ", "end": 8952, "score": 0.9092614054679871, "start": 8938, "tag": "USERNAME", "value": "TestSignUpUser" }, { "context": "ne) ->\n payload = {\n password: \"updateemail@test.com\"\n }\n user.update(server, cookies, \"", "end": 9661, "score": 0.9996396899223328, "start": 9641, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": "ne) ->\n payload = {\n username: \"ToBeUpdateViewer2\",\n }\n user.update(server, cookies, ", "end": 10075, "score": 0.9990630149841309, "start": 10058, "tag": "USERNAME", "value": "ToBeUpdateViewer2" }, { "context": ",\n }\n user.update(server, cookies, \"ToBeUpdateViewer1\", payload, 400,\n (rs) ->\n", "end": 10130, "score": 0.5303353667259216, "start": 10126, "tag": "USERNAME", "value": "ToBe" }, { "context": "body.error.should.equal 'Cannot update username to ToBeUpdateViewer2. It has been taken already! Please choose a diffe", "end": 10267, "score": 0.9840062856674194, "start": 10250, "tag": "USERNAME", "value": "ToBeUpdateViewer2" }, { "context": " role: \"operator\",\n email: \"updateemail@test.com\",\n position: \"QA Manager\",\n ", "end": 10507, "score": 0.9998819828033447, "start": 10487, "tag": "EMAIL", "value": "updateemail@test.com" }, { "context": " position: \"QA Manager\",\n displayname: \"#1 Boss\",\n settings: {\n la", "end": 10574, "score": 0.8175662755966187, "start": 10571, "tag": "NAME", "value": "\"#1" }, { "context": "sition: \"QA Manager\",\n displayname: \"#1 Boss\",\n settings: {\n languag", "end": 10579, "score": 0.8351364135742188, "start": 10575, "tag": "NAME", "value": "Boss" }, { "context": "->\n rs.body.username.should.equal 'ToBeUpdateViewer1'\n rs.body.email.should.equal 'upda", "end": 11452, "score": 0.99864262342453, "start": 11435, "tag": "USERNAME", "value": "ToBeUpdateViewer1" }, { "context": "wer1'\n rs.body.email.should.equal 'updateemail@test.com'\n rs.body.displayname.should.equal", "end": 11518, "score": 0.9999271035194397, "start": 11498, "tag": "EMAIL", "value": "updateemail@test.com" } ]
test/services_tests/test_user_services.coffee
ureport-web/ureport-s
3
#load application models server = require('../../app') _ = require('underscore'); user = require('../api_objects/user_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User with viewer access', -> cookies = undefined; himself = "ToBeUpdateViewer3" before (done) -> auth.login(server, {username: himself, password:"password"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "test@test.com" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'can only update himself', (done) -> payload = { email: "updateemail@test.com", position: "QA Manager", displayname: "#1 Boss", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal himself rs.body.email.should.equal 'updateemail@test.com' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'viewer' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with viewer access', -> viewer = null before (done) -> auth.login(server, {username: "admin@test.com", password:"password"}, 200, (res)-> # login as admin to get a id of operator user.search(server,res.headers['set-cookie'].pop().split(';')[0],{username:"ToBeUpdateViewer3"},200, (r) -> viewer = r.body[0] done() ) ) return it 'can update his preference - theme', (done) -> payload = { user: viewer._id, theme : { name: "slate", type: "dark" } } user.updatePreference(server, cookies, payload, 200, "theme" (rs) -> rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' done() ) return it 'can update his preference - language', (done) -> payload = { user: viewer._id, language: "ch" } user.updatePreference(server, cookies, payload, 200, "language" (rs) -> rs.body.settings.language.should.equal 'ch' done() ) return it 'can update his preference - report', (done) -> payload = { user: viewer._id, report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } user.updatePreference(server, cookies, payload, 200, "report" (rs) -> rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return it 'can update his preference - dashboard', (done) -> payload = { user: viewer._id, dashboard : { isShowWidgetBorder: false, isExpandMenu: true, isWidgetBarOnHover: false, isExpandMenu1: "doesnot exist" } } user.updatePreference(server, cookies, payload, 200, "dashboard" (rs) -> rs.body.settings.dashboard.isShowWidgetBorder.should.equal false rs.body.settings.dashboard.isExpandMenu.should.equal true rs.body.settings.dashboard.isWidgetBarOnHover.should.equal false rs.body.settings.dashboard.should.not.have.property "isExpandMenu1" done() ) return describe 'User with operator access', -> cookies = undefined; himself = "ToBeUpdateViewer2" before (done) -> auth.login(server, {username: himself, password:"password"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "test@test.com" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'cannot update role even to himself', (done) -> payload = { role: "admin" } user.update(server, cookies, himself, payload, 400, (rs) -> rs.body.error.should.equal 'You are not admin, and you cannot update the role field.' done() ) return it 'can only update himself', (done) -> payload = { email: "updateemail@test.com", position: "QA Manager", displayname: "#1 Boss", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer2' rs.body.email.should.equal 'updateemail@test.com' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with admin access', -> cookies = undefined; before (done) -> auth.login(server, {username: "admin@test.com", password:"password"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'can sign up user and billing table', (done) -> payload = { username: "TestSignUpUser", password: "TestSignUpUser", role: "admin", email: "test@test.com", settings: { report: { assignmentRI : 15, displaySearchAndFilterBoxInStep: false, displaySelfAN: true, fieldDoesnotExist: "12" } } } user.create(server, cookies, payload, 200, (rs) -> rs.body.username.should.equal 'TestSignUpUser' rs.body.email.should.equal 'test@test.com' rs.body.displayname.should.equal 'TestSignUpUser' rs.body.role.should.equal 'admin' rs.body.settings.language.should.equal 'en' rs.body.settings.theme.name.should.equal 'bootstrap' rs.body.settings.theme.type.should.equal 'light' rs.body.settings.report.assignmentRI.should.equal 15 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal false rs.body.settings.report.displaySelfAN.should.equal true rs.body.settings.report.should.not.have.property "fieldDoesnotExist" done() ) return it 'cannot update user password using update endpoint', (done) -> payload = { password: "updateemail@test.com" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update password through user update, please use /reset to update the password' done() ) return it 'cannot update username to a exist username', (done) -> payload = { username: "ToBeUpdateViewer2", } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update username to ToBeUpdateViewer2. It has been taken already! Please choose a different one.' done() ) return it 'can update user', (done) -> payload = { role: "operator", email: "updateemail@test.com", position: "QA Manager", displayname: "#1 Boss", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, status: { all: false fail: true ki: true not_pass: false out: true pass: false rerun: false skip: false } } } } user.update(server, cookies, "ToBeUpdateViewer1", payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer1' rs.body.email.should.equal 'updateemail@test.com' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false # rs.body.settings.report.displaySelfAN.should.equal false done() ) return
187362
#load application models server = require('../../app') _ = require('underscore'); user = require('../api_objects/user_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User with viewer access', -> cookies = undefined; himself = "ToBeUpdateViewer3" before (done) -> auth.login(server, {username: himself, password:"<PASSWORD>"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "<EMAIL>" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'can only update himself', (done) -> payload = { email: "<EMAIL>", position: "QA Manager", displayname: <NAME> <NAME>", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal himself rs.body.email.should.equal '<EMAIL>' rs.body.displayname.should.equal '#1 <NAME>' rs.body.role.should.equal 'viewer' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with viewer access', -> viewer = null before (done) -> auth.login(server, {username: "<EMAIL>", password:"<PASSWORD>"}, 200, (res)-> # login as admin to get a id of operator user.search(server,res.headers['set-cookie'].pop().split(';')[0],{username:"ToBeUpdateViewer3"},200, (r) -> viewer = r.body[0] done() ) ) return it 'can update his preference - theme', (done) -> payload = { user: viewer._id, theme : { name: "slate", type: "dark" } } user.updatePreference(server, cookies, payload, 200, "theme" (rs) -> rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' done() ) return it 'can update his preference - language', (done) -> payload = { user: viewer._id, language: "ch" } user.updatePreference(server, cookies, payload, 200, "language" (rs) -> rs.body.settings.language.should.equal 'ch' done() ) return it 'can update his preference - report', (done) -> payload = { user: viewer._id, report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } user.updatePreference(server, cookies, payload, 200, "report" (rs) -> rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return it 'can update his preference - dashboard', (done) -> payload = { user: viewer._id, dashboard : { isShowWidgetBorder: false, isExpandMenu: true, isWidgetBarOnHover: false, isExpandMenu1: "doesnot exist" } } user.updatePreference(server, cookies, payload, 200, "dashboard" (rs) -> rs.body.settings.dashboard.isShowWidgetBorder.should.equal false rs.body.settings.dashboard.isExpandMenu.should.equal true rs.body.settings.dashboard.isWidgetBarOnHover.should.equal false rs.body.settings.dashboard.should.not.have.property "isExpandMenu1" done() ) return describe 'User with operator access', -> cookies = undefined; himself = "ToBeUpdateViewer2" before (done) -> auth.login(server, {username: himself, password:"<PASSWORD>"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "<EMAIL>" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'cannot update role even to himself', (done) -> payload = { role: "admin" } user.update(server, cookies, himself, payload, 400, (rs) -> rs.body.error.should.equal 'You are not admin, and you cannot update the role field.' done() ) return it 'can only update himself', (done) -> payload = { email: "<EMAIL>", position: "QA Manager", displayname: "#1 Boss", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer2' rs.body.email.should.equal '<EMAIL>' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with admin access', -> cookies = undefined; before (done) -> auth.login(server, {username: "<EMAIL>", password:"<PASSWORD>"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'can sign up user and billing table', (done) -> payload = { username: "TestSignUpUser", password: "<PASSWORD>", role: "admin", email: "<EMAIL>", settings: { report: { assignmentRI : 15, displaySearchAndFilterBoxInStep: false, displaySelfAN: true, fieldDoesnotExist: "12" } } } user.create(server, cookies, payload, 200, (rs) -> rs.body.username.should.equal 'TestSignUpUser' rs.body.email.should.equal '<EMAIL>' rs.body.displayname.should.equal 'TestSignUpUser' rs.body.role.should.equal 'admin' rs.body.settings.language.should.equal 'en' rs.body.settings.theme.name.should.equal 'bootstrap' rs.body.settings.theme.type.should.equal 'light' rs.body.settings.report.assignmentRI.should.equal 15 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal false rs.body.settings.report.displaySelfAN.should.equal true rs.body.settings.report.should.not.have.property "fieldDoesnotExist" done() ) return it 'cannot update user password using update endpoint', (done) -> payload = { password: "<EMAIL>" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update password through user update, please use /reset to update the password' done() ) return it 'cannot update username to a exist username', (done) -> payload = { username: "ToBeUpdateViewer2", } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update username to ToBeUpdateViewer2. It has been taken already! Please choose a different one.' done() ) return it 'can update user', (done) -> payload = { role: "operator", email: "<EMAIL>", position: "QA Manager", displayname: <NAME> <NAME>", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, status: { all: false fail: true ki: true not_pass: false out: true pass: false rerun: false skip: false } } } } user.update(server, cookies, "ToBeUpdateViewer1", payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer1' rs.body.email.should.equal '<EMAIL>' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false # rs.body.settings.report.displaySelfAN.should.equal false done() ) return
true
#load application models server = require('../../app') _ = require('underscore'); user = require('../api_objects/user_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User with viewer access', -> cookies = undefined; himself = "ToBeUpdateViewer3" before (done) -> auth.login(server, {username: himself, password:"PI:PASSWORD:<PASSWORD>END_PI"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "PI:EMAIL:<EMAIL>END_PI" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'can only update himself', (done) -> payload = { email: "PI:EMAIL:<EMAIL>END_PI", position: "QA Manager", displayname: PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal himself rs.body.email.should.equal 'PI:EMAIL:<EMAIL>END_PI' rs.body.displayname.should.equal '#1 PI:NAME:<NAME>END_PI' rs.body.role.should.equal 'viewer' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with viewer access', -> viewer = null before (done) -> auth.login(server, {username: "PI:EMAIL:<EMAIL>END_PI", password:"PI:PASSWORD:<PASSWORD>END_PI"}, 200, (res)-> # login as admin to get a id of operator user.search(server,res.headers['set-cookie'].pop().split(';')[0],{username:"ToBeUpdateViewer3"},200, (r) -> viewer = r.body[0] done() ) ) return it 'can update his preference - theme', (done) -> payload = { user: viewer._id, theme : { name: "slate", type: "dark" } } user.updatePreference(server, cookies, payload, 200, "theme" (rs) -> rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' done() ) return it 'can update his preference - language', (done) -> payload = { user: viewer._id, language: "ch" } user.updatePreference(server, cookies, payload, 200, "language" (rs) -> rs.body.settings.language.should.equal 'ch' done() ) return it 'can update his preference - report', (done) -> payload = { user: viewer._id, report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } user.updatePreference(server, cookies, payload, 200, "report" (rs) -> rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return it 'can update his preference - dashboard', (done) -> payload = { user: viewer._id, dashboard : { isShowWidgetBorder: false, isExpandMenu: true, isWidgetBarOnHover: false, isExpandMenu1: "doesnot exist" } } user.updatePreference(server, cookies, payload, 200, "dashboard" (rs) -> rs.body.settings.dashboard.isShowWidgetBorder.should.equal false rs.body.settings.dashboard.isExpandMenu.should.equal true rs.body.settings.dashboard.isWidgetBarOnHover.should.equal false rs.body.settings.dashboard.should.not.have.property "isExpandMenu1" done() ) return describe 'User with operator access', -> cookies = undefined; himself = "ToBeUpdateViewer2" before (done) -> auth.login(server, {username: himself, password:"PI:PASSWORD:<PASSWORD>END_PI"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'cannot update user', (done) -> payload = { role: "viewer", email: "PI:EMAIL:<EMAIL>END_PI" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 403, (rs) -> rs.body.error.should.equal 'You don\'t have permission' done() ) return it 'cannot update role even to himself', (done) -> payload = { role: "admin" } user.update(server, cookies, himself, payload, 400, (rs) -> rs.body.error.should.equal 'You are not admin, and you cannot update the role field.' done() ) return it 'can only update himself', (done) -> payload = { email: "PI:EMAIL:<EMAIL>END_PI", position: "QA Manager", displayname: "#1 Boss", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, } } } user.update(server, cookies, himself, payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer2' rs.body.email.should.equal 'PI:EMAIL:<EMAIL>END_PI' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false done() ) return describe 'User with admin access', -> cookies = undefined; before (done) -> auth.login(server, {username: "PI:EMAIL:<EMAIL>END_PI", password:"PI:PASSWORD:<PASSWORD>END_PI"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return it 'can sign up user and billing table', (done) -> payload = { username: "TestSignUpUser", password: "PI:PASSWORD:<PASSWORD>END_PI", role: "admin", email: "PI:EMAIL:<EMAIL>END_PI", settings: { report: { assignmentRI : 15, displaySearchAndFilterBoxInStep: false, displaySelfAN: true, fieldDoesnotExist: "12" } } } user.create(server, cookies, payload, 200, (rs) -> rs.body.username.should.equal 'TestSignUpUser' rs.body.email.should.equal 'PI:EMAIL:<EMAIL>END_PI' rs.body.displayname.should.equal 'TestSignUpUser' rs.body.role.should.equal 'admin' rs.body.settings.language.should.equal 'en' rs.body.settings.theme.name.should.equal 'bootstrap' rs.body.settings.theme.type.should.equal 'light' rs.body.settings.report.assignmentRI.should.equal 15 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal false rs.body.settings.report.displaySelfAN.should.equal true rs.body.settings.report.should.not.have.property "fieldDoesnotExist" done() ) return it 'cannot update user password using update endpoint', (done) -> payload = { password: "PI:EMAIL:<EMAIL>END_PI" } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update password through user update, please use /reset to update the password' done() ) return it 'cannot update username to a exist username', (done) -> payload = { username: "ToBeUpdateViewer2", } user.update(server, cookies, "ToBeUpdateViewer1", payload, 400, (rs) -> rs.body.error.should.equal 'Cannot update username to ToBeUpdateViewer2. It has been taken already! Please choose a different one.' done() ) return it 'can update user', (done) -> payload = { role: "operator", email: "PI:EMAIL:<EMAIL>END_PI", position: "QA Manager", displayname: PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI", settings: { language: "fr", theme : { name: "slate", type: "dark" } report: { assignmentRI : 30, displaySearchAndFilterBoxInStep: true, displaySelfAN: false, status: { all: false fail: true ki: true not_pass: false out: true pass: false rerun: false skip: false } } } } user.update(server, cookies, "ToBeUpdateViewer1", payload, 200, (rs) -> rs.body.username.should.equal 'ToBeUpdateViewer1' rs.body.email.should.equal 'PI:EMAIL:<EMAIL>END_PI' rs.body.displayname.should.equal '#1 Boss' rs.body.role.should.equal 'operator' rs.body.position.should.equal 'QA Manager' rs.body.settings.language.should.equal 'fr' rs.body.settings.theme.name.should.equal 'slate' rs.body.settings.theme.type.should.equal 'dark' rs.body.settings.report.assignmentRI.should.equal 30 rs.body.settings.report.displaySearchAndFilterBoxInStep.should.equal true rs.body.settings.report.displaySelfAN.should.equal false # rs.body.settings.report.displaySelfAN.should.equal false done() ) return
[ { "context": "50.44985\n# lng: 30.523151\n# title: 'Kiev'\n# infoWindow:\n# content: '<", "end": 947, "score": 0.5141773819923401, "start": 946, "tag": "NAME", "value": "K" } ]
resources/assets/coffee/app.coffee
IgorBabko/dyma-v-dome-net
0
$ -> $.fn.goTo = -> $('html, body').animate({ scrollTop: ($(this).offset().top - 150) }, 'fast') return this $('.price-list a').click -> $('#' + $(this).data('id')).goTo(); $('.slick-carousel').slick slidesToShow: 5 slidesToScroll: 1 autoplay: true autoplaySpeed: 2000 CKEDITOR.config.language = 'ru' if $('#desc').length then CKEDITOR.replace('desc', height: 300) if $('#answer').length then CKEDITOR.replace('answer', height: 300) if $('#content').length then CKEDITOR.replace('content', height: 300) $('.fancybox').fancybox() # map = new GMaps( # el: '#map' # lat: 50.44985 # lng: 30.523151 # draggable: false # scrollwheel: false # disableDoubleClickZoom: true # zoomControl: false # ) # # map.addMarker # lat: 50.44985 # lng: 30.523151 # title: 'Kiev' # infoWindow: # content: '<h4>Kiev</h4>' # maxWidth: 100 # change pictures when hovering categories on the main screen $('.single-feature').hover -> imgName = $(this).parent('a').attr('href') $('.tab-content .tab-pane').removeClass('active') $('#' + imgName).addClass('active') $(".alert-success").fadeTo(2000, 500).slideUp 500, -> $(this).alert 'close' # change prices tables $("input[name='width']").change (e) -> width = $(this).val() itemName = $(this).parent().siblings('name').text() changePricesTableRequest = $.ajax url: "/prices/" + itemName + "/" + width method: "GET" $('.prices').magnificPopup delegate: 'a' type: 'image' mainClass: 'mfp-img-mobile' gallery: enabled: true navigateByImgClick: true preload: [0,1] # Will preload 0 - before current, and 1 after the current image image: tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' # zoom: # enabled: true # duration: 300 # easing: 'ease-in-out' # opener: (openerElement) -> # return openerElement.is('img') ? openerElement : openerElement.find('img') $('.expand-table-link').click -> if $(this).text() == 'Свернуть' $(this).text('Развернуть'); else $(this).text('Свернуть'); $(this).prev('table').find('tr:nth-child(n + 9)').toggle(); return # scroll to the top button $.goup() # initialize fancybox plugin (cool image viewer) $("a.fancy-img").fancyboxPlus 'transitionIn': 'elastic' 'transitionOut': 'elastic' 'speedIn': 600 'speedOut': 200 'overlayShow': false
77458
$ -> $.fn.goTo = -> $('html, body').animate({ scrollTop: ($(this).offset().top - 150) }, 'fast') return this $('.price-list a').click -> $('#' + $(this).data('id')).goTo(); $('.slick-carousel').slick slidesToShow: 5 slidesToScroll: 1 autoplay: true autoplaySpeed: 2000 CKEDITOR.config.language = 'ru' if $('#desc').length then CKEDITOR.replace('desc', height: 300) if $('#answer').length then CKEDITOR.replace('answer', height: 300) if $('#content').length then CKEDITOR.replace('content', height: 300) $('.fancybox').fancybox() # map = new GMaps( # el: '#map' # lat: 50.44985 # lng: 30.523151 # draggable: false # scrollwheel: false # disableDoubleClickZoom: true # zoomControl: false # ) # # map.addMarker # lat: 50.44985 # lng: 30.523151 # title: '<NAME>iev' # infoWindow: # content: '<h4>Kiev</h4>' # maxWidth: 100 # change pictures when hovering categories on the main screen $('.single-feature').hover -> imgName = $(this).parent('a').attr('href') $('.tab-content .tab-pane').removeClass('active') $('#' + imgName).addClass('active') $(".alert-success").fadeTo(2000, 500).slideUp 500, -> $(this).alert 'close' # change prices tables $("input[name='width']").change (e) -> width = $(this).val() itemName = $(this).parent().siblings('name').text() changePricesTableRequest = $.ajax url: "/prices/" + itemName + "/" + width method: "GET" $('.prices').magnificPopup delegate: 'a' type: 'image' mainClass: 'mfp-img-mobile' gallery: enabled: true navigateByImgClick: true preload: [0,1] # Will preload 0 - before current, and 1 after the current image image: tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' # zoom: # enabled: true # duration: 300 # easing: 'ease-in-out' # opener: (openerElement) -> # return openerElement.is('img') ? openerElement : openerElement.find('img') $('.expand-table-link').click -> if $(this).text() == 'Свернуть' $(this).text('Развернуть'); else $(this).text('Свернуть'); $(this).prev('table').find('tr:nth-child(n + 9)').toggle(); return # scroll to the top button $.goup() # initialize fancybox plugin (cool image viewer) $("a.fancy-img").fancyboxPlus 'transitionIn': 'elastic' 'transitionOut': 'elastic' 'speedIn': 600 'speedOut': 200 'overlayShow': false
true
$ -> $.fn.goTo = -> $('html, body').animate({ scrollTop: ($(this).offset().top - 150) }, 'fast') return this $('.price-list a').click -> $('#' + $(this).data('id')).goTo(); $('.slick-carousel').slick slidesToShow: 5 slidesToScroll: 1 autoplay: true autoplaySpeed: 2000 CKEDITOR.config.language = 'ru' if $('#desc').length then CKEDITOR.replace('desc', height: 300) if $('#answer').length then CKEDITOR.replace('answer', height: 300) if $('#content').length then CKEDITOR.replace('content', height: 300) $('.fancybox').fancybox() # map = new GMaps( # el: '#map' # lat: 50.44985 # lng: 30.523151 # draggable: false # scrollwheel: false # disableDoubleClickZoom: true # zoomControl: false # ) # # map.addMarker # lat: 50.44985 # lng: 30.523151 # title: 'PI:NAME:<NAME>END_PIiev' # infoWindow: # content: '<h4>Kiev</h4>' # maxWidth: 100 # change pictures when hovering categories on the main screen $('.single-feature').hover -> imgName = $(this).parent('a').attr('href') $('.tab-content .tab-pane').removeClass('active') $('#' + imgName).addClass('active') $(".alert-success").fadeTo(2000, 500).slideUp 500, -> $(this).alert 'close' # change prices tables $("input[name='width']").change (e) -> width = $(this).val() itemName = $(this).parent().siblings('name').text() changePricesTableRequest = $.ajax url: "/prices/" + itemName + "/" + width method: "GET" $('.prices').magnificPopup delegate: 'a' type: 'image' mainClass: 'mfp-img-mobile' gallery: enabled: true navigateByImgClick: true preload: [0,1] # Will preload 0 - before current, and 1 after the current image image: tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' # zoom: # enabled: true # duration: 300 # easing: 'ease-in-out' # opener: (openerElement) -> # return openerElement.is('img') ? openerElement : openerElement.find('img') $('.expand-table-link').click -> if $(this).text() == 'Свернуть' $(this).text('Развернуть'); else $(this).text('Свернуть'); $(this).prev('table').find('tr:nth-child(n + 9)').toggle(); return # scroll to the top button $.goup() # initialize fancybox plugin (cool image viewer) $("a.fancy-img").fancyboxPlus 'transitionIn': 'elastic' 'transitionOut': 'elastic' 'speedIn': 600 'speedOut': 200 'overlayShow': false
[ { "context": "GS IN THE SOFTWARE.\n\n# Taken from hubot at commit 71d1c686d9ffdfad54751080c699979fa17190a1 and modified to fit current use.\n\n\nclass Message\n", "end": 1166, "score": 0.9625998735427856, "start": 1126, "tag": "PASSWORD", "value": "71d1c686d9ffdfad54751080c699979fa17190a1" } ]
src/message.coffee
kumpelblase2/modlab-chat
0
# Copyright (c) 2013 GitHub Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Taken from hubot at commit 71d1c686d9ffdfad54751080c699979fa17190a1 and modified to fit current use. class Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. constructor: (@user, @done = false) -> @room = @user.room # Indicates that no other Listener should be called on this object # # Returns nothing. finish: -> @done = true class TextMessage extends Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. # text - A String message. # id - A String of the message ID. constructor: (@user, @text, @id) -> super @user # Determines if the message matches the given regex. # # regex - A Regex to check. # # Returns a Match object or null. match: (regex) -> @text.match regex # String representation of a TextMessage # # Returns the message text toString: () -> @text # Represents an incoming user entrance notification. # # user - A User instance for the user who entered. # text - Always null. # id - A String of the message ID. class EnterMessage extends Message # Represents an incoming user exit notification. # # user - A User instance for the user who left. # text - Always null. # id - A String of the message ID. class LeaveMessage extends Message class CatchAllMessage extends Message # Represents a message that no matchers matched. # # message - The original message. constructor: (@message) -> super @message.user module.exports = { Message TextMessage EnterMessage LeaveMessage CatchAllMessage }
176688
# Copyright (c) 2013 GitHub Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Taken from hubot at commit <PASSWORD> and modified to fit current use. class Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. constructor: (@user, @done = false) -> @room = @user.room # Indicates that no other Listener should be called on this object # # Returns nothing. finish: -> @done = true class TextMessage extends Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. # text - A String message. # id - A String of the message ID. constructor: (@user, @text, @id) -> super @user # Determines if the message matches the given regex. # # regex - A Regex to check. # # Returns a Match object or null. match: (regex) -> @text.match regex # String representation of a TextMessage # # Returns the message text toString: () -> @text # Represents an incoming user entrance notification. # # user - A User instance for the user who entered. # text - Always null. # id - A String of the message ID. class EnterMessage extends Message # Represents an incoming user exit notification. # # user - A User instance for the user who left. # text - Always null. # id - A String of the message ID. class LeaveMessage extends Message class CatchAllMessage extends Message # Represents a message that no matchers matched. # # message - The original message. constructor: (@message) -> super @message.user module.exports = { Message TextMessage EnterMessage LeaveMessage CatchAllMessage }
true
# Copyright (c) 2013 GitHub Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Taken from hubot at commit PI:PASSWORD:<PASSWORD>END_PI and modified to fit current use. class Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. constructor: (@user, @done = false) -> @room = @user.room # Indicates that no other Listener should be called on this object # # Returns nothing. finish: -> @done = true class TextMessage extends Message # Represents an incoming message from the chat. # # user - A User instance that sent the message. # text - A String message. # id - A String of the message ID. constructor: (@user, @text, @id) -> super @user # Determines if the message matches the given regex. # # regex - A Regex to check. # # Returns a Match object or null. match: (regex) -> @text.match regex # String representation of a TextMessage # # Returns the message text toString: () -> @text # Represents an incoming user entrance notification. # # user - A User instance for the user who entered. # text - Always null. # id - A String of the message ID. class EnterMessage extends Message # Represents an incoming user exit notification. # # user - A User instance for the user who left. # text - Always null. # id - A String of the message ID. class LeaveMessage extends Message class CatchAllMessage extends Message # Represents a message that no matchers matched. # # message - The original message. constructor: (@message) -> super @message.user module.exports = { Message TextMessage EnterMessage LeaveMessage CatchAllMessage }
[ { "context": "kitchen\"\n DB_USER: \"kitchen\"\n DB_PASSWORD: \"kitchen123\"\n DB_PORT: 3306\n\n API_KEY : \"d80e06ca-376", "end": 115, "score": 0.9958222508430481, "start": 105, "tag": "PASSWORD", "value": "kitchen123" }, { "context": " \"kitchen123\"\n DB_PORT: 3306\n\n API_KEY : \"d80e06ca-3766-11e5-b18f-b083fe4e159f\"\n API_SECRET : \"g1JOZUM3BYzWpZD5Q7p3z+i/z0nj2T", "end": 189, "score": 0.9997379183769226, "start": 153, "tag": "KEY", "value": "d80e06ca-3766-11e5-b18f-b083fe4e159f" }, { "context": "ca-3766-11e5-b18f-b083fe4e159f\"\n API_SECRET : \"g1JOZUM3BYzWpZD5Q7p3z+i/z0nj2TcokTFx2ic53FCMRIKbMhSUCi7fSu9ZklFCZ9tlj68unxur9qmOji4tNg==\"\n\n# API_AUTHORIZE_SERVICE_URI : \"http://everhom", "end": 298, "score": 0.9997773170471191, "start": 209, "tag": "KEY", "value": "g1JOZUM3BYzWpZD5Q7p3z+i/z0nj2TcokTFx2ic53FCMRIKbMhSUCi7fSu9ZklFCZ9tlj68unxur9qmOji4tNg==\"" }, { "context": "666/oauth2api\"\n# CLIENT_REDIRECT_URI : \"http://192.168.100.217:3001/redirect\"\n\n\n API_AUTHORIZE_SERVICE_URI: \"", "end": 591, "score": 0.999181866645813, "start": 576, "tag": "IP_ADDRESS", "value": "192.168.100.217" } ]
src/config.coffee
alex-chan/zuolin_kitchen
0
config = DB_HOST: "localhost" DB_NAME: "zuolin_kitchen" DB_USER: "kitchen" DB_PASSWORD: "kitchen123" DB_PORT: 3306 API_KEY : "d80e06ca-3766-11e5-b18f-b083fe4e159f" API_SECRET : "g1JOZUM3BYzWpZD5Q7p3z+i/z0nj2TcokTFx2ic53FCMRIKbMhSUCi7fSu9ZklFCZ9tlj68unxur9qmOji4tNg==" # API_AUTHORIZE_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/authorize" # API_TOKEN_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/token" # API_OAUTH2API_URI : "http://everhomes.asuscomm.com:16666/oauth2api" # CLIENT_REDIRECT_URI : "http://192.168.100.217:3001/redirect" API_AUTHORIZE_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/authorize" API_TOKEN_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/token" API_OAUTH2API_URI: "http://jyjy.zuolin.com/oauth2api" CLIENT_REDIRECT_URI: "http://zuolin.v-find.com:3001/redirect" module.exports = config
10847
config = DB_HOST: "localhost" DB_NAME: "zuolin_kitchen" DB_USER: "kitchen" DB_PASSWORD: "<PASSWORD>" DB_PORT: 3306 API_KEY : "<KEY>" API_SECRET : "<KEY> # API_AUTHORIZE_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/authorize" # API_TOKEN_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/token" # API_OAUTH2API_URI : "http://everhomes.asuscomm.com:16666/oauth2api" # CLIENT_REDIRECT_URI : "http://192.168.100.217:3001/redirect" API_AUTHORIZE_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/authorize" API_TOKEN_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/token" API_OAUTH2API_URI: "http://jyjy.zuolin.com/oauth2api" CLIENT_REDIRECT_URI: "http://zuolin.v-find.com:3001/redirect" module.exports = config
true
config = DB_HOST: "localhost" DB_NAME: "zuolin_kitchen" DB_USER: "kitchen" DB_PASSWORD: "PI:PASSWORD:<PASSWORD>END_PI" DB_PORT: 3306 API_KEY : "PI:KEY:<KEY>END_PI" API_SECRET : "PI:KEY:<KEY>END_PI # API_AUTHORIZE_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/authorize" # API_TOKEN_SERVICE_URI : "http://everhomes.asuscomm.com:16666/oauth2/token" # API_OAUTH2API_URI : "http://everhomes.asuscomm.com:16666/oauth2api" # CLIENT_REDIRECT_URI : "http://192.168.100.217:3001/redirect" API_AUTHORIZE_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/authorize" API_TOKEN_SERVICE_URI: "http://jyjy.zuolin.com/oauth2/token" API_OAUTH2API_URI: "http://jyjy.zuolin.com/oauth2api" CLIENT_REDIRECT_URI: "http://zuolin.v-find.com:3001/redirect" module.exports = config
[ { "context": "\n url: \"http://new.com\"\n name: \"New name\"\n\n Helper.put \"/sequences/4ed2b809d74", "end": 3089, "score": 0.6430726051330566, "start": 3086, "tag": "NAME", "value": "New" } ]
server/test/api/sequences.coffee
makeusabrew/freezer
0
assert = require "../../../test/lib/assert" Helper = require "../lib/helper" server = require("../../api").start 9876 Helper.host = "http://localhost:9876" before (done) -> Helper.start done describe "REST API - Sequences Resource", -> beforeEach -> @sequence = _id: Helper._id "4ed2b809d7446b9a0e000014" url: "http://example.com/test" name: "A test sequence" created: new Date() describe "GET /sequences", -> describe "with a single resource in the collection", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences", done it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal 1, data.length res = data[0] assert.equal "http://example.com/test", res.url assert.ok res._id describe "POST /sequences", -> beforeEach (done) -> params = url: "http://foo.com" name: "foo" Helper.post "/sequences", params, done # @TODO should this *actually* be a 201 created? it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://foo.com", data.url assert.equal "foo", data.name assert.ok data._id assert.ok data.created describe "GET /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.get "/sequences/123456789012", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with an invalid ID string", -> before (done) -> Helper.get "/sequences/1234", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://example.com/test", data.url assert.equal "A test sequence", data.name assert.equal "4ed2b809d7446b9a0e000014", data._id describe "PUT /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.put "/sequences/123456789012", {}, done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() describe "with a valid resource ID", -> beforeEach (done) -> params = url: "http://new.com" name: "New name" Helper.put "/sequences/4ed2b809d7446b9a0e000014", params, done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://new.com", data.url assert.equal "New name", data.name describe "DELETE /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.delete "/sequences/123456789012", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of zero", -> data = Helper.getJSON() assert.equal 0, data.deleted describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.delete "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of one", -> data = Helper.getJSON() assert.equal 1, data.deleted
207659
assert = require "../../../test/lib/assert" Helper = require "../lib/helper" server = require("../../api").start 9876 Helper.host = "http://localhost:9876" before (done) -> Helper.start done describe "REST API - Sequences Resource", -> beforeEach -> @sequence = _id: Helper._id "4ed2b809d7446b9a0e000014" url: "http://example.com/test" name: "A test sequence" created: new Date() describe "GET /sequences", -> describe "with a single resource in the collection", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences", done it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal 1, data.length res = data[0] assert.equal "http://example.com/test", res.url assert.ok res._id describe "POST /sequences", -> beforeEach (done) -> params = url: "http://foo.com" name: "foo" Helper.post "/sequences", params, done # @TODO should this *actually* be a 201 created? it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://foo.com", data.url assert.equal "foo", data.name assert.ok data._id assert.ok data.created describe "GET /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.get "/sequences/123456789012", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with an invalid ID string", -> before (done) -> Helper.get "/sequences/1234", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://example.com/test", data.url assert.equal "A test sequence", data.name assert.equal "4ed2b809d7446b9a0e000014", data._id describe "PUT /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.put "/sequences/123456789012", {}, done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() describe "with a valid resource ID", -> beforeEach (done) -> params = url: "http://new.com" name: "<NAME> name" Helper.put "/sequences/4ed2b809d7446b9a0e000014", params, done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://new.com", data.url assert.equal "New name", data.name describe "DELETE /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.delete "/sequences/123456789012", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of zero", -> data = Helper.getJSON() assert.equal 0, data.deleted describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.delete "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of one", -> data = Helper.getJSON() assert.equal 1, data.deleted
true
assert = require "../../../test/lib/assert" Helper = require "../lib/helper" server = require("../../api").start 9876 Helper.host = "http://localhost:9876" before (done) -> Helper.start done describe "REST API - Sequences Resource", -> beforeEach -> @sequence = _id: Helper._id "4ed2b809d7446b9a0e000014" url: "http://example.com/test" name: "A test sequence" created: new Date() describe "GET /sequences", -> describe "with a single resource in the collection", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences", done it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal 1, data.length res = data[0] assert.equal "http://example.com/test", res.url assert.ok res._id describe "POST /sequences", -> beforeEach (done) -> params = url: "http://foo.com" name: "foo" Helper.post "/sequences", params, done # @TODO should this *actually* be a 201 created? it "should return a 200 OK", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://foo.com", data.url assert.equal "foo", data.name assert.ok data._id assert.ok data.created describe "GET /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.get "/sequences/123456789012", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with an invalid ID string", -> before (done) -> Helper.get "/sequences/1234", done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "Resource not found", data.message describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.get "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://example.com/test", data.url assert.equal "A test sequence", data.name assert.equal "4ed2b809d7446b9a0e000014", data._id describe "PUT /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.put "/sequences/123456789012", {}, done it "should return a 404 Not Found", -> assert.equal 404, Helper.getStatus() describe "with a valid resource ID", -> beforeEach (done) -> params = url: "http://new.com" name: "PI:NAME:<NAME>END_PI name" Helper.put "/sequences/4ed2b809d7446b9a0e000014", params, done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return the correct body", -> data = Helper.getJSON() assert.equal "http://new.com", data.url assert.equal "New name", data.name describe "DELETE /sequences/:id", -> describe "with an invalid resource ID", -> beforeEach (done) -> Helper.delete "/sequences/123456789012", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of zero", -> data = Helper.getJSON() assert.equal 0, data.deleted describe "with a valid resource ID", -> beforeEach (done) -> Helper.fixture sequence: [@sequence], -> Helper.delete "/sequences/4ed2b809d7446b9a0e000014", done it "should return a 200", -> assert.equal 200, Helper.getStatus() it "should return a deleted count of one", -> data = Helper.getJSON() assert.equal 1, data.deleted
[ { "context": "ntent` or `bullet` class as appropriate.\n# @author Douglas Armstrong\nclass c3.Legend extends c3.Base\n @version: 0.2", "end": 793, "score": 0.9998372793197632, "start": 776, "tag": "NAME", "value": "Douglas Armstrong" }, { "context": "rts\n# @todo Support for decimated layers\n# @author Douglas Armstrong\nclass c3.Legend.PlotLegend extends c3.Legend\n ", "end": 7112, "score": 0.9998399019241333, "start": 7095, "tag": "NAME", "value": "Douglas Armstrong" } ]
js/c3-legend.coffee
jordalgo/chartcollection
29
# C3 Visualization Library # Legends ################################################################### # Legend ################################################################### # A Legend to display a list of items. # # It is important to set `item_options.text` or `item_options.html` to define how to # display each element in the legend. By default, the data elements will be converted to strings # and displayed as raw text. However, you will likely want to set a different accessor callback. # # ## Styling # The list is created as a `ul` element. The `hoverable` class is applied if appropriate. # The `li` elements get the `parent` class if they have children. # `li` elements have spans with either the `content` or `bullet` class as appropriate. # @author Douglas Armstrong class c3.Legend extends c3.Base @version: 0.2 type: 'legend' # [Array] An array of data elements for the legend to display data: [] # [Function] A callback used to determine a unique identification for each data element. # This is useful, for example, with animations when the dataset changes. key: undefined # [Function] A callback used to determine if a data element in the `data` array should be displayed. # It is passed with a data element as a parameter and should return `true` or `false`. # By default, legend items with no text or html defined will be omitted. filter: undefined # [Boolean, Function] Set to false to disable nested legend items. # Set to a function to return an array of nested items based on a data element in `data`. # By default it will treat `data` elements that are arrays as nested items. nest: undefined # [Function] A callback used to uniquely identify nested legend items. nest_key: undefined # [Boolean] enables _hoverable_ behaviour for the legend such as highlighting when the # mouse hovers or with a touch event. hoverable: true # [{c3.Selection.Options}] Options for the legend `ul` as a whole list_options: undefined # [{c3.Selection.Options}] Options to set the **styles** and **events** for the `li` items in the list. list_item_options: undefined # [{c3.Selection.Options}] Options to set the **text**, **html**, and other **styles** and # **events** for the content span for items in the list. # By default it will display data elements by converting them to a string. item_options: undefined # [Function] A callback to get a {c3.Selection.Options} object for the content span # based on a datum as an input parameter item_option: undefined # [{c3.Selection.Options}] Options for _nested_ `li` list items. # These will default to `list_item_options` unless specified. nested_list_item_options: undefined # [{c3.Selection.Options}] Options for _nested_ content spans for list items. # These will default to `item_options` unless specified. nested_item_options: undefined # [Boolean, {c3.Selection.Options}] Set to `false` to disable **bullets** for legend items. # Otherwise it is the {c3.Selection.Options options} to set the **text**, **html**, or other # options for the list item bullets. bullet_options: undefined # [Boolean, {c3.Selection.Options}] Options for **bullets** of _nested_ list items. # This will default to `bullet_options` unless specified. nested_bullet_options: undefined _init: => # Default Options # * Legend items are the data elements converted to text # * Arrays represent nested items # * Items with no name are not displayed. @nest ?= (d)-> if Array.isArray(d) then d else [] @item_options ?= {} if not @item_option? @item_options.text ?= (d)-> if Array.isArray(d) then "#{d.length} items" else d @filter ?= (d)=> @item_options.html?(d) ? @item_options.html ? @item_options.text?(d) ? @item_options.text @nested_list_item_options ?= @list_item_options @nested_item_options ?= @item_options @bullet_options ?= {} @bullet_options.text ?= "•" @nested_bullet_options ?= @bullet_options # Create the Legend List @list = c3.select(d3.select(@anchor),'ul').singleton() _update: => # Pull the specified data from the input data array # NOTE: This is done before we temporarily delete the text/html options! @current_data = if @filter then (datum for datum,i in @data when @filter(datum,i)) else @data # Set overall list options @list.options(@list_options).update() # Create the Legend List Items @list_items = @list.select('ul:not(.child) > li').bind @current_data, @key @list_items.options(@list_item_options).update() @items = @list_items.inherit('span.content').options(@item_options, @item_option).update() # Create Bullets if @bullet_options @bullets = @list_items.inherit('ul:not(.child) > li > span.bullet',true,true) @bullets.options(@bullet_options).update() # Handle nested legend items if @nest @nested_items = @list_items.inherit('ul.child').select('li').bind @nest, @nest_key @nested_items.options(@nested_list_item_options).update() @nested_items.inherit('span.content').options(@nested_item_options).update() # Nested Bullets if @nested_bullet_options @nested_bullets = @nested_items.inherit('span.bullet',true,true) @nested_bullets.options(@nested_bullet_options).update() # Give any list items that have children the class `parent` @list_items.select('ul > li').all.each -> d3.select(this).node().parentNode.parentNode.classList.add('parent') _style: (style_new)=> @list.style().all.classed 'c3': true 'legend': true 'hoverable': @hoverable @list_items.style(style_new) @items.style(style_new) @nested_items?.style(style_new) @bullets?.style(style_new) @nested_bullets?.style(style_new) ################################################################### # Chart Plot Legend ################################################################### # A type of {c3.Legend C3 Legend} that is linked with a {c3.Plot C3 Chart Plot}. # It will display each {c3.Plot.Layer layer} in the plot as a legend items. # For stacked layers, each {c3.Plot.Layer.Stackable.Stack stack} will be a nested item. # The names in the legend will be based on the `name` attribute of the layers and stacks. # If the `name` is `false`, then the layer will not be displayed. # # The legend is linked with the plot, so hovering over the legend items will highlight the # cooresponding data in the plot. The functionality leverages the base {c3.Legend legend} and # can be further customized or adjusted by the user. # # @see c3.Legend # @see c3.Plot # @todo Support for swimlane layer types # @todo Create a Legend type for Pie charts # @todo Support for decimated layers # @author Douglas Armstrong class c3.Legend.PlotLegend extends c3.Legend @version: 0.1 type: 'plot_legend' # [{c3.Plot}] Plot to link with this legend plot: undefined # [Boolean] Invert the order of the layers in the legend. # * `false` - Layers on top are at the top of the legend. # * `true` - Layers on top are at the bottom of the legend. invert_layers: false # [Boolean] By default, the layer and stack names will display as raw text. If you would like # HTML tags in the name string to render as HTML, then enable this option. Please be careful of # user-provided strings and security. html_names: false # [Number] When hovering over an item the other layers/stacks in the plot will fade to this # percentage of their original opacity. hover_fade: 0.2 # [Number] The duration in milliseconds that animations should take, such as stacked elements # floating down to the bottom of the chart. duration: 750 _init: => if not @plot? then throw Error "Plot legend must have a plot option refering to a c3.Plot." if @plot not instanceof c3.Plot then throw Error "Plot option must reference a c3.Plot type object." if not @plot.rendered then throw Error "plot_legend's linked plot should be rendered before rendering the legend." # Setup default data to refer to the layers and stacks in a C3 plot @key ?= (layer)-> layer.uid @nest ?= (layer)-> layer.stacks ? [] @list_item_options ?= {} @item_options ?= {} @nested_list_item_options ?= {} @nested_item_options ?= {} @nest_key ?= (stack)-> stack.key ? stack.name # Callbacks to get the layer and stack names and titles layer_title = (layer,i)=> layer.options?.title ? @plot.layer_options?.title?(layer,i) ? @plot.layer_options?.title ? layer.name layer_name = (layer,i)-> layer.name ? layer_title(layer,i) ? layer.type stack_title = (stack, stack_idx, layer_idx)=> layer = @plot.layers[layer_idx] stack.options?.title ? layer?.stack_options?.title?(stack) ? layer?.stack_options?.title ? stack.name stack_name = (stack, stack_idx, layer_idx)-> stack.name ? stack_title(stack, stack_idx, layer_idx) ? "stack" # Setup the legend names and titles if @html_names @item_options.html ?= layer_name @nested_item_options.html ?= stack_name else @item_options.text ?= layer_name @nested_item_options.text ?= stack_name @item_options.title ?= layer_title @nested_item_options.title ?= stack_title if @hoverable # Highlight the layers in the chart when hovering over the legend. @list_item_options.events ?= {} @list_item_options.events.mouseenter ?= (hover_layer, hover_layer_idx)=> # Fade other layers fade = @hover_fade @plot.layers_selection.all.style 'opacity', (layer,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if layer isnt hover_layer then fade * old_opacity else old_opacity @trigger 'layer_mouseenter', hover_layer, hover_layer_idx @list_item_options.events.mouseleave ?= (hover_layer, hover_layer_idx)=> # Restore all layers to their proper opacity @plot.layers_selection.all.style 'opacity', (layer,i)=> layer.options?.styles?.opacity?(layer,i) ? layer.options?.styles?.opacity ? layer.styles?.opacity?(layer,i) ? layer.styles?.opacity ? 1 @trigger 'layer_mouseleave', hover_layer, hover_layer_idx # Highlight the stacks in the chart layer when hovering over nested items @nested_list_item_options.events ?= {} @nested_list_item_options.events.mouseenter ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Fade other stacks fade = @hover_fade layer.groups.all.style 'opacity', (stack,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if stack isnt hover_stack then fade * old_opacity else old_opacity # Animate stacked bar chart stacks to the baseline for comparison duration = @duration layer.rects?.all.filter((d,i,stack_idx)->stack_idx is hover_stack_idx) .transition().duration(duration).attr 'transform', -> rect = d3.select(this) "translate(0,#{layer.v.range()[0]-rect.attr('y')-rect.attr('height')})" # Animate stacked line/area chart stacks to the baseline if layer.path_generator? # Cache the current paths for the stacks in the layer @layer_paths_cached = cache = [] layer.paths?.all.each (path, path_idx)-> cache[path_idx] = d3.select(this).attr 'd' layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .transition().duration(duration).attr 'd', (stack, stack_idx)-> layer.path_generator .x (d,i)-> (layer.chart.orig_h ? layer.h) stack.values[i].x # TODO Hack, cleanup with migration to zoom as a mix-in .y (d,i)-> layer.v stack.values[i].y .y0 layer.v.range()[0] layer.path_generator(stack.current_data) @trigger 'stack_mouseenter', hover_stack, hover_stack_idx, hover_layer_idx @nested_list_item_options.events.mouseleave ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Restore all stacks to their proper opacity layer.groups.all.style 'opacity', (stack,i)=> layer.stack_options?.styles?.opacity?(stack,i) ? layer.stack_options?.styles?.opacity ? 1 # Restore stacked bar charts that were floated to the baseline layer.rects?.all.transition().duration(@duration).attr 'transform', '' # Restore stacked line/area charts that were floated to the baseline layer.paths?.all.interrupt() if layer.paths? # If we have the paths for the stacks in the layer cached, then # restore them cheaply. Otherwise, recompute the paths based on the # current data. if @layer_paths_cached? layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .attr 'd', @layer_paths_cached[hover_stack_idx] else layer.draw() @trigger 'stack_mouseleave', hover_stack, hover_stack_idx, hover_layer_idx super @list.all.classed 'plot_legend', true # When the linked plot's style is updated, update the legend styles @plot.on 'restyle.legend', @restyle _update: => # Clear any cached layer state. delete @layer_paths_caches # Create empty bullets to be populated with SVG glyphs. delete @bullet_options.text delete @bullet_options.html # Setup default data to refer to the layers in a C3 plot @data = @plot.layers super if @invert_layers @list_items.all.order() else @list_items.all.sort((a,b)=> @plot.layers.indexOf(a) < @plot.layers.indexOf(b)) # Create an SVG glyph for each layer or stack. Bind it to an example "node" in the # plot's actual layer that will represent what styles we should copy for the legend. size = 16 generate_glyph = (svg, layer, stack_idx=0)-> # Depending on the layer type create an SVG glyph. # Relying on the layer type may not be the cleanest approach. Might be better to # have the layer implementations themselves provide a glyph.. if layer instanceof c3.Layer.Line node = layer.paths.all[0][stack_idx] svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Horizontal node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Vertical node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:size/2, y1:0, x2:size/2, y2:size } else if layer instanceof c3.Layer.Scatter node = layer.circles.all.node() svg.select('circle').singleton(node).position { cx:size/2, cy:size/2, r:size/4 } else # Area, Bar, Region, & default (including swimlanes for now) node = layer.paths?.all[0][stack_idx] ? layer.rects?.all[stack_idx][0] ? layer.groups?.all.node() ? layer.g.node() svg.select('rect').singleton(node).position x: size*0.1 y: size*0.1 height: size*0.8 width: size*0.8 rx: size/5 ry: size/5 # Create SVG glyphs for legend items @bullets_svg = @bullets.inherit('svg') @bullets_svg.all.attr height: size width: size @bullets_svg.all.each (layer)-> if not layer.stacks? generate_glyph c3.select(d3.select(this)), layer else d3.select(this.parentNode).remove() # Create glyphs for nested legend items. @nested_bullets_svg = @nested_bullets.inherit('svg') @nested_bullets_svg.all.attr height: size width: size plot = @plot @nested_bullets_svg.all.each (stack, stack_idx, layer_idx)-> layer = plot.layers[layer_idx] generate_glyph c3.select(d3.select(this)), layer, stack_idx _style: => super # Style the glyphs in the legend to match the styles of their cooresponding # nodes in the plot. @list.all.selectAll('li > .bullet > svg > *').each (node)-> if node glyph = d3.select(this) src_styles = getComputedStyle(node) for style in ['stroke', 'stroke-dasharray', 'stroke-width', 'fill', 'opacity'] glyph.style style, src_styles.getPropertyValue(style)
43663
# C3 Visualization Library # Legends ################################################################### # Legend ################################################################### # A Legend to display a list of items. # # It is important to set `item_options.text` or `item_options.html` to define how to # display each element in the legend. By default, the data elements will be converted to strings # and displayed as raw text. However, you will likely want to set a different accessor callback. # # ## Styling # The list is created as a `ul` element. The `hoverable` class is applied if appropriate. # The `li` elements get the `parent` class if they have children. # `li` elements have spans with either the `content` or `bullet` class as appropriate. # @author <NAME> class c3.Legend extends c3.Base @version: 0.2 type: 'legend' # [Array] An array of data elements for the legend to display data: [] # [Function] A callback used to determine a unique identification for each data element. # This is useful, for example, with animations when the dataset changes. key: undefined # [Function] A callback used to determine if a data element in the `data` array should be displayed. # It is passed with a data element as a parameter and should return `true` or `false`. # By default, legend items with no text or html defined will be omitted. filter: undefined # [Boolean, Function] Set to false to disable nested legend items. # Set to a function to return an array of nested items based on a data element in `data`. # By default it will treat `data` elements that are arrays as nested items. nest: undefined # [Function] A callback used to uniquely identify nested legend items. nest_key: undefined # [Boolean] enables _hoverable_ behaviour for the legend such as highlighting when the # mouse hovers or with a touch event. hoverable: true # [{c3.Selection.Options}] Options for the legend `ul` as a whole list_options: undefined # [{c3.Selection.Options}] Options to set the **styles** and **events** for the `li` items in the list. list_item_options: undefined # [{c3.Selection.Options}] Options to set the **text**, **html**, and other **styles** and # **events** for the content span for items in the list. # By default it will display data elements by converting them to a string. item_options: undefined # [Function] A callback to get a {c3.Selection.Options} object for the content span # based on a datum as an input parameter item_option: undefined # [{c3.Selection.Options}] Options for _nested_ `li` list items. # These will default to `list_item_options` unless specified. nested_list_item_options: undefined # [{c3.Selection.Options}] Options for _nested_ content spans for list items. # These will default to `item_options` unless specified. nested_item_options: undefined # [Boolean, {c3.Selection.Options}] Set to `false` to disable **bullets** for legend items. # Otherwise it is the {c3.Selection.Options options} to set the **text**, **html**, or other # options for the list item bullets. bullet_options: undefined # [Boolean, {c3.Selection.Options}] Options for **bullets** of _nested_ list items. # This will default to `bullet_options` unless specified. nested_bullet_options: undefined _init: => # Default Options # * Legend items are the data elements converted to text # * Arrays represent nested items # * Items with no name are not displayed. @nest ?= (d)-> if Array.isArray(d) then d else [] @item_options ?= {} if not @item_option? @item_options.text ?= (d)-> if Array.isArray(d) then "#{d.length} items" else d @filter ?= (d)=> @item_options.html?(d) ? @item_options.html ? @item_options.text?(d) ? @item_options.text @nested_list_item_options ?= @list_item_options @nested_item_options ?= @item_options @bullet_options ?= {} @bullet_options.text ?= "•" @nested_bullet_options ?= @bullet_options # Create the Legend List @list = c3.select(d3.select(@anchor),'ul').singleton() _update: => # Pull the specified data from the input data array # NOTE: This is done before we temporarily delete the text/html options! @current_data = if @filter then (datum for datum,i in @data when @filter(datum,i)) else @data # Set overall list options @list.options(@list_options).update() # Create the Legend List Items @list_items = @list.select('ul:not(.child) > li').bind @current_data, @key @list_items.options(@list_item_options).update() @items = @list_items.inherit('span.content').options(@item_options, @item_option).update() # Create Bullets if @bullet_options @bullets = @list_items.inherit('ul:not(.child) > li > span.bullet',true,true) @bullets.options(@bullet_options).update() # Handle nested legend items if @nest @nested_items = @list_items.inherit('ul.child').select('li').bind @nest, @nest_key @nested_items.options(@nested_list_item_options).update() @nested_items.inherit('span.content').options(@nested_item_options).update() # Nested Bullets if @nested_bullet_options @nested_bullets = @nested_items.inherit('span.bullet',true,true) @nested_bullets.options(@nested_bullet_options).update() # Give any list items that have children the class `parent` @list_items.select('ul > li').all.each -> d3.select(this).node().parentNode.parentNode.classList.add('parent') _style: (style_new)=> @list.style().all.classed 'c3': true 'legend': true 'hoverable': @hoverable @list_items.style(style_new) @items.style(style_new) @nested_items?.style(style_new) @bullets?.style(style_new) @nested_bullets?.style(style_new) ################################################################### # Chart Plot Legend ################################################################### # A type of {c3.Legend C3 Legend} that is linked with a {c3.Plot C3 Chart Plot}. # It will display each {c3.Plot.Layer layer} in the plot as a legend items. # For stacked layers, each {c3.Plot.Layer.Stackable.Stack stack} will be a nested item. # The names in the legend will be based on the `name` attribute of the layers and stacks. # If the `name` is `false`, then the layer will not be displayed. # # The legend is linked with the plot, so hovering over the legend items will highlight the # cooresponding data in the plot. The functionality leverages the base {c3.Legend legend} and # can be further customized or adjusted by the user. # # @see c3.Legend # @see c3.Plot # @todo Support for swimlane layer types # @todo Create a Legend type for Pie charts # @todo Support for decimated layers # @author <NAME> class c3.Legend.PlotLegend extends c3.Legend @version: 0.1 type: 'plot_legend' # [{c3.Plot}] Plot to link with this legend plot: undefined # [Boolean] Invert the order of the layers in the legend. # * `false` - Layers on top are at the top of the legend. # * `true` - Layers on top are at the bottom of the legend. invert_layers: false # [Boolean] By default, the layer and stack names will display as raw text. If you would like # HTML tags in the name string to render as HTML, then enable this option. Please be careful of # user-provided strings and security. html_names: false # [Number] When hovering over an item the other layers/stacks in the plot will fade to this # percentage of their original opacity. hover_fade: 0.2 # [Number] The duration in milliseconds that animations should take, such as stacked elements # floating down to the bottom of the chart. duration: 750 _init: => if not @plot? then throw Error "Plot legend must have a plot option refering to a c3.Plot." if @plot not instanceof c3.Plot then throw Error "Plot option must reference a c3.Plot type object." if not @plot.rendered then throw Error "plot_legend's linked plot should be rendered before rendering the legend." # Setup default data to refer to the layers and stacks in a C3 plot @key ?= (layer)-> layer.uid @nest ?= (layer)-> layer.stacks ? [] @list_item_options ?= {} @item_options ?= {} @nested_list_item_options ?= {} @nested_item_options ?= {} @nest_key ?= (stack)-> stack.key ? stack.name # Callbacks to get the layer and stack names and titles layer_title = (layer,i)=> layer.options?.title ? @plot.layer_options?.title?(layer,i) ? @plot.layer_options?.title ? layer.name layer_name = (layer,i)-> layer.name ? layer_title(layer,i) ? layer.type stack_title = (stack, stack_idx, layer_idx)=> layer = @plot.layers[layer_idx] stack.options?.title ? layer?.stack_options?.title?(stack) ? layer?.stack_options?.title ? stack.name stack_name = (stack, stack_idx, layer_idx)-> stack.name ? stack_title(stack, stack_idx, layer_idx) ? "stack" # Setup the legend names and titles if @html_names @item_options.html ?= layer_name @nested_item_options.html ?= stack_name else @item_options.text ?= layer_name @nested_item_options.text ?= stack_name @item_options.title ?= layer_title @nested_item_options.title ?= stack_title if @hoverable # Highlight the layers in the chart when hovering over the legend. @list_item_options.events ?= {} @list_item_options.events.mouseenter ?= (hover_layer, hover_layer_idx)=> # Fade other layers fade = @hover_fade @plot.layers_selection.all.style 'opacity', (layer,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if layer isnt hover_layer then fade * old_opacity else old_opacity @trigger 'layer_mouseenter', hover_layer, hover_layer_idx @list_item_options.events.mouseleave ?= (hover_layer, hover_layer_idx)=> # Restore all layers to their proper opacity @plot.layers_selection.all.style 'opacity', (layer,i)=> layer.options?.styles?.opacity?(layer,i) ? layer.options?.styles?.opacity ? layer.styles?.opacity?(layer,i) ? layer.styles?.opacity ? 1 @trigger 'layer_mouseleave', hover_layer, hover_layer_idx # Highlight the stacks in the chart layer when hovering over nested items @nested_list_item_options.events ?= {} @nested_list_item_options.events.mouseenter ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Fade other stacks fade = @hover_fade layer.groups.all.style 'opacity', (stack,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if stack isnt hover_stack then fade * old_opacity else old_opacity # Animate stacked bar chart stacks to the baseline for comparison duration = @duration layer.rects?.all.filter((d,i,stack_idx)->stack_idx is hover_stack_idx) .transition().duration(duration).attr 'transform', -> rect = d3.select(this) "translate(0,#{layer.v.range()[0]-rect.attr('y')-rect.attr('height')})" # Animate stacked line/area chart stacks to the baseline if layer.path_generator? # Cache the current paths for the stacks in the layer @layer_paths_cached = cache = [] layer.paths?.all.each (path, path_idx)-> cache[path_idx] = d3.select(this).attr 'd' layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .transition().duration(duration).attr 'd', (stack, stack_idx)-> layer.path_generator .x (d,i)-> (layer.chart.orig_h ? layer.h) stack.values[i].x # TODO Hack, cleanup with migration to zoom as a mix-in .y (d,i)-> layer.v stack.values[i].y .y0 layer.v.range()[0] layer.path_generator(stack.current_data) @trigger 'stack_mouseenter', hover_stack, hover_stack_idx, hover_layer_idx @nested_list_item_options.events.mouseleave ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Restore all stacks to their proper opacity layer.groups.all.style 'opacity', (stack,i)=> layer.stack_options?.styles?.opacity?(stack,i) ? layer.stack_options?.styles?.opacity ? 1 # Restore stacked bar charts that were floated to the baseline layer.rects?.all.transition().duration(@duration).attr 'transform', '' # Restore stacked line/area charts that were floated to the baseline layer.paths?.all.interrupt() if layer.paths? # If we have the paths for the stacks in the layer cached, then # restore them cheaply. Otherwise, recompute the paths based on the # current data. if @layer_paths_cached? layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .attr 'd', @layer_paths_cached[hover_stack_idx] else layer.draw() @trigger 'stack_mouseleave', hover_stack, hover_stack_idx, hover_layer_idx super @list.all.classed 'plot_legend', true # When the linked plot's style is updated, update the legend styles @plot.on 'restyle.legend', @restyle _update: => # Clear any cached layer state. delete @layer_paths_caches # Create empty bullets to be populated with SVG glyphs. delete @bullet_options.text delete @bullet_options.html # Setup default data to refer to the layers in a C3 plot @data = @plot.layers super if @invert_layers @list_items.all.order() else @list_items.all.sort((a,b)=> @plot.layers.indexOf(a) < @plot.layers.indexOf(b)) # Create an SVG glyph for each layer or stack. Bind it to an example "node" in the # plot's actual layer that will represent what styles we should copy for the legend. size = 16 generate_glyph = (svg, layer, stack_idx=0)-> # Depending on the layer type create an SVG glyph. # Relying on the layer type may not be the cleanest approach. Might be better to # have the layer implementations themselves provide a glyph.. if layer instanceof c3.Layer.Line node = layer.paths.all[0][stack_idx] svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Horizontal node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Vertical node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:size/2, y1:0, x2:size/2, y2:size } else if layer instanceof c3.Layer.Scatter node = layer.circles.all.node() svg.select('circle').singleton(node).position { cx:size/2, cy:size/2, r:size/4 } else # Area, Bar, Region, & default (including swimlanes for now) node = layer.paths?.all[0][stack_idx] ? layer.rects?.all[stack_idx][0] ? layer.groups?.all.node() ? layer.g.node() svg.select('rect').singleton(node).position x: size*0.1 y: size*0.1 height: size*0.8 width: size*0.8 rx: size/5 ry: size/5 # Create SVG glyphs for legend items @bullets_svg = @bullets.inherit('svg') @bullets_svg.all.attr height: size width: size @bullets_svg.all.each (layer)-> if not layer.stacks? generate_glyph c3.select(d3.select(this)), layer else d3.select(this.parentNode).remove() # Create glyphs for nested legend items. @nested_bullets_svg = @nested_bullets.inherit('svg') @nested_bullets_svg.all.attr height: size width: size plot = @plot @nested_bullets_svg.all.each (stack, stack_idx, layer_idx)-> layer = plot.layers[layer_idx] generate_glyph c3.select(d3.select(this)), layer, stack_idx _style: => super # Style the glyphs in the legend to match the styles of their cooresponding # nodes in the plot. @list.all.selectAll('li > .bullet > svg > *').each (node)-> if node glyph = d3.select(this) src_styles = getComputedStyle(node) for style in ['stroke', 'stroke-dasharray', 'stroke-width', 'fill', 'opacity'] glyph.style style, src_styles.getPropertyValue(style)
true
# C3 Visualization Library # Legends ################################################################### # Legend ################################################################### # A Legend to display a list of items. # # It is important to set `item_options.text` or `item_options.html` to define how to # display each element in the legend. By default, the data elements will be converted to strings # and displayed as raw text. However, you will likely want to set a different accessor callback. # # ## Styling # The list is created as a `ul` element. The `hoverable` class is applied if appropriate. # The `li` elements get the `parent` class if they have children. # `li` elements have spans with either the `content` or `bullet` class as appropriate. # @author PI:NAME:<NAME>END_PI class c3.Legend extends c3.Base @version: 0.2 type: 'legend' # [Array] An array of data elements for the legend to display data: [] # [Function] A callback used to determine a unique identification for each data element. # This is useful, for example, with animations when the dataset changes. key: undefined # [Function] A callback used to determine if a data element in the `data` array should be displayed. # It is passed with a data element as a parameter and should return `true` or `false`. # By default, legend items with no text or html defined will be omitted. filter: undefined # [Boolean, Function] Set to false to disable nested legend items. # Set to a function to return an array of nested items based on a data element in `data`. # By default it will treat `data` elements that are arrays as nested items. nest: undefined # [Function] A callback used to uniquely identify nested legend items. nest_key: undefined # [Boolean] enables _hoverable_ behaviour for the legend such as highlighting when the # mouse hovers or with a touch event. hoverable: true # [{c3.Selection.Options}] Options for the legend `ul` as a whole list_options: undefined # [{c3.Selection.Options}] Options to set the **styles** and **events** for the `li` items in the list. list_item_options: undefined # [{c3.Selection.Options}] Options to set the **text**, **html**, and other **styles** and # **events** for the content span for items in the list. # By default it will display data elements by converting them to a string. item_options: undefined # [Function] A callback to get a {c3.Selection.Options} object for the content span # based on a datum as an input parameter item_option: undefined # [{c3.Selection.Options}] Options for _nested_ `li` list items. # These will default to `list_item_options` unless specified. nested_list_item_options: undefined # [{c3.Selection.Options}] Options for _nested_ content spans for list items. # These will default to `item_options` unless specified. nested_item_options: undefined # [Boolean, {c3.Selection.Options}] Set to `false` to disable **bullets** for legend items. # Otherwise it is the {c3.Selection.Options options} to set the **text**, **html**, or other # options for the list item bullets. bullet_options: undefined # [Boolean, {c3.Selection.Options}] Options for **bullets** of _nested_ list items. # This will default to `bullet_options` unless specified. nested_bullet_options: undefined _init: => # Default Options # * Legend items are the data elements converted to text # * Arrays represent nested items # * Items with no name are not displayed. @nest ?= (d)-> if Array.isArray(d) then d else [] @item_options ?= {} if not @item_option? @item_options.text ?= (d)-> if Array.isArray(d) then "#{d.length} items" else d @filter ?= (d)=> @item_options.html?(d) ? @item_options.html ? @item_options.text?(d) ? @item_options.text @nested_list_item_options ?= @list_item_options @nested_item_options ?= @item_options @bullet_options ?= {} @bullet_options.text ?= "•" @nested_bullet_options ?= @bullet_options # Create the Legend List @list = c3.select(d3.select(@anchor),'ul').singleton() _update: => # Pull the specified data from the input data array # NOTE: This is done before we temporarily delete the text/html options! @current_data = if @filter then (datum for datum,i in @data when @filter(datum,i)) else @data # Set overall list options @list.options(@list_options).update() # Create the Legend List Items @list_items = @list.select('ul:not(.child) > li').bind @current_data, @key @list_items.options(@list_item_options).update() @items = @list_items.inherit('span.content').options(@item_options, @item_option).update() # Create Bullets if @bullet_options @bullets = @list_items.inherit('ul:not(.child) > li > span.bullet',true,true) @bullets.options(@bullet_options).update() # Handle nested legend items if @nest @nested_items = @list_items.inherit('ul.child').select('li').bind @nest, @nest_key @nested_items.options(@nested_list_item_options).update() @nested_items.inherit('span.content').options(@nested_item_options).update() # Nested Bullets if @nested_bullet_options @nested_bullets = @nested_items.inherit('span.bullet',true,true) @nested_bullets.options(@nested_bullet_options).update() # Give any list items that have children the class `parent` @list_items.select('ul > li').all.each -> d3.select(this).node().parentNode.parentNode.classList.add('parent') _style: (style_new)=> @list.style().all.classed 'c3': true 'legend': true 'hoverable': @hoverable @list_items.style(style_new) @items.style(style_new) @nested_items?.style(style_new) @bullets?.style(style_new) @nested_bullets?.style(style_new) ################################################################### # Chart Plot Legend ################################################################### # A type of {c3.Legend C3 Legend} that is linked with a {c3.Plot C3 Chart Plot}. # It will display each {c3.Plot.Layer layer} in the plot as a legend items. # For stacked layers, each {c3.Plot.Layer.Stackable.Stack stack} will be a nested item. # The names in the legend will be based on the `name` attribute of the layers and stacks. # If the `name` is `false`, then the layer will not be displayed. # # The legend is linked with the plot, so hovering over the legend items will highlight the # cooresponding data in the plot. The functionality leverages the base {c3.Legend legend} and # can be further customized or adjusted by the user. # # @see c3.Legend # @see c3.Plot # @todo Support for swimlane layer types # @todo Create a Legend type for Pie charts # @todo Support for decimated layers # @author PI:NAME:<NAME>END_PI class c3.Legend.PlotLegend extends c3.Legend @version: 0.1 type: 'plot_legend' # [{c3.Plot}] Plot to link with this legend plot: undefined # [Boolean] Invert the order of the layers in the legend. # * `false` - Layers on top are at the top of the legend. # * `true` - Layers on top are at the bottom of the legend. invert_layers: false # [Boolean] By default, the layer and stack names will display as raw text. If you would like # HTML tags in the name string to render as HTML, then enable this option. Please be careful of # user-provided strings and security. html_names: false # [Number] When hovering over an item the other layers/stacks in the plot will fade to this # percentage of their original opacity. hover_fade: 0.2 # [Number] The duration in milliseconds that animations should take, such as stacked elements # floating down to the bottom of the chart. duration: 750 _init: => if not @plot? then throw Error "Plot legend must have a plot option refering to a c3.Plot." if @plot not instanceof c3.Plot then throw Error "Plot option must reference a c3.Plot type object." if not @plot.rendered then throw Error "plot_legend's linked plot should be rendered before rendering the legend." # Setup default data to refer to the layers and stacks in a C3 plot @key ?= (layer)-> layer.uid @nest ?= (layer)-> layer.stacks ? [] @list_item_options ?= {} @item_options ?= {} @nested_list_item_options ?= {} @nested_item_options ?= {} @nest_key ?= (stack)-> stack.key ? stack.name # Callbacks to get the layer and stack names and titles layer_title = (layer,i)=> layer.options?.title ? @plot.layer_options?.title?(layer,i) ? @plot.layer_options?.title ? layer.name layer_name = (layer,i)-> layer.name ? layer_title(layer,i) ? layer.type stack_title = (stack, stack_idx, layer_idx)=> layer = @plot.layers[layer_idx] stack.options?.title ? layer?.stack_options?.title?(stack) ? layer?.stack_options?.title ? stack.name stack_name = (stack, stack_idx, layer_idx)-> stack.name ? stack_title(stack, stack_idx, layer_idx) ? "stack" # Setup the legend names and titles if @html_names @item_options.html ?= layer_name @nested_item_options.html ?= stack_name else @item_options.text ?= layer_name @nested_item_options.text ?= stack_name @item_options.title ?= layer_title @nested_item_options.title ?= stack_title if @hoverable # Highlight the layers in the chart when hovering over the legend. @list_item_options.events ?= {} @list_item_options.events.mouseenter ?= (hover_layer, hover_layer_idx)=> # Fade other layers fade = @hover_fade @plot.layers_selection.all.style 'opacity', (layer,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if layer isnt hover_layer then fade * old_opacity else old_opacity @trigger 'layer_mouseenter', hover_layer, hover_layer_idx @list_item_options.events.mouseleave ?= (hover_layer, hover_layer_idx)=> # Restore all layers to their proper opacity @plot.layers_selection.all.style 'opacity', (layer,i)=> layer.options?.styles?.opacity?(layer,i) ? layer.options?.styles?.opacity ? layer.styles?.opacity?(layer,i) ? layer.styles?.opacity ? 1 @trigger 'layer_mouseleave', hover_layer, hover_layer_idx # Highlight the stacks in the chart layer when hovering over nested items @nested_list_item_options.events ?= {} @nested_list_item_options.events.mouseenter ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Fade other stacks fade = @hover_fade layer.groups.all.style 'opacity', (stack,i)-> old_opacity = d3.select(this).style('opacity') ? 1 if stack isnt hover_stack then fade * old_opacity else old_opacity # Animate stacked bar chart stacks to the baseline for comparison duration = @duration layer.rects?.all.filter((d,i,stack_idx)->stack_idx is hover_stack_idx) .transition().duration(duration).attr 'transform', -> rect = d3.select(this) "translate(0,#{layer.v.range()[0]-rect.attr('y')-rect.attr('height')})" # Animate stacked line/area chart stacks to the baseline if layer.path_generator? # Cache the current paths for the stacks in the layer @layer_paths_cached = cache = [] layer.paths?.all.each (path, path_idx)-> cache[path_idx] = d3.select(this).attr 'd' layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .transition().duration(duration).attr 'd', (stack, stack_idx)-> layer.path_generator .x (d,i)-> (layer.chart.orig_h ? layer.h) stack.values[i].x # TODO Hack, cleanup with migration to zoom as a mix-in .y (d,i)-> layer.v stack.values[i].y .y0 layer.v.range()[0] layer.path_generator(stack.current_data) @trigger 'stack_mouseenter', hover_stack, hover_stack_idx, hover_layer_idx @nested_list_item_options.events.mouseleave ?= (hover_stack, hover_stack_idx, hover_layer_idx)=> layer = @plot.layers[hover_layer_idx] # Restore all stacks to their proper opacity layer.groups.all.style 'opacity', (stack,i)=> layer.stack_options?.styles?.opacity?(stack,i) ? layer.stack_options?.styles?.opacity ? 1 # Restore stacked bar charts that were floated to the baseline layer.rects?.all.transition().duration(@duration).attr 'transform', '' # Restore stacked line/area charts that were floated to the baseline layer.paths?.all.interrupt() if layer.paths? # If we have the paths for the stacks in the layer cached, then # restore them cheaply. Otherwise, recompute the paths based on the # current data. if @layer_paths_cached? layer.paths?.all.filter((stack,stack_idx)-> stack_idx is hover_stack_idx) .attr 'd', @layer_paths_cached[hover_stack_idx] else layer.draw() @trigger 'stack_mouseleave', hover_stack, hover_stack_idx, hover_layer_idx super @list.all.classed 'plot_legend', true # When the linked plot's style is updated, update the legend styles @plot.on 'restyle.legend', @restyle _update: => # Clear any cached layer state. delete @layer_paths_caches # Create empty bullets to be populated with SVG glyphs. delete @bullet_options.text delete @bullet_options.html # Setup default data to refer to the layers in a C3 plot @data = @plot.layers super if @invert_layers @list_items.all.order() else @list_items.all.sort((a,b)=> @plot.layers.indexOf(a) < @plot.layers.indexOf(b)) # Create an SVG glyph for each layer or stack. Bind it to an example "node" in the # plot's actual layer that will represent what styles we should copy for the legend. size = 16 generate_glyph = (svg, layer, stack_idx=0)-> # Depending on the layer type create an SVG glyph. # Relying on the layer type may not be the cleanest approach. Might be better to # have the layer implementations themselves provide a glyph.. if layer instanceof c3.Layer.Line node = layer.paths.all[0][stack_idx] svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Horizontal node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:0, y1:size/2, x2:size, y2:size/2 } else if layer instanceof c3.Layer.Line.Vertical node = layer.lines.all.node() svg.select('line').singleton(node).position { x1:size/2, y1:0, x2:size/2, y2:size } else if layer instanceof c3.Layer.Scatter node = layer.circles.all.node() svg.select('circle').singleton(node).position { cx:size/2, cy:size/2, r:size/4 } else # Area, Bar, Region, & default (including swimlanes for now) node = layer.paths?.all[0][stack_idx] ? layer.rects?.all[stack_idx][0] ? layer.groups?.all.node() ? layer.g.node() svg.select('rect').singleton(node).position x: size*0.1 y: size*0.1 height: size*0.8 width: size*0.8 rx: size/5 ry: size/5 # Create SVG glyphs for legend items @bullets_svg = @bullets.inherit('svg') @bullets_svg.all.attr height: size width: size @bullets_svg.all.each (layer)-> if not layer.stacks? generate_glyph c3.select(d3.select(this)), layer else d3.select(this.parentNode).remove() # Create glyphs for nested legend items. @nested_bullets_svg = @nested_bullets.inherit('svg') @nested_bullets_svg.all.attr height: size width: size plot = @plot @nested_bullets_svg.all.each (stack, stack_idx, layer_idx)-> layer = plot.layers[layer_idx] generate_glyph c3.select(d3.select(this)), layer, stack_idx _style: => super # Style the glyphs in the legend to match the styles of their cooresponding # nodes in the plot. @list.all.selectAll('li > .bullet > svg > *').each (node)-> if node glyph = d3.select(this) src_styles = getComputedStyle(node) for style in ['stroke', 'stroke-dasharray', 'stroke-width', 'fill', 'opacity'] glyph.style style, src_styles.getPropertyValue(style)
[ { "context": "# Copyright(c) 2015 Christopher Rueber <crueber@gmail.com>\n# MIT Licensed\n\nmodule.export", "end": 38, "score": 0.9998821020126343, "start": 20, "tag": "NAME", "value": "Christopher Rueber" }, { "context": "# Copyright(c) 2015 Christopher Rueber <crueber@gmail.com>\n# MIT Licensed\n\nmodule.exports = require './circ", "end": 57, "score": 0.9999338984489441, "start": 40, "tag": "EMAIL", "value": "crueber@gmail.com" } ]
src/index.coffee
crueber/SimpleCircuitBreaker
0
# Copyright(c) 2015 Christopher Rueber <crueber@gmail.com> # MIT Licensed module.exports = require './circuit-breaker'
145065
# Copyright(c) 2015 <NAME> <<EMAIL>> # MIT Licensed module.exports = require './circuit-breaker'
true
# Copyright(c) 2015 PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> # MIT Licensed module.exports = require './circuit-breaker'
[ { "context": "talog ->\n book (id : 'bk101'), ->\n author -> 'Gambardella, Matthew'\n title -> 'XML Developer\\'s Guide'\n genre ", "end": 72, "score": 0.9396416544914246, "start": 52, "tag": "NAME", "value": "Gambardella, Matthew" }, { "context": "h XML.'\n\n book (id : 'bk102'), ->\n author -> 'Ralls, Kim'\n title -> 'Midnight Rain'\n genre -> 'Fanta", "end": 365, "score": 0.9997650384902954, "start": 355, "tag": "NAME", "value": "Ralls, Kim" } ]
test/fixtures/xml.coffee
venkatperi/coffee-dsl
0
catalog -> book (id : 'bk101'), -> author -> 'Gambardella, Matthew' title -> 'XML Developer\'s Guide' genre -> 'Computer' price -> MSRP -> '44.95' current -> '39.95' date (type: 'publish'), -> '2000-10-01' description -> 'An in-depth look at creating applications with XML.' book (id : 'bk102'), -> author -> 'Ralls, Kim' title -> 'Midnight Rain' genre -> 'Fantasy' price -> '5.95' publish_date -> '2000-12-16' description -> 'A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.'
164903
catalog -> book (id : 'bk101'), -> author -> '<NAME>' title -> 'XML Developer\'s Guide' genre -> 'Computer' price -> MSRP -> '44.95' current -> '39.95' date (type: 'publish'), -> '2000-10-01' description -> 'An in-depth look at creating applications with XML.' book (id : 'bk102'), -> author -> '<NAME>' title -> 'Midnight Rain' genre -> 'Fantasy' price -> '5.95' publish_date -> '2000-12-16' description -> 'A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.'
true
catalog -> book (id : 'bk101'), -> author -> 'PI:NAME:<NAME>END_PI' title -> 'XML Developer\'s Guide' genre -> 'Computer' price -> MSRP -> '44.95' current -> '39.95' date (type: 'publish'), -> '2000-10-01' description -> 'An in-depth look at creating applications with XML.' book (id : 'bk102'), -> author -> 'PI:NAME:<NAME>END_PI' title -> 'Midnight Rain' genre -> 'Fantasy' price -> '5.95' publish_date -> '2000-12-16' description -> 'A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.'
[ { "context": "{leads} = enums\n\n storylet 'roxyStart',\n 'Roxy Malone, big-time gangster'\n '''\n There are thr", "end": 220, "score": 0.9928526878356934, "start": 209, "tag": "NAME", "value": "Roxy Malone" }, { "context": " everything else?\n Everything else belongs to Roxy Malone's gang.\n\n Roxy appeared during the war, alre", "end": 485, "score": 0.9223308563232422, "start": 474, "tag": "NAME", "value": "Roxy Malone" }, { "context": "rything else belongs to Roxy Malone's gang.\n\n Roxy appeared during the war, already leading a small ", "end": 505, "score": 0.962438702583313, "start": 501, "tag": "NAME", "value": "Roxy" }, { "context": "lready an accomplished sorceress in her own right. Roxy was a native of\n the new world. And one by o", "end": 861, "score": 0.6405339241027832, "start": 857, "tag": "NAME", "value": "Roxy" }, { "context": "city.\n\n So why is she concerning herself with Mrs. Brown? What does she have to gain from driving a\n ", "end": 1093, "score": 0.9820468425750732, "start": 1083, "tag": "NAME", "value": "Mrs. Brown" }, { "context": " the magic districts. It all adds up to one thing: Roxy must have\n moved her base of operations e", "end": 2155, "score": 0.7963919043540955, "start": 2154, "tag": "NAME", "value": "R" }, { "context": "n shakedown rates in various districts, you figure Roxy's hideout must be somewhere\n within an ar", "end": 2352, "score": 0.5376068949699402, "start": 2351, "tag": "NAME", "value": "R" }, { "context": "e++\n 'You know where to start looking for Roxy'\n progress: consq.set 0\n\n storylet '", "end": 2660, "score": 0.5682466626167297, "start": 2659, "tag": "NAME", "value": "R" }, { "context": "l illusions'\n '''\n A wizard like Roxy is bound to be using huge numbers of illusions", "end": 3239, "score": 0.8157506585121155, "start": 3238, "tag": "NAME", "value": "R" }, { "context": " whoever she is, she uses the post office near Mr. Brown's mansion.\n '''\n consequences:\n ", "end": 6394, "score": 0.5240601301193237, "start": 6389, "tag": "NAME", "value": "Brown" } ]
src/coffee/game/roxy.coffee
arashikou/exper3-2015
0
angular.module 'gameDefinition.roxyStories', ['qbn.edsl', 'gameDefinition.enums'] .run (qbnEdsl, enums) -> {storylet, choice, reqs, consq} = qbnEdsl {leads} = enums storylet 'roxyStart', 'Roxy Malone, big-time gangster' ''' There are three big gangs in the city. North of the river belongs to Mac Turleigh's boys. The financial district is under the watchful eye of Ambrose Beard. And everything else? Everything else belongs to Roxy Malone's gang. Roxy appeared during the war, already leading a small gang of street toughs. While the old gangs had their eyes turned to war profiteering, she was qietly eating away at their territory back home. While the old gangs were trying to understand how to get mages to work for them, she was already an accomplished sorceress in her own right. Roxy was a native of the new world. And one by one, the old gangs fell before her or joined her outright. Smart money says she won't rest until she owns the whole city. So why is she concerning herself with Mrs. Brown? What does she have to gain from driving a grieving woman from her home? There's more going on here than meets the eye. This won't be the first time you two have crossed paths, but you don't know where she's operating out of these days. You'll need to get a bead on Roxy before you can confront her. ''' choices: [ choice 'findRoxy', 'Begin searching for her' 'You\'re going to need to do some investigation just to find a place to start looking.' active: rumor: reqs.gte 6 choice 'dontFindRoxy', 'No good' 'Roxy is still giving you the slip.' next: false ] storylet 'findRoxy', 'Begin searching for her' ''' There's a through-line to the stories on the street about Roxy's gang. For the last six months, they've been having trouble bringing enough people to bear to pressure the other gangs. And they're more focused on consolidating power in the magic districts. It all adds up to one thing: Roxy must have moved her base of operations east, away from downtown… and right into the vicinity of the Brown mansion. Based on shakedown rates in various districts, you figure Roxy's hideout must be somewhere within an area of about fifteen blocks on the east end. It's still a wide area, but it's a start. ''' consequences: lead: consq.set leads.roxy roxy: (quality) -> quality.value++ 'You know where to start looking for Roxy' progress: consq.set 0 storylet 'roxy1', 'Pursue Roxy the gangster' ''' No operation as large as Roxy's can avoid leaving a trail behind. ''' choices: [ choice 'roxy1Bluebacks', 'Pay off low-level scum' 'The lowest man on the totem pole is usually the most willing to trade money for secrets.' visible: progress: reqs.lt 5 active: bluebacks: reqs.gte 3 choice 'roxy1Hunch', 'Look for unusual illusions' ''' A wizard like Roxy is bound to be using huge numbers of illusions to cover up her operations. ''' visible: progress: reqs.lt 5 active: illusionHunch: reqs.gte 1 choice 'roxy1Solve', 'Aha!' 'You\'ve pieced together enough to find her!' active: progress: reqs.gte 5 ] storylet 'roxy1Bluebacks', 'Pay off low-level scum' ''' None of them have been to the headquarters directly. Most of them are at least two tiers removed from anyone important enough to know anything. But who they meet and where they meet them tells you a lot about who to pay off next and where the orders are coming from. ''' consequences: bluebacks: consq.decrease 3 progress: consq.increase 1 storylet 'roxy1Hunch', 'Look for unusual illusions' ''' There are illusions all over this part of town, of course. When using a spell to spruce up your home is so easy, why not do it? Still, a few places with an unusual number and specificty of illusions catch your eye, particularly the ones with illusions in places that have nothing to do with decor. ''' consequences: illusionHunch: consq.decrease 1 progress: consq.increase 1 storylet 'roxy1Solve', 'In a disused print shop' ''' The print shop's shell only takes up a small portion of the first floor, but it's been magicked to appear larger than it is, to cover up the fact that the rest of the building is filled with gangsters. Roxy won't deign to see you if you just walk up to the front door. Not after what happened last time. So it looks like breaking and entering is your only option. You slip in a back door and slide through a hallucinatory wall. You're upstairs and rifling through files without anyone being the wiser. Their contents aren't very revealing, though. Nothing in here really explains the link to Mr. Brown. You've just spotted a locked cabinet in the corner and are considering how to best open it when a lowly runner wanders in and spots you. He rushes out and sounds the alarm. Cursing your luck, you shoot the lock off. Inside is a stack of envelopes and a small, magical charm. You're going to need a hand free to hold your gun. Which do you take? ''' choices: [ choice 'roxyFinalLetters', 'Take the letters' 'They smell… nice?' choice 'roxyFinalRibbon', 'Take the spell-inscribed ribbon' ''' You've seen these before. They're used to overcome illusions. ''' ] storylet 'roxyFinalLetters', 'Mysterious letters' ''' Once safely back in your office, you peruse the letters with great curiosity. They appear to be love letters. You have no idea who this Joy person is, nor who she was writing to, but the smell of perfume on them is tugging at your memory, as if you've smelled it before. And whoever she is, she uses the post office near Mr. Brown's mansion. ''' consequences: evidence: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 3 'You stole some letters from Roxy Malone\'s hideout.' progress: consq.set 0 storylet 'roxyFinalRibbon', 'A magic ribbon' ''' Once safely back in your office, you confirm what you already suspected. The ribbon is a charm against illusions, inscribed with a spell of protection. It isn't the evidence in the case that you were looking for, but it should be very useful in continuing your investigation. ''' consequences: inscribedRibbon: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 4 'You stole a ribbon from Roxy Malone\'s hideout.' progress: consq.set 0 return
6692
angular.module 'gameDefinition.roxyStories', ['qbn.edsl', 'gameDefinition.enums'] .run (qbnEdsl, enums) -> {storylet, choice, reqs, consq} = qbnEdsl {leads} = enums storylet 'roxyStart', '<NAME>, big-time gangster' ''' There are three big gangs in the city. North of the river belongs to Mac Turleigh's boys. The financial district is under the watchful eye of Ambrose Beard. And everything else? Everything else belongs to <NAME>'s gang. <NAME> appeared during the war, already leading a small gang of street toughs. While the old gangs had their eyes turned to war profiteering, she was qietly eating away at their territory back home. While the old gangs were trying to understand how to get mages to work for them, she was already an accomplished sorceress in her own right. <NAME> was a native of the new world. And one by one, the old gangs fell before her or joined her outright. Smart money says she won't rest until she owns the whole city. So why is she concerning herself with <NAME>? What does she have to gain from driving a grieving woman from her home? There's more going on here than meets the eye. This won't be the first time you two have crossed paths, but you don't know where she's operating out of these days. You'll need to get a bead on Roxy before you can confront her. ''' choices: [ choice 'findRoxy', 'Begin searching for her' 'You\'re going to need to do some investigation just to find a place to start looking.' active: rumor: reqs.gte 6 choice 'dontFindRoxy', 'No good' 'Roxy is still giving you the slip.' next: false ] storylet 'findRoxy', 'Begin searching for her' ''' There's a through-line to the stories on the street about Roxy's gang. For the last six months, they've been having trouble bringing enough people to bear to pressure the other gangs. And they're more focused on consolidating power in the magic districts. It all adds up to one thing: <NAME>oxy must have moved her base of operations east, away from downtown… and right into the vicinity of the Brown mansion. Based on shakedown rates in various districts, you figure <NAME>oxy's hideout must be somewhere within an area of about fifteen blocks on the east end. It's still a wide area, but it's a start. ''' consequences: lead: consq.set leads.roxy roxy: (quality) -> quality.value++ 'You know where to start looking for <NAME>oxy' progress: consq.set 0 storylet 'roxy1', 'Pursue Roxy the gangster' ''' No operation as large as Roxy's can avoid leaving a trail behind. ''' choices: [ choice 'roxy1Bluebacks', 'Pay off low-level scum' 'The lowest man on the totem pole is usually the most willing to trade money for secrets.' visible: progress: reqs.lt 5 active: bluebacks: reqs.gte 3 choice 'roxy1Hunch', 'Look for unusual illusions' ''' A wizard like <NAME>oxy is bound to be using huge numbers of illusions to cover up her operations. ''' visible: progress: reqs.lt 5 active: illusionHunch: reqs.gte 1 choice 'roxy1Solve', 'Aha!' 'You\'ve pieced together enough to find her!' active: progress: reqs.gte 5 ] storylet 'roxy1Bluebacks', 'Pay off low-level scum' ''' None of them have been to the headquarters directly. Most of them are at least two tiers removed from anyone important enough to know anything. But who they meet and where they meet them tells you a lot about who to pay off next and where the orders are coming from. ''' consequences: bluebacks: consq.decrease 3 progress: consq.increase 1 storylet 'roxy1Hunch', 'Look for unusual illusions' ''' There are illusions all over this part of town, of course. When using a spell to spruce up your home is so easy, why not do it? Still, a few places with an unusual number and specificty of illusions catch your eye, particularly the ones with illusions in places that have nothing to do with decor. ''' consequences: illusionHunch: consq.decrease 1 progress: consq.increase 1 storylet 'roxy1Solve', 'In a disused print shop' ''' The print shop's shell only takes up a small portion of the first floor, but it's been magicked to appear larger than it is, to cover up the fact that the rest of the building is filled with gangsters. Roxy won't deign to see you if you just walk up to the front door. Not after what happened last time. So it looks like breaking and entering is your only option. You slip in a back door and slide through a hallucinatory wall. You're upstairs and rifling through files without anyone being the wiser. Their contents aren't very revealing, though. Nothing in here really explains the link to Mr. Brown. You've just spotted a locked cabinet in the corner and are considering how to best open it when a lowly runner wanders in and spots you. He rushes out and sounds the alarm. Cursing your luck, you shoot the lock off. Inside is a stack of envelopes and a small, magical charm. You're going to need a hand free to hold your gun. Which do you take? ''' choices: [ choice 'roxyFinalLetters', 'Take the letters' 'They smell… nice?' choice 'roxyFinalRibbon', 'Take the spell-inscribed ribbon' ''' You've seen these before. They're used to overcome illusions. ''' ] storylet 'roxyFinalLetters', 'Mysterious letters' ''' Once safely back in your office, you peruse the letters with great curiosity. They appear to be love letters. You have no idea who this Joy person is, nor who she was writing to, but the smell of perfume on them is tugging at your memory, as if you've smelled it before. And whoever she is, she uses the post office near Mr. <NAME>'s mansion. ''' consequences: evidence: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 3 'You stole some letters from Roxy Malone\'s hideout.' progress: consq.set 0 storylet 'roxyFinalRibbon', 'A magic ribbon' ''' Once safely back in your office, you confirm what you already suspected. The ribbon is a charm against illusions, inscribed with a spell of protection. It isn't the evidence in the case that you were looking for, but it should be very useful in continuing your investigation. ''' consequences: inscribedRibbon: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 4 'You stole a ribbon from Roxy Malone\'s hideout.' progress: consq.set 0 return
true
angular.module 'gameDefinition.roxyStories', ['qbn.edsl', 'gameDefinition.enums'] .run (qbnEdsl, enums) -> {storylet, choice, reqs, consq} = qbnEdsl {leads} = enums storylet 'roxyStart', 'PI:NAME:<NAME>END_PI, big-time gangster' ''' There are three big gangs in the city. North of the river belongs to Mac Turleigh's boys. The financial district is under the watchful eye of Ambrose Beard. And everything else? Everything else belongs to PI:NAME:<NAME>END_PI's gang. PI:NAME:<NAME>END_PI appeared during the war, already leading a small gang of street toughs. While the old gangs had their eyes turned to war profiteering, she was qietly eating away at their territory back home. While the old gangs were trying to understand how to get mages to work for them, she was already an accomplished sorceress in her own right. PI:NAME:<NAME>END_PI was a native of the new world. And one by one, the old gangs fell before her or joined her outright. Smart money says she won't rest until she owns the whole city. So why is she concerning herself with PI:NAME:<NAME>END_PI? What does she have to gain from driving a grieving woman from her home? There's more going on here than meets the eye. This won't be the first time you two have crossed paths, but you don't know where she's operating out of these days. You'll need to get a bead on Roxy before you can confront her. ''' choices: [ choice 'findRoxy', 'Begin searching for her' 'You\'re going to need to do some investigation just to find a place to start looking.' active: rumor: reqs.gte 6 choice 'dontFindRoxy', 'No good' 'Roxy is still giving you the slip.' next: false ] storylet 'findRoxy', 'Begin searching for her' ''' There's a through-line to the stories on the street about Roxy's gang. For the last six months, they've been having trouble bringing enough people to bear to pressure the other gangs. And they're more focused on consolidating power in the magic districts. It all adds up to one thing: PI:NAME:<NAME>END_PIoxy must have moved her base of operations east, away from downtown… and right into the vicinity of the Brown mansion. Based on shakedown rates in various districts, you figure PI:NAME:<NAME>END_PIoxy's hideout must be somewhere within an area of about fifteen blocks on the east end. It's still a wide area, but it's a start. ''' consequences: lead: consq.set leads.roxy roxy: (quality) -> quality.value++ 'You know where to start looking for PI:NAME:<NAME>END_PIoxy' progress: consq.set 0 storylet 'roxy1', 'Pursue Roxy the gangster' ''' No operation as large as Roxy's can avoid leaving a trail behind. ''' choices: [ choice 'roxy1Bluebacks', 'Pay off low-level scum' 'The lowest man on the totem pole is usually the most willing to trade money for secrets.' visible: progress: reqs.lt 5 active: bluebacks: reqs.gte 3 choice 'roxy1Hunch', 'Look for unusual illusions' ''' A wizard like PI:NAME:<NAME>END_PIoxy is bound to be using huge numbers of illusions to cover up her operations. ''' visible: progress: reqs.lt 5 active: illusionHunch: reqs.gte 1 choice 'roxy1Solve', 'Aha!' 'You\'ve pieced together enough to find her!' active: progress: reqs.gte 5 ] storylet 'roxy1Bluebacks', 'Pay off low-level scum' ''' None of them have been to the headquarters directly. Most of them are at least two tiers removed from anyone important enough to know anything. But who they meet and where they meet them tells you a lot about who to pay off next and where the orders are coming from. ''' consequences: bluebacks: consq.decrease 3 progress: consq.increase 1 storylet 'roxy1Hunch', 'Look for unusual illusions' ''' There are illusions all over this part of town, of course. When using a spell to spruce up your home is so easy, why not do it? Still, a few places with an unusual number and specificty of illusions catch your eye, particularly the ones with illusions in places that have nothing to do with decor. ''' consequences: illusionHunch: consq.decrease 1 progress: consq.increase 1 storylet 'roxy1Solve', 'In a disused print shop' ''' The print shop's shell only takes up a small portion of the first floor, but it's been magicked to appear larger than it is, to cover up the fact that the rest of the building is filled with gangsters. Roxy won't deign to see you if you just walk up to the front door. Not after what happened last time. So it looks like breaking and entering is your only option. You slip in a back door and slide through a hallucinatory wall. You're upstairs and rifling through files without anyone being the wiser. Their contents aren't very revealing, though. Nothing in here really explains the link to Mr. Brown. You've just spotted a locked cabinet in the corner and are considering how to best open it when a lowly runner wanders in and spots you. He rushes out and sounds the alarm. Cursing your luck, you shoot the lock off. Inside is a stack of envelopes and a small, magical charm. You're going to need a hand free to hold your gun. Which do you take? ''' choices: [ choice 'roxyFinalLetters', 'Take the letters' 'They smell… nice?' choice 'roxyFinalRibbon', 'Take the spell-inscribed ribbon' ''' You've seen these before. They're used to overcome illusions. ''' ] storylet 'roxyFinalLetters', 'Mysterious letters' ''' Once safely back in your office, you peruse the letters with great curiosity. They appear to be love letters. You have no idea who this Joy person is, nor who she was writing to, but the smell of perfume on them is tugging at your memory, as if you've smelled it before. And whoever she is, she uses the post office near Mr. PI:NAME:<NAME>END_PI's mansion. ''' consequences: evidence: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 3 'You stole some letters from Roxy Malone\'s hideout.' progress: consq.set 0 storylet 'roxyFinalRibbon', 'A magic ribbon' ''' Once safely back in your office, you confirm what you already suspected. The ribbon is a charm against illusions, inscribed with a spell of protection. It isn't the evidence in the case that you were looking for, but it should be very useful in continuing your investigation. ''' consequences: inscribedRibbon: consq.increase 1 lead: (quality) -> quality.value = undefined 'Your current lead has ended.' roxy: (quality) -> quality.value = 4 'You stole a ribbon from Roxy Malone\'s hideout.' progress: consq.set 0 return
[ { "context": " collections = ko.observableArray()\n\n randomKey = Math.random()\n\n register = (collection) ->\n collec", "end": 946, "score": 0.6332365870475769, "start": 942, "tag": "KEY", "value": "Math" }, { "context": "ctions = ko.observableArray()\n\n randomKey = Math.random()\n\n register = (collection) ->\n collection.re", "end": 953, "score": 0.6237418055534363, "start": 947, "tag": "KEY", "value": "random" }, { "context": ".substr(0, len) == prefix\n else\n key = \"#{config.cmrTagNamespace}.#{key}\"\n tags?[key]?.data\n\n canFocus: ->\n ", "end": 11451, "score": 0.9456596970558167, "start": 11417, "tag": "KEY", "value": "\"#{config.cmrTagNamespace}.#{key}\"" } ]
app/assets/javascripts/models/data/collection.js.coffee
kant/earthdata-search
1
#= require models/data/granules #= require models/data/service_options #= require models/handoff/giovanni ns = @edsc.models.data ns.Collection = do (ko DetailsModel = @edsc.models.DetailsModel scalerUrl = @edsc.config.browseScalerUrl thumbnailWidth = @edsc.config.thumbnailWidth Granules = ns.Granules GranuleQuery = ns.query.GranuleQuery ServiceOptionsModel = ns.ServiceOptions toParam=jQuery.param extend=jQuery.extend ajax = @edsc.util.xhr.ajax dateUtil = @edsc.util.date stringUtil = @edsc.util.string config = @edsc.config GiovanniHandoffModel = @edsc.models.handoff.GiovanniHandoff ) -> openSearchKeyToEndpoint = cwic: (collection) -> collections = ko.observableArray() randomKey = Math.random() register = (collection) -> collection.reference() collections.push(collection) collection class Collection extends DetailsModel @awaitDatasources: (collections, callback) -> calls = collections.length aggregation = -> calls-- callback(collections) if calls == 0 for collection in collections collection.granuleDatasourceAsync(aggregation) @findOrCreate: (jsonData, query) -> id = jsonData.id for collection in collections() if collection.id == id if (jsonData.short_name? && !collection.hasAtomData()) || jsonData.granule_count != collection.granule_count collection.fromJson(jsonData) return collection.reference() register(new Collection(jsonData, query, randomKey)) @visible: ko.computed read: -> collection for collection in collections() when collection.visible() constructor: (jsonData, @query, inKey) -> throw "Collections should not be constructed directly" unless inKey == randomKey @granuleCount = ko.observable(0) @hasAtomData = ko.observable(false) @orbitFriendly = ko.observable(false) @details = @asyncComputed({}, 100, @_computeCollectionDetails, this) @detailsLoaded = ko.observable(false) @gibs = ko.observable(null) @gibsLayers = ko.computed( (-> available = [] if @gibs() available.push('Antarctic') if @gibs()[0].antarctic available.push('Arctic') if @gibs()[0].arctic available.push('Geographic') if @gibs()[0].geo if available.length == 0 available.push("None") return available.join(", ")), this) @spatial = @computed(@_computeSpatial, this, deferEvaluation: true) @timeRange = @computed(@_computeTimeRange, this, deferEvaluation: true) @granuleDescription = @computed(@_computeGranuleDescription, this, deferEvaluation: true) @granuleDatasource = ko.observable(null) @_renderers = [] @_pendingRenderActions = [] @osddUrl = @computed(@_computeOsddUrl, this, deferEvaluation: true) @cwic = @computed((-> @granuleDatasourceName() == 'cwic'), this, deferEvaluation: true) @granuleIds = @computed read: => @granuleQuery.granuleIds().replace(/\s\n/g, ', ') write: (value) => @granuleQuery.granuleIds(value.split(/[,\s\n]\s*/g).join(", ")) deferEvaluation: true @visible = ko.observable(false) @disposable(@visible.subscribe(@_visibilityChange)) @fromJson(jsonData) @spatial_constraint = @computed => if @points? 'point:' + @points[0].split(/\s+/).reverse().join(',') else null @echoGranulesUrl = @computed read: => if @granuleDatasourceName() == 'cmr' && @granuleDatasource() _cloneQueryParams = (obj) -> return obj if obj is null or typeof (obj) isnt "object" temp = new obj.constructor() for key of obj temp[key] = _cloneQueryParams(obj[key]) temp queryParams = _cloneQueryParams(@granuleDatasource().toQueryParams()) delete queryParams['datasource'] if queryParams['datasource'] paramStr = toParam(queryParams) "#{@details().granule_url}?#{paramStr}" deferEvaluation: true @availableFilters = @computed(@_computeAvailableFilters, this, deferEvaluation: true) @isMaxOrderSizeReached = @computed(@_computeMaxOrderSize, this, deferEvaluation: true) @isProjectCollection = ko.observable(false) handoffUrls: => urls = [] for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 # Strip off just handoffProvider = tag.split('.')[3] # TODO: There has to be a pattern that allows for dynamic instantation of these objects if handoffProvider == 'giovanni' urls.push(new GiovanniHandoffModel(@query, this)) urls handoffTags: -> tag for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 _computeMaxOrderSize: -> hits = 0 hits = @granuleDatasource().data().hits() if @granuleDatasource() limit = -1 limit = @tags()['edsc.limited_collections']['data']['limit'] if @tags() && @tags()['edsc.limited_collections'] if limit == -1 false else hits > limit # Since CMR doesn't support this feature, we get them from the granules that are already loaded. _computeAvailableFilters: -> _capabilities = {} # The following 'preloads' the available capabilities - this is necessary if zero granules are returned from a query. # @orbitFriendly is there to remind the app that it accepts orbit parameters in the granules filter _capabilities['orbit_calculated_spatial_domains'] = true if @orbitFriendly() # Loop for each loaded granules, as long as we found one that capable of day/night filtering or cloud cover filtering, # it stops. for _granule in @cmrGranulesModel.results() _capabilities['day_night_flag'] = true if _granule.day_night_flag? && _granule.day_night_flag.toUpperCase() in ['DAY', 'NIGHT', 'BOTH'] _capabilities['cloud_cover'] = true if _granule.cloud_cover? _capabilities['orbit_calculated_spatial_domains'] = true if _granule.orbit_calculated_spatial_domains? # if we see it once, then we know it's 'orbitFriendly' @orbitFriendly(true) if _granule.orbit_calculated_spatial_domains? break if _capabilities['day_night_flag'] && _capabilities['cloud_cover'] && _capabilities['orbit_calculated_spatial_domains'] _capabilities _computeTimeRange: -> if @hasAtomData() result = dateUtil.timeSpanToIsoDate(@time_start, @time_end) (result || "Unknown") _computeSpatial: -> (@_spatialString("Bounding Rectangles", @boxes) ? @_spatialString("Points", @points) ? @_spatialString("Polygons", @polygons) ? @_spatialString("Lines", @lines)) _spatialString: (title, spatial) -> if spatial suffix = if spatial.length > 1 then " ..." else "" "#{title}: #{spatial[0]}#{suffix}" else null _computeGranuleDescription: -> result = null return result unless @hasAtomData() @granuleDatasource()?.granuleDescription() ? 'Collection only' _computeOsddUrl: -> url = @osdd_url() ? @details()?.osdd_url if url separator = if url.indexOf('?') == -1 then '?' else '&' url += "#{separator}clientId=#{config.cmrClientId}" url thumbnail: -> granule = @browseable_granule collection_id = @id for link in @links when link['rel'].indexOf('browse#') > -1 if @links? if collection_id? "#{scalerUrl}/browse_images/datasets/#{collection_id}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else if granule? "#{scalerUrl}/browse_images/granules/#{granule}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else "#{scalerUrl}/image-unavailable.svg" granuleFiltersApplied: -> @granuleDatasource()?.hasQueryConfig() shouldDispose: -> result = !@granuleFiltersApplied() collections.remove(this) if result result granuleDatasourceName: -> datasource = @getValueForTag('datasource') if datasource return datasource else if @has_granules return "cmr" else return null granuleRendererNames: -> renderers = @getValueForTag('renderers') if renderers return renderers if renderers.constructor is Array return renderers.split(',') else if @has_granules return ["cmr"] else return [] _visibilityChange: (visible) => # TODO: Visibility continues to be too coupled to collections action = if visible then 'startSearchView' else 'endSearchView' @notifyRenderers(action) destroy: -> @_unloadDatasource() @_unloadRenderers() super() notifyRenderers: (action) -> @_loadRenderers() if @_loading @_pendingRenderActions.push(action) else for renderer in @_renderers renderer[action]?() _loadRenderers: -> names = @granuleRendererNames() loaded = names.join(',') if loaded.length > 0 && loaded != @_currentRenderers @_loading = true @_currentRenderers = loaded @_unloadRenderers() expected = names.length onload = (PluginClass, facade) => renderer = new PluginClass(facade, this) @_renderers.push(renderer) for action in @_pendingRenderActions renderer[action]?() oncomplete = => expected -= 1 if expected == 0 @_loading = false @_pendingRenderActions = [] for renderer in names edscplugin.load "renderer.#{renderer}", onload, oncomplete _unloadRenderers: -> renderer.destroy() for renderer in @_renderers @_renderers = [] _loadDatasource: -> desiredName = @granuleDatasourceName() if desiredName && @_currentName != desiredName @_currentName = desiredName @_unloadDatasource() onload = (PluginClass, facade) => datasource = new PluginClass(facade, this) @_currentName = desiredName @_unloadDatasource() @granuleDatasource(@disposable(datasource)) oncomplete = => if @_datasourceListeners for listener in @_datasourceListeners listener(@granuleDatasource()) @_datasourceListeners = null edscplugin.load "datasource.#{desiredName}", onload, oncomplete _unloadDatasource: -> if @granuleDatasource() @granuleDatasource().destroy() @granuleDatasource(null) granuleDatasourceAsync: (callback) -> if !@canFocus() || @granuleDatasource() callback(@granuleDatasource()) else @_datasourceListeners ?= [] @_datasourceListeners.push(callback) getValueForTag: (key) -> tags = @tags() if tags && tags.constructor is Array prefix = "#{config.cmrTagNamespace}.#{key}." len = prefix.length for tag in tags tag = tag.join('.') if tag.constructor is Array return tag.substr(len) if tag.substr(0, len) == prefix else key = "#{config.cmrTagNamespace}.#{key}" tags?[key]?.data canFocus: -> @hasAtomData() && @granuleDatasourceName()? org: -> if @organizations?.length > 0 @organizations[0] else @archive_center metadata_url: (collection, e) -> win = window.open(@details()["#{e.target.attributes['data-metadata-type'].value.toLowerCase()}_url"], '_blank') win.focus() fromJson: (jsonObj) -> @json = jsonObj if jsonObj.short_name? then @short_name = ko.observable(jsonObj.short_name) else @short_name = ko.observable('N/A') @hasAtomData(jsonObj.short_name?) @_setObservable('opendap', jsonObj) @_setObservable('opendap_url', jsonObj) @_setObservable('modaps', jsonObj) @_setObservable('osdd_url', jsonObj) @_setObservable('tags', jsonObj) @_setObservable('granule_hits', jsonObj) @_setObservable('total_size', jsonObj) @_setObservable('unit', jsonObj) @_setObservable('has_spatial_subsetting', jsonObj) @_setObservable('has_transforms', jsonObj) @_setObservable('has_formats', jsonObj) @_setObservable('has_variables', jsonObj) @_setObservable('associations', jsonObj) @truncatedTitle = ko.observable(if jsonObj.title?.length > 102 then jsonObj.title.substring(0, 102) + '...' else jsonObj.title) @gibs(@getValueForTag('extra.gibs')) @nrt = jsonObj.collection_data_type == "NEAR_REAL_TIME" @granuleCount(jsonObj.granule_count) for own key, value of jsonObj this[key] = value unless ko.isObservable(this[key]) @_loadDatasource() @granuleDatasource()?.updateFromCollectionData?(jsonObj) if @granuleDatasourceName() && @granuleDatasourceName() != 'cmr' @has_granules = @canFocus() _setObservable: (prop, jsonObj) => this[prop] ?= ko.observable(undefined) this[prop](jsonObj[prop] ? this[prop]()) has_feature: (key) -> @getValueForTag("features.#{key}") exports = Collection
185711
#= require models/data/granules #= require models/data/service_options #= require models/handoff/giovanni ns = @edsc.models.data ns.Collection = do (ko DetailsModel = @edsc.models.DetailsModel scalerUrl = @edsc.config.browseScalerUrl thumbnailWidth = @edsc.config.thumbnailWidth Granules = ns.Granules GranuleQuery = ns.query.GranuleQuery ServiceOptionsModel = ns.ServiceOptions toParam=jQuery.param extend=jQuery.extend ajax = @edsc.util.xhr.ajax dateUtil = @edsc.util.date stringUtil = @edsc.util.string config = @edsc.config GiovanniHandoffModel = @edsc.models.handoff.GiovanniHandoff ) -> openSearchKeyToEndpoint = cwic: (collection) -> collections = ko.observableArray() randomKey = <KEY>.<KEY>() register = (collection) -> collection.reference() collections.push(collection) collection class Collection extends DetailsModel @awaitDatasources: (collections, callback) -> calls = collections.length aggregation = -> calls-- callback(collections) if calls == 0 for collection in collections collection.granuleDatasourceAsync(aggregation) @findOrCreate: (jsonData, query) -> id = jsonData.id for collection in collections() if collection.id == id if (jsonData.short_name? && !collection.hasAtomData()) || jsonData.granule_count != collection.granule_count collection.fromJson(jsonData) return collection.reference() register(new Collection(jsonData, query, randomKey)) @visible: ko.computed read: -> collection for collection in collections() when collection.visible() constructor: (jsonData, @query, inKey) -> throw "Collections should not be constructed directly" unless inKey == randomKey @granuleCount = ko.observable(0) @hasAtomData = ko.observable(false) @orbitFriendly = ko.observable(false) @details = @asyncComputed({}, 100, @_computeCollectionDetails, this) @detailsLoaded = ko.observable(false) @gibs = ko.observable(null) @gibsLayers = ko.computed( (-> available = [] if @gibs() available.push('Antarctic') if @gibs()[0].antarctic available.push('Arctic') if @gibs()[0].arctic available.push('Geographic') if @gibs()[0].geo if available.length == 0 available.push("None") return available.join(", ")), this) @spatial = @computed(@_computeSpatial, this, deferEvaluation: true) @timeRange = @computed(@_computeTimeRange, this, deferEvaluation: true) @granuleDescription = @computed(@_computeGranuleDescription, this, deferEvaluation: true) @granuleDatasource = ko.observable(null) @_renderers = [] @_pendingRenderActions = [] @osddUrl = @computed(@_computeOsddUrl, this, deferEvaluation: true) @cwic = @computed((-> @granuleDatasourceName() == 'cwic'), this, deferEvaluation: true) @granuleIds = @computed read: => @granuleQuery.granuleIds().replace(/\s\n/g, ', ') write: (value) => @granuleQuery.granuleIds(value.split(/[,\s\n]\s*/g).join(", ")) deferEvaluation: true @visible = ko.observable(false) @disposable(@visible.subscribe(@_visibilityChange)) @fromJson(jsonData) @spatial_constraint = @computed => if @points? 'point:' + @points[0].split(/\s+/).reverse().join(',') else null @echoGranulesUrl = @computed read: => if @granuleDatasourceName() == 'cmr' && @granuleDatasource() _cloneQueryParams = (obj) -> return obj if obj is null or typeof (obj) isnt "object" temp = new obj.constructor() for key of obj temp[key] = _cloneQueryParams(obj[key]) temp queryParams = _cloneQueryParams(@granuleDatasource().toQueryParams()) delete queryParams['datasource'] if queryParams['datasource'] paramStr = toParam(queryParams) "#{@details().granule_url}?#{paramStr}" deferEvaluation: true @availableFilters = @computed(@_computeAvailableFilters, this, deferEvaluation: true) @isMaxOrderSizeReached = @computed(@_computeMaxOrderSize, this, deferEvaluation: true) @isProjectCollection = ko.observable(false) handoffUrls: => urls = [] for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 # Strip off just handoffProvider = tag.split('.')[3] # TODO: There has to be a pattern that allows for dynamic instantation of these objects if handoffProvider == 'giovanni' urls.push(new GiovanniHandoffModel(@query, this)) urls handoffTags: -> tag for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 _computeMaxOrderSize: -> hits = 0 hits = @granuleDatasource().data().hits() if @granuleDatasource() limit = -1 limit = @tags()['edsc.limited_collections']['data']['limit'] if @tags() && @tags()['edsc.limited_collections'] if limit == -1 false else hits > limit # Since CMR doesn't support this feature, we get them from the granules that are already loaded. _computeAvailableFilters: -> _capabilities = {} # The following 'preloads' the available capabilities - this is necessary if zero granules are returned from a query. # @orbitFriendly is there to remind the app that it accepts orbit parameters in the granules filter _capabilities['orbit_calculated_spatial_domains'] = true if @orbitFriendly() # Loop for each loaded granules, as long as we found one that capable of day/night filtering or cloud cover filtering, # it stops. for _granule in @cmrGranulesModel.results() _capabilities['day_night_flag'] = true if _granule.day_night_flag? && _granule.day_night_flag.toUpperCase() in ['DAY', 'NIGHT', 'BOTH'] _capabilities['cloud_cover'] = true if _granule.cloud_cover? _capabilities['orbit_calculated_spatial_domains'] = true if _granule.orbit_calculated_spatial_domains? # if we see it once, then we know it's 'orbitFriendly' @orbitFriendly(true) if _granule.orbit_calculated_spatial_domains? break if _capabilities['day_night_flag'] && _capabilities['cloud_cover'] && _capabilities['orbit_calculated_spatial_domains'] _capabilities _computeTimeRange: -> if @hasAtomData() result = dateUtil.timeSpanToIsoDate(@time_start, @time_end) (result || "Unknown") _computeSpatial: -> (@_spatialString("Bounding Rectangles", @boxes) ? @_spatialString("Points", @points) ? @_spatialString("Polygons", @polygons) ? @_spatialString("Lines", @lines)) _spatialString: (title, spatial) -> if spatial suffix = if spatial.length > 1 then " ..." else "" "#{title}: #{spatial[0]}#{suffix}" else null _computeGranuleDescription: -> result = null return result unless @hasAtomData() @granuleDatasource()?.granuleDescription() ? 'Collection only' _computeOsddUrl: -> url = @osdd_url() ? @details()?.osdd_url if url separator = if url.indexOf('?') == -1 then '?' else '&' url += "#{separator}clientId=#{config.cmrClientId}" url thumbnail: -> granule = @browseable_granule collection_id = @id for link in @links when link['rel'].indexOf('browse#') > -1 if @links? if collection_id? "#{scalerUrl}/browse_images/datasets/#{collection_id}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else if granule? "#{scalerUrl}/browse_images/granules/#{granule}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else "#{scalerUrl}/image-unavailable.svg" granuleFiltersApplied: -> @granuleDatasource()?.hasQueryConfig() shouldDispose: -> result = !@granuleFiltersApplied() collections.remove(this) if result result granuleDatasourceName: -> datasource = @getValueForTag('datasource') if datasource return datasource else if @has_granules return "cmr" else return null granuleRendererNames: -> renderers = @getValueForTag('renderers') if renderers return renderers if renderers.constructor is Array return renderers.split(',') else if @has_granules return ["cmr"] else return [] _visibilityChange: (visible) => # TODO: Visibility continues to be too coupled to collections action = if visible then 'startSearchView' else 'endSearchView' @notifyRenderers(action) destroy: -> @_unloadDatasource() @_unloadRenderers() super() notifyRenderers: (action) -> @_loadRenderers() if @_loading @_pendingRenderActions.push(action) else for renderer in @_renderers renderer[action]?() _loadRenderers: -> names = @granuleRendererNames() loaded = names.join(',') if loaded.length > 0 && loaded != @_currentRenderers @_loading = true @_currentRenderers = loaded @_unloadRenderers() expected = names.length onload = (PluginClass, facade) => renderer = new PluginClass(facade, this) @_renderers.push(renderer) for action in @_pendingRenderActions renderer[action]?() oncomplete = => expected -= 1 if expected == 0 @_loading = false @_pendingRenderActions = [] for renderer in names edscplugin.load "renderer.#{renderer}", onload, oncomplete _unloadRenderers: -> renderer.destroy() for renderer in @_renderers @_renderers = [] _loadDatasource: -> desiredName = @granuleDatasourceName() if desiredName && @_currentName != desiredName @_currentName = desiredName @_unloadDatasource() onload = (PluginClass, facade) => datasource = new PluginClass(facade, this) @_currentName = desiredName @_unloadDatasource() @granuleDatasource(@disposable(datasource)) oncomplete = => if @_datasourceListeners for listener in @_datasourceListeners listener(@granuleDatasource()) @_datasourceListeners = null edscplugin.load "datasource.#{desiredName}", onload, oncomplete _unloadDatasource: -> if @granuleDatasource() @granuleDatasource().destroy() @granuleDatasource(null) granuleDatasourceAsync: (callback) -> if !@canFocus() || @granuleDatasource() callback(@granuleDatasource()) else @_datasourceListeners ?= [] @_datasourceListeners.push(callback) getValueForTag: (key) -> tags = @tags() if tags && tags.constructor is Array prefix = "#{config.cmrTagNamespace}.#{key}." len = prefix.length for tag in tags tag = tag.join('.') if tag.constructor is Array return tag.substr(len) if tag.substr(0, len) == prefix else key = <KEY> tags?[key]?.data canFocus: -> @hasAtomData() && @granuleDatasourceName()? org: -> if @organizations?.length > 0 @organizations[0] else @archive_center metadata_url: (collection, e) -> win = window.open(@details()["#{e.target.attributes['data-metadata-type'].value.toLowerCase()}_url"], '_blank') win.focus() fromJson: (jsonObj) -> @json = jsonObj if jsonObj.short_name? then @short_name = ko.observable(jsonObj.short_name) else @short_name = ko.observable('N/A') @hasAtomData(jsonObj.short_name?) @_setObservable('opendap', jsonObj) @_setObservable('opendap_url', jsonObj) @_setObservable('modaps', jsonObj) @_setObservable('osdd_url', jsonObj) @_setObservable('tags', jsonObj) @_setObservable('granule_hits', jsonObj) @_setObservable('total_size', jsonObj) @_setObservable('unit', jsonObj) @_setObservable('has_spatial_subsetting', jsonObj) @_setObservable('has_transforms', jsonObj) @_setObservable('has_formats', jsonObj) @_setObservable('has_variables', jsonObj) @_setObservable('associations', jsonObj) @truncatedTitle = ko.observable(if jsonObj.title?.length > 102 then jsonObj.title.substring(0, 102) + '...' else jsonObj.title) @gibs(@getValueForTag('extra.gibs')) @nrt = jsonObj.collection_data_type == "NEAR_REAL_TIME" @granuleCount(jsonObj.granule_count) for own key, value of jsonObj this[key] = value unless ko.isObservable(this[key]) @_loadDatasource() @granuleDatasource()?.updateFromCollectionData?(jsonObj) if @granuleDatasourceName() && @granuleDatasourceName() != 'cmr' @has_granules = @canFocus() _setObservable: (prop, jsonObj) => this[prop] ?= ko.observable(undefined) this[prop](jsonObj[prop] ? this[prop]()) has_feature: (key) -> @getValueForTag("features.#{key}") exports = Collection
true
#= require models/data/granules #= require models/data/service_options #= require models/handoff/giovanni ns = @edsc.models.data ns.Collection = do (ko DetailsModel = @edsc.models.DetailsModel scalerUrl = @edsc.config.browseScalerUrl thumbnailWidth = @edsc.config.thumbnailWidth Granules = ns.Granules GranuleQuery = ns.query.GranuleQuery ServiceOptionsModel = ns.ServiceOptions toParam=jQuery.param extend=jQuery.extend ajax = @edsc.util.xhr.ajax dateUtil = @edsc.util.date stringUtil = @edsc.util.string config = @edsc.config GiovanniHandoffModel = @edsc.models.handoff.GiovanniHandoff ) -> openSearchKeyToEndpoint = cwic: (collection) -> collections = ko.observableArray() randomKey = PI:KEY:<KEY>END_PI.PI:KEY:<KEY>END_PI() register = (collection) -> collection.reference() collections.push(collection) collection class Collection extends DetailsModel @awaitDatasources: (collections, callback) -> calls = collections.length aggregation = -> calls-- callback(collections) if calls == 0 for collection in collections collection.granuleDatasourceAsync(aggregation) @findOrCreate: (jsonData, query) -> id = jsonData.id for collection in collections() if collection.id == id if (jsonData.short_name? && !collection.hasAtomData()) || jsonData.granule_count != collection.granule_count collection.fromJson(jsonData) return collection.reference() register(new Collection(jsonData, query, randomKey)) @visible: ko.computed read: -> collection for collection in collections() when collection.visible() constructor: (jsonData, @query, inKey) -> throw "Collections should not be constructed directly" unless inKey == randomKey @granuleCount = ko.observable(0) @hasAtomData = ko.observable(false) @orbitFriendly = ko.observable(false) @details = @asyncComputed({}, 100, @_computeCollectionDetails, this) @detailsLoaded = ko.observable(false) @gibs = ko.observable(null) @gibsLayers = ko.computed( (-> available = [] if @gibs() available.push('Antarctic') if @gibs()[0].antarctic available.push('Arctic') if @gibs()[0].arctic available.push('Geographic') if @gibs()[0].geo if available.length == 0 available.push("None") return available.join(", ")), this) @spatial = @computed(@_computeSpatial, this, deferEvaluation: true) @timeRange = @computed(@_computeTimeRange, this, deferEvaluation: true) @granuleDescription = @computed(@_computeGranuleDescription, this, deferEvaluation: true) @granuleDatasource = ko.observable(null) @_renderers = [] @_pendingRenderActions = [] @osddUrl = @computed(@_computeOsddUrl, this, deferEvaluation: true) @cwic = @computed((-> @granuleDatasourceName() == 'cwic'), this, deferEvaluation: true) @granuleIds = @computed read: => @granuleQuery.granuleIds().replace(/\s\n/g, ', ') write: (value) => @granuleQuery.granuleIds(value.split(/[,\s\n]\s*/g).join(", ")) deferEvaluation: true @visible = ko.observable(false) @disposable(@visible.subscribe(@_visibilityChange)) @fromJson(jsonData) @spatial_constraint = @computed => if @points? 'point:' + @points[0].split(/\s+/).reverse().join(',') else null @echoGranulesUrl = @computed read: => if @granuleDatasourceName() == 'cmr' && @granuleDatasource() _cloneQueryParams = (obj) -> return obj if obj is null or typeof (obj) isnt "object" temp = new obj.constructor() for key of obj temp[key] = _cloneQueryParams(obj[key]) temp queryParams = _cloneQueryParams(@granuleDatasource().toQueryParams()) delete queryParams['datasource'] if queryParams['datasource'] paramStr = toParam(queryParams) "#{@details().granule_url}?#{paramStr}" deferEvaluation: true @availableFilters = @computed(@_computeAvailableFilters, this, deferEvaluation: true) @isMaxOrderSizeReached = @computed(@_computeMaxOrderSize, this, deferEvaluation: true) @isProjectCollection = ko.observable(false) handoffUrls: => urls = [] for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 # Strip off just handoffProvider = tag.split('.')[3] # TODO: There has to be a pattern that allows for dynamic instantation of these objects if handoffProvider == 'giovanni' urls.push(new GiovanniHandoffModel(@query, this)) urls handoffTags: -> tag for tag, details of @tags() when tag.indexOf('edsc.extra.handoff') != -1 _computeMaxOrderSize: -> hits = 0 hits = @granuleDatasource().data().hits() if @granuleDatasource() limit = -1 limit = @tags()['edsc.limited_collections']['data']['limit'] if @tags() && @tags()['edsc.limited_collections'] if limit == -1 false else hits > limit # Since CMR doesn't support this feature, we get them from the granules that are already loaded. _computeAvailableFilters: -> _capabilities = {} # The following 'preloads' the available capabilities - this is necessary if zero granules are returned from a query. # @orbitFriendly is there to remind the app that it accepts orbit parameters in the granules filter _capabilities['orbit_calculated_spatial_domains'] = true if @orbitFriendly() # Loop for each loaded granules, as long as we found one that capable of day/night filtering or cloud cover filtering, # it stops. for _granule in @cmrGranulesModel.results() _capabilities['day_night_flag'] = true if _granule.day_night_flag? && _granule.day_night_flag.toUpperCase() in ['DAY', 'NIGHT', 'BOTH'] _capabilities['cloud_cover'] = true if _granule.cloud_cover? _capabilities['orbit_calculated_spatial_domains'] = true if _granule.orbit_calculated_spatial_domains? # if we see it once, then we know it's 'orbitFriendly' @orbitFriendly(true) if _granule.orbit_calculated_spatial_domains? break if _capabilities['day_night_flag'] && _capabilities['cloud_cover'] && _capabilities['orbit_calculated_spatial_domains'] _capabilities _computeTimeRange: -> if @hasAtomData() result = dateUtil.timeSpanToIsoDate(@time_start, @time_end) (result || "Unknown") _computeSpatial: -> (@_spatialString("Bounding Rectangles", @boxes) ? @_spatialString("Points", @points) ? @_spatialString("Polygons", @polygons) ? @_spatialString("Lines", @lines)) _spatialString: (title, spatial) -> if spatial suffix = if spatial.length > 1 then " ..." else "" "#{title}: #{spatial[0]}#{suffix}" else null _computeGranuleDescription: -> result = null return result unless @hasAtomData() @granuleDatasource()?.granuleDescription() ? 'Collection only' _computeOsddUrl: -> url = @osdd_url() ? @details()?.osdd_url if url separator = if url.indexOf('?') == -1 then '?' else '&' url += "#{separator}clientId=#{config.cmrClientId}" url thumbnail: -> granule = @browseable_granule collection_id = @id for link in @links when link['rel'].indexOf('browse#') > -1 if @links? if collection_id? "#{scalerUrl}/browse_images/datasets/#{collection_id}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else if granule? "#{scalerUrl}/browse_images/granules/#{granule}?h=#{thumbnailWidth}&w=#{thumbnailWidth}" else "#{scalerUrl}/image-unavailable.svg" granuleFiltersApplied: -> @granuleDatasource()?.hasQueryConfig() shouldDispose: -> result = !@granuleFiltersApplied() collections.remove(this) if result result granuleDatasourceName: -> datasource = @getValueForTag('datasource') if datasource return datasource else if @has_granules return "cmr" else return null granuleRendererNames: -> renderers = @getValueForTag('renderers') if renderers return renderers if renderers.constructor is Array return renderers.split(',') else if @has_granules return ["cmr"] else return [] _visibilityChange: (visible) => # TODO: Visibility continues to be too coupled to collections action = if visible then 'startSearchView' else 'endSearchView' @notifyRenderers(action) destroy: -> @_unloadDatasource() @_unloadRenderers() super() notifyRenderers: (action) -> @_loadRenderers() if @_loading @_pendingRenderActions.push(action) else for renderer in @_renderers renderer[action]?() _loadRenderers: -> names = @granuleRendererNames() loaded = names.join(',') if loaded.length > 0 && loaded != @_currentRenderers @_loading = true @_currentRenderers = loaded @_unloadRenderers() expected = names.length onload = (PluginClass, facade) => renderer = new PluginClass(facade, this) @_renderers.push(renderer) for action in @_pendingRenderActions renderer[action]?() oncomplete = => expected -= 1 if expected == 0 @_loading = false @_pendingRenderActions = [] for renderer in names edscplugin.load "renderer.#{renderer}", onload, oncomplete _unloadRenderers: -> renderer.destroy() for renderer in @_renderers @_renderers = [] _loadDatasource: -> desiredName = @granuleDatasourceName() if desiredName && @_currentName != desiredName @_currentName = desiredName @_unloadDatasource() onload = (PluginClass, facade) => datasource = new PluginClass(facade, this) @_currentName = desiredName @_unloadDatasource() @granuleDatasource(@disposable(datasource)) oncomplete = => if @_datasourceListeners for listener in @_datasourceListeners listener(@granuleDatasource()) @_datasourceListeners = null edscplugin.load "datasource.#{desiredName}", onload, oncomplete _unloadDatasource: -> if @granuleDatasource() @granuleDatasource().destroy() @granuleDatasource(null) granuleDatasourceAsync: (callback) -> if !@canFocus() || @granuleDatasource() callback(@granuleDatasource()) else @_datasourceListeners ?= [] @_datasourceListeners.push(callback) getValueForTag: (key) -> tags = @tags() if tags && tags.constructor is Array prefix = "#{config.cmrTagNamespace}.#{key}." len = prefix.length for tag in tags tag = tag.join('.') if tag.constructor is Array return tag.substr(len) if tag.substr(0, len) == prefix else key = PI:KEY:<KEY>END_PI tags?[key]?.data canFocus: -> @hasAtomData() && @granuleDatasourceName()? org: -> if @organizations?.length > 0 @organizations[0] else @archive_center metadata_url: (collection, e) -> win = window.open(@details()["#{e.target.attributes['data-metadata-type'].value.toLowerCase()}_url"], '_blank') win.focus() fromJson: (jsonObj) -> @json = jsonObj if jsonObj.short_name? then @short_name = ko.observable(jsonObj.short_name) else @short_name = ko.observable('N/A') @hasAtomData(jsonObj.short_name?) @_setObservable('opendap', jsonObj) @_setObservable('opendap_url', jsonObj) @_setObservable('modaps', jsonObj) @_setObservable('osdd_url', jsonObj) @_setObservable('tags', jsonObj) @_setObservable('granule_hits', jsonObj) @_setObservable('total_size', jsonObj) @_setObservable('unit', jsonObj) @_setObservable('has_spatial_subsetting', jsonObj) @_setObservable('has_transforms', jsonObj) @_setObservable('has_formats', jsonObj) @_setObservable('has_variables', jsonObj) @_setObservable('associations', jsonObj) @truncatedTitle = ko.observable(if jsonObj.title?.length > 102 then jsonObj.title.substring(0, 102) + '...' else jsonObj.title) @gibs(@getValueForTag('extra.gibs')) @nrt = jsonObj.collection_data_type == "NEAR_REAL_TIME" @granuleCount(jsonObj.granule_count) for own key, value of jsonObj this[key] = value unless ko.isObservable(this[key]) @_loadDatasource() @granuleDatasource()?.updateFromCollectionData?(jsonObj) if @granuleDatasourceName() && @granuleDatasourceName() != 'cmr' @has_granules = @canFocus() _setObservable: (prop, jsonObj) => this[prop] ?= ko.observable(undefined) this[prop](jsonObj[prop] ? this[prop]()) has_feature: (key) -> @getValueForTag("features.#{key}") exports = Collection
[ { "context": "###\n# @author Argi Karunia <https://github.com/hkyo89>\n# @author Teddy Hong", "end": 27, "score": 0.999897301197052, "start": 15, "tag": "NAME", "value": "Argi Karunia" }, { "context": "###\n# @author Argi Karunia <https://github.com/hkyo89>\n# @author Teddy Hong <teddy.hong11@gmail.com>\n#", "end": 54, "score": 0.9995476603507996, "start": 48, "tag": "USERNAME", "value": "hkyo89" }, { "context": "rgi Karunia <https://github.com/hkyo89>\n# @author Teddy Hong <teddy.hong11@gmail.com>\n# @link https://githu", "end": 77, "score": 0.9998874664306641, "start": 67, "tag": "NAME", "value": "Teddy Hong" }, { "context": "https://github.com/hkyo89>\n# @author Teddy Hong <teddy.hong11@gmail.com>\n# @link https://github.com/tokopedia/nodame\n#", "end": 101, "score": 0.9999318718910217, "start": 79, "tag": "EMAIL", "value": "teddy.hong11@gmail.com" }, { "context": "y.hong11@gmail.com>\n# @link https://github.com/tokopedia/nodame\n# @license http://opensource.org/licenses/", "end": 142, "score": 0.9940716624259949, "start": 133, "tag": "USERNAME", "value": "tokopedia" } ]
src/router.coffee
tokopedia/nodame
2
### # @author Argi Karunia <https://github.com/hkyo89> # @author Teddy Hong <teddy.hong11@gmail.com> # @link https://github.com/tokopedia/nodame # @license http://opensource.org/licenses/MIT # # @version 1.0.0 ### MODULES = nodame.config('module') Session = require('./session') class Router locals: (req, res, next) -> if req.query.refback? res.locals.refback = refback next() return constructor: (app) -> @default_module = MODULES.default @forbidden = MODULES.forbidden @modules = MODULES.items @hostname = nodame.config('url.hostname') @root = "#{nodame.config('module.root')}" # normalize root path if @root.length > 1 unless @root[0] is '/' @root = "/#{@root}" if @root[@root.length - 1] is '/' @root = @root.slice(0, -1) else if @root[0] is '/' @root = '' # Run session evaluation middleware app.use((new Session()).middleware) # Register modules for mod of @modules # Assign config config = @modules[mod] # Check if module is enabled and not default module if config.enable and module isnt '__default' # Check whether it's development only module continue if config.dev_only and !nodame.isDev() # Load handler handler = nodame.require "handler/#{mod}" route = "#{@root}" # Check access restriction if mod isnt @default_module then route += "/#{mod}" else default_route = "#{route}/#{mod}" # Init middleware if config.middleware middleware = nodame.require "middleware/#{mod}" app.use "#{route}/", middleware.init # Init module, only if it's not set as "xhr only" unless config.ajax and config.xhr_only app.use "#{route}/", handler # Enable access to default route using its module name app.use "#{default_route}/", handler if mod is @default_module # Init xhr app.use "#{@root}/ajax/#{mod}/", handler if config.ajax return redirectNotFound: (req, res) -> res.redirect("#{@hostname}#{@root}") res.end return module.exports = Router
200673
### # @author <NAME> <https://github.com/hkyo89> # @author <NAME> <<EMAIL>> # @link https://github.com/tokopedia/nodame # @license http://opensource.org/licenses/MIT # # @version 1.0.0 ### MODULES = nodame.config('module') Session = require('./session') class Router locals: (req, res, next) -> if req.query.refback? res.locals.refback = refback next() return constructor: (app) -> @default_module = MODULES.default @forbidden = MODULES.forbidden @modules = MODULES.items @hostname = nodame.config('url.hostname') @root = "#{nodame.config('module.root')}" # normalize root path if @root.length > 1 unless @root[0] is '/' @root = "/#{@root}" if @root[@root.length - 1] is '/' @root = @root.slice(0, -1) else if @root[0] is '/' @root = '' # Run session evaluation middleware app.use((new Session()).middleware) # Register modules for mod of @modules # Assign config config = @modules[mod] # Check if module is enabled and not default module if config.enable and module isnt '__default' # Check whether it's development only module continue if config.dev_only and !nodame.isDev() # Load handler handler = nodame.require "handler/#{mod}" route = "#{@root}" # Check access restriction if mod isnt @default_module then route += "/#{mod}" else default_route = "#{route}/#{mod}" # Init middleware if config.middleware middleware = nodame.require "middleware/#{mod}" app.use "#{route}/", middleware.init # Init module, only if it's not set as "xhr only" unless config.ajax and config.xhr_only app.use "#{route}/", handler # Enable access to default route using its module name app.use "#{default_route}/", handler if mod is @default_module # Init xhr app.use "#{@root}/ajax/#{mod}/", handler if config.ajax return redirectNotFound: (req, res) -> res.redirect("#{@hostname}#{@root}") res.end return module.exports = Router
true
### # @author PI:NAME:<NAME>END_PI <https://github.com/hkyo89> # @author PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> # @link https://github.com/tokopedia/nodame # @license http://opensource.org/licenses/MIT # # @version 1.0.0 ### MODULES = nodame.config('module') Session = require('./session') class Router locals: (req, res, next) -> if req.query.refback? res.locals.refback = refback next() return constructor: (app) -> @default_module = MODULES.default @forbidden = MODULES.forbidden @modules = MODULES.items @hostname = nodame.config('url.hostname') @root = "#{nodame.config('module.root')}" # normalize root path if @root.length > 1 unless @root[0] is '/' @root = "/#{@root}" if @root[@root.length - 1] is '/' @root = @root.slice(0, -1) else if @root[0] is '/' @root = '' # Run session evaluation middleware app.use((new Session()).middleware) # Register modules for mod of @modules # Assign config config = @modules[mod] # Check if module is enabled and not default module if config.enable and module isnt '__default' # Check whether it's development only module continue if config.dev_only and !nodame.isDev() # Load handler handler = nodame.require "handler/#{mod}" route = "#{@root}" # Check access restriction if mod isnt @default_module then route += "/#{mod}" else default_route = "#{route}/#{mod}" # Init middleware if config.middleware middleware = nodame.require "middleware/#{mod}" app.use "#{route}/", middleware.init # Init module, only if it's not set as "xhr only" unless config.ajax and config.xhr_only app.use "#{route}/", handler # Enable access to default route using its module name app.use "#{default_route}/", handler if mod is @default_module # Init xhr app.use "#{@root}/ajax/#{mod}/", handler if config.ajax return redirectNotFound: (req, res) -> res.redirect("#{@hostname}#{@root}") res.end return module.exports = Router
[ { "context": "ail) ->\n\n accountInstance = new Account('foo@example.com')\n accountPlain = {}\n for key, ", "end": 8960, "score": 0.9998964071273804, "start": 8945, "tag": "EMAIL", "value": "foo@example.com" }, { "context": ">\n class Account\n constructor: (@email) ->\n\n account1 = new Account('foo@exampl", "end": 9841, "score": 0.8422240614891052, "start": 9834, "tag": "USERNAME", "value": "(@email" }, { "context": "r: (@email) ->\n\n account1 = new Account('foo@example.com')\n account2 = new Account('bar@example.c", "end": 9896, "score": 0.9999238848686218, "start": 9881, "tag": "EMAIL", "value": "foo@example.com" }, { "context": "o@example.com')\n account2 = new Account('bar@example.com')\n\n expect(up.util.isEqual(account1, acc", "end": 9948, "score": 0.9999240636825562, "start": 9933, "tag": "EMAIL", "value": "bar@example.com" }, { "context": ">\n class Account\n constructor: (@email) ->\n \"#{up.util.isEqual.key}\": (other)", "end": 10201, "score": 0.8870329856872559, "start": 10194, "tag": "USERNAME", "value": "(@email" }, { "context": "== other.email\n\n account1 = new Account('foo@example.com')\n account2 = new Account('bar@example.c", "end": 10341, "score": 0.9999233484268188, "start": 10326, "tag": "EMAIL", "value": "foo@example.com" }, { "context": "o@example.com')\n account2 = new Account('bar@example.com')\n account3 = new Account('foo@example.c", "end": 10393, "score": 0.999920666217804, "start": 10378, "tag": "EMAIL", "value": "bar@example.com" }, { "context": "r@example.com')\n account3 = new Account('foo@example.com')\n\n expect(up.util.isEqual(account1, acc", "end": 10445, "score": 0.9999215006828308, "start": 10430, "tag": "EMAIL", "value": "foo@example.com" }, { "context": ">\n class Account\n constructor: (@email) ->\n\n account = new Account('foo@example", "end": 10698, "score": 0.8961420655250549, "start": 10691, "tag": "USERNAME", "value": "(@email" }, { "context": "or: (@email) ->\n\n account = new Account('foo@example.com')\n\n expect(up.util.isEqual(account, 'foo", "end": 10752, "score": 0.9999243021011353, "start": 10737, "tag": "EMAIL", "value": "foo@example.com" }, { "context": "com')\n\n expect(up.util.isEqual(account, 'foo@example.com')).toBe(false)\n\n describe 'up.util.isElementis", "end": 10814, "score": 0.999921441078186, "start": 10799, "tag": "EMAIL", "value": "foo@example.com" } ]
spec/unpoly/util_spec.js.coffee
adam12/unpoly
0
u = up.util e = up.element $ = jQuery describe 'up.util', -> describe 'JavaScript functions', -> describe 'up.util.isEqual', -> describe 'for an Element', -> it 'returns true for the same Element reference', -> div = document.createElement('div') expect(up.util.isEqual(div, div)).toBe(true) it 'returns false for a different Element reference', -> div1 = document.createElement('div') div2 = document.createElement('div') expect(up.util.isEqual(div1, div2)).toBe(false) it 'returns false for a value this is no Element', -> div = document.createElement('div') expect(up.util.isEqual(div, 'other')).toBe(false) describe 'for an Array', -> it 'returns true for a different Array reference with the same elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'bar'] expect(up.util.isEqual(array1, array2)).toBe(true) it 'returns false for an Array with different elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'qux'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a suffix', -> array1 = ['foo', 'bar'] array2 = [ 'bar'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a prefix', -> array1 = ['foo', 'bar'] array2 = ['foo' ] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns true for a NodeList with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] nodeList = parent.querySelectorAll('.child') expect(up.util.isEqual(array, nodeList)).toBe(true) it 'returns true for a HTMLCollection with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] htmlCollection = parent.children expect(up.util.isEqual(array, htmlCollection)).toBe(true) it 'returns true for an arguments object with the same elements', -> toArguments = -> return arguments array = ['foo', 'bar'] args = toArguments('foo', 'bar') expect(up.util.isEqual(array, args)).toBe(true) it 'returns false for a value that is no Array', -> array = ['foo', 'bar'] expect(up.util.isEqual(array, 'foobar')).toBe(false) describe 'for a string', -> it 'returns true for a different string reference with the same characters', -> string1 = 'bar' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(true) it 'returns false for a string with different characters', -> string1 = 'foo' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(false) it 'returns true for a String() object with the same characters', -> stringLiteral = 'bar' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(true) it 'returns false for a String() object with different characters', -> stringLiteral = 'foo' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(false) it 'returns false for a value that is no string', -> expect(up.util.isEqual('foo', ['foo'])).toBe(false) describe 'for a number', -> it 'returns true for a different number reference with the same integer value', -> number1 = 123 number2 = 123 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns true for a different number reference with the same floating point value', -> number1 = 123.4 number2 = 123.4 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns false for a number with a different value', -> number1 = 123 number2 = 124 expect(up.util.isEqual(number1, number2)).toBe(false) it 'returns true for a Number() object with the same value', -> numberLiteral = 123 numberObject = new Number(123) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(true) it 'returns false for a Number() object with a different value', -> numberLiteral = 123 numberObject = new Object(124) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(false) it 'returns false for a value that is no number', -> expect(up.util.isEqual(123, '123')).toBe(false) describe 'for undefined', -> it 'returns true for undefined', -> expect(up.util.isEqual(undefined, undefined)).toBe(true) it 'returns false for null', -> expect(up.util.isEqual(undefined, null)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(undefined, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(undefined, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(undefined, '')).toBe(false) describe 'for null', -> it 'returns true for null', -> expect(up.util.isEqual(null, null)).toBe(true) it 'returns false for undefined', -> expect(up.util.isEqual(null, undefined)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(null, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(null, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(null, '')).toBe(false) describe 'for NaN', -> it "returns false for NaN because it represents multiple values", -> expect(up.util.isEqual(NaN, NaN)).toBe(false) it 'returns false for null', -> expect(up.util.isEqual(NaN, null)).toBe(false) it 'returns false for undefined', -> expect(up.util.isEqual(NaN, undefined)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(NaN, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(NaN, '')).toBe(false) describe 'for a Date', -> it 'returns true for another Date object that points to the same millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for another Date object that points to another millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:01') expect(up.util.isEqual(d1, d2)).toBe(false) it 'returns true for another Date object that points to the same millisecond in another time zone', -> d1 = new Date('2019-01-20T17:35:00+01:00') d2 = new Date('2019-01-20T16:35:00+00:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for a value that is not a Date', -> d1 = new Date('1995-12-17T03:24:00') d2 = '1995-12-17T03:24:00' expect(up.util.isEqual(d1, d2)).toBe(false) describe 'for a plain Object', -> it 'returns true for the same reference', -> obj = {} reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns true for another plain object with the same keys and values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(true) it 'returns false for another plain object with the same keys, but different values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'qux' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that is missing a key', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that has an additional key', -> obj1 = { foo: 'bar' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a non-plain Object, even if it has the same keys and values', -> class Account constructor: (@email) -> accountInstance = new Account('foo@example.com') accountPlain = {} for key, value of accountInstance accountPlain[key] = value expect(up.util.isEqual(accountPlain, accountInstance)).toBe(false) it 'returns false for a value that is no object', -> obj = { foo: 'bar' } expect(up.util.isEqual(obj, 'foobar')).toBe(false) describe 'for a non-Plain object', -> it 'returns true for the same reference', -> obj = new FormData() reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns false for different references', -> obj1 = new FormData() obj2 = new FormData() expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a different object with the same keys and values', -> class Account constructor: (@email) -> account1 = new Account('foo@example.com') account2 = new Account('bar@example.com') expect(up.util.isEqual(account1, account2)).toBe(false) it 'allows the object to hook into the comparison protocol by implementing a method called `up.util.isEqual.key`', -> class Account constructor: (@email) -> "#{up.util.isEqual.key}": (other) -> @email == other.email account1 = new Account('foo@example.com') account2 = new Account('bar@example.com') account3 = new Account('foo@example.com') expect(up.util.isEqual(account1, account2)).toBe(false) expect(up.util.isEqual(account1, account3)).toBe(true) it 'returns false for a value that is no object', -> class Account constructor: (@email) -> account = new Account('foo@example.com') expect(up.util.isEqual(account, 'foo@example.com')).toBe(false) describe 'up.util.isElementish', -> it 'returns true for an element', -> value = document.body expect(up.util.isElementish(value)).toBe(true) it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for an array of elements', -> value = [document.body] expect(up.util.isElementish(value)).toBe(true) it 'returns false for an array of non-element values', -> value = ['foo'] expect(up.util.isElementish(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isElementish(value)).toBe(false) it 'returns true for the document', -> value = document expect(up.util.isElementish(value)).toBe(true) it 'returns true for the window', -> value = window expect(up.util.isElementish(value)).toBe(true) describe 'up.util.flatMap', -> it 'collects the Array results of the given map function, then concatenates the result arrays into one flat array', -> fun = (x) -> [x, x] result = up.util.flatMap([1, 2, 3], fun) expect(result).toEqual([1, 1, 2, 2, 3, 3]) it 'builds an array from mixed function return values of scalar values and lists', -> fun = (x) -> if x == 1 1 else [x, x] result = up.util.flatMap([0, 1, 2], fun) expect(result).toEqual [0, 0, 1, 2, 2] it 'flattens return values that are NodeLists', -> fun = (selector) -> document.querySelectorAll(selector) foo1 = $fixture('.foo-element')[0] foo2 = $fixture('.foo-element')[0] bar = $fixture('.bar-element')[0] result = up.util.flatMap(['.foo-element', '.bar-element'], fun) expect(result).toEqual [foo1, foo2, bar] describe 'up.util.uniq', -> it 'returns the given array with duplicates elements removed', -> input = [1, 2, 1, 1, 3] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3] it 'works on DOM elements', -> one = document.createElement("div") two = document.createElement("div") input = [one, one, two, two] result = up.util.uniq(input) expect(result).toEqual [one, two] it 'preserves insertion order', -> input = [1, 2, 3, 4, 2, 1] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3, 4] # describe 'up.util.uniqBy', -> # # it 'returns the given array with duplicate elements removed, calling the given function to determine value for uniqueness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, (element) -> element.length) # expect(result).toEqual ['foo', 'apple', 'orange'] # # it 'accepts a property name instead of a function, which collects that property from each item to compute uniquness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, 'length') # expect(result).toEqual ['foo', 'apple', 'orange'] # describe 'up.util.parsePath', -> # # it 'parses a plain name', -> # path = up.util.parsePath("foo") # expect(path).toEqual ['foo'] # # it 'considers underscores to be part of a name', -> # path = up.util.parsePath("foo_bar") # expect(path).toEqual ['foo_bar'] # # it 'considers dashes to be part of a name', -> # path = up.util.parsePath("foo-bar") # expect(path).toEqual ['foo-bar'] # # it 'parses dot-separated names into multiple path segments', -> # path = up.util.parsePath('foo.bar.baz') # expect(path).toEqual ['foo', 'bar', 'baz'] # # it 'parses nested params notation with square brackets', -> # path = up.util.parsePath('user[account][email]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses double quotes in square brackets', -> # path = up.util.parsePath('user["account"]["email"]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses single quotes in square brackets', -> # path = up.util.parsePath("user['account']['email']") # expect(path).toEqual ['user', 'account', 'email'] # # it 'allows square brackets inside quotes', -> # path = up.util.parsePath("element['a[up-href]']") # expect(path).toEqual ['element', 'a[up-href]'] # # it 'allows single quotes inside double quotes', -> # path = up.util.parsePath("element[\"a[up-href='foo']\"]") # expect(path).toEqual ['element', "a[up-href='foo']"] # # it 'allows double quotes inside single quotes', -> # path = up.util.parsePath("element['a[up-href=\"foo\"]']") # expect(path).toEqual ['element', 'a[up-href="foo"]'] # # it 'allows dots in square brackets when it is quoted', -> # path = up.util.parsePath('elements[".foo"]') # expect(path).toEqual ['elements', '.foo'] # # it 'allows different notation for each segment', -> # path = up.util.parsePath('foo.bar[baz]["bam"][\'qux\']') # expect(path).toEqual ['foo', 'bar', 'baz', 'bam', 'qux'] describe 'up.util.parseURL', -> it 'parses a full URL', -> url = up.util.parseURL('https://subdomain.domain.tld:123/path?search#hash') expect(url.protocol).toEqual('https:') expect(url.hostname).toEqual('subdomain.domain.tld') expect(url.port).toEqual('123') expect(url.pathname).toEqual('/path') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#hash') it 'parses an absolute path', -> url = up.util.parseURL('/qux/foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'parses a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') url = up.util.parseURL('foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element', -> link = document.createElement('a') link.href = '/qux/foo?search#bar' url = up.util.parseURL(link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element as a jQuery collection', -> $link = $('<a></a>').attr(href: '/qux/foo?search#bar') url = up.util.parseURL($link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') describe 'up.util.map', -> it 'creates a new array of values by calling the given function on each item of the given array', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element) -> element.length) expect(mapped).toEqual [5, 6, 8] it 'accepts a property name instead of a function, which collects that property from each item', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, 'length') expect(mapped).toEqual [5, 6, 8] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element, i) -> i) expect(mapped).toEqual [0, 1, 2] it 'maps over a NodeList collection', -> one = fixture('.qwertz[data-value=one]') two = fixture('.qwertz[data-value=two]') collection = document.querySelectorAll('.qwertz') result = up.util.map(collection, (elem) -> elem.dataset.value) expect(result).toEqual ['one', 'two'] it 'maps over a jQuery collection', -> one = fixture('.one') two = fixture('.two') collection = jQuery([one, two]) result = up.util.map(collection, 'className') expect(result).toEqual ['one', 'two'] describe 'up.util.mapObject', -> it 'creates an object from the given array and pairer', -> array = ['foo', 'bar', 'baz'] object = up.util.mapObject(array, (str) -> ["#{str}Key", "#{str}Value"]) expect(object).toEqual fooKey: 'fooValue' barKey: 'barValue' bazKey: 'bazValue' describe 'up.util.each', -> it 'calls the given function once for each item of the given array', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item) -> args.push(item) expect(args).toEqual ["apple", "orange", "cucumber"] it 'passes the iteration index as second argument to the given function', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item, index) -> args.push(index) expect(args).toEqual [0, 1, 2] it 'iterates over a NodeList', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] it 'iterates over a jQuery collection', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = jQuery([one, two]) callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.filter', -> it 'returns an array of those elements in the given array for which the given function returns true', -> array = ["foo", "orange", "cucumber"] results = up.util.filter array, (item) -> item.length > 3 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.filter array, (item, index) -> index % 2 == 0 expect(results).toEqual ['apple', 'cucumber'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.filter array, 'prop' expect(results).toEqual [{ name: 'b', prop: true }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.filter nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.reject', -> it 'returns an array of those elements in the given array for which the given function returns false', -> array = ["foo", "orange", "cucumber"] results = up.util.reject array, (item) -> item.length < 4 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.reject array, (item, index) -> index % 2 == 0 expect(results).toEqual ['orange', 'banana'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.reject array, 'prop' expect(results).toEqual [{ name: 'a', prop: false }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.reject nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] # describe 'up.util.previewable', -> # # it 'wraps a function into a proxy function with an additional .promise attribute', -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # expect(u.isFunction(proxy)).toBe(true) # expect(u.isPromise(proxy.promise)).toBe(true) # expect(proxy()).toEqual('return value') # # it "resolves the proxy's .promise when the inner function returns", (done) -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # u.task -> # expect(callback).not.toHaveBeenCalled() # proxy() # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() # # it "delays resolution of the proxy's .promise if the inner function returns a promise", (done) -> # funDeferred = u.newDeferred() # fun = -> funDeferred # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # proxy() # u.task -> # expect(callback).not.toHaveBeenCalled() # funDeferred.resolve('return value') # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() describe 'up.util.sequence', -> it 'combines the given functions into a single function', -> values = [] one = -> values.push('one') two = -> values.push('two') three = -> values.push('three') sequence = up.util.sequence([one, two, three]) expect(values).toEqual([]) sequence() expect(values).toEqual(['one', 'two', 'three']) describe 'up.util.muteRejection', -> it 'returns a promise that fulfills when the given promise fulfills', (done) -> fulfilledPromise = Promise.resolve() mutedPromise = up.util.muteRejection(fulfilledPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'returns a promise that fulfills when the given promise rejects', (done) -> rejectedPromise = Promise.reject() mutedPromise = up.util.muteRejection(rejectedPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'does not leave an unhandled rejection when the given promise rejects', (done) -> rejectGivenPromise = null givenPromise = new Promise (resolve, reject) -> rejectGivenPromise = reject mutedPromise = up.util.muteRejection(givenPromise) u.task -> rejectGivenPromise() u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') expect(window).not.toHaveUnhandledRejections() done() describe 'up.util.simpleEase', -> it 'returns 0 for 0', -> expect(up.util.simpleEase(0)).toBe(0) it 'returns 1 for 1', -> expect(up.util.simpleEase(1)).toBe(1) it 'returns steadily increasing values between 0 and 1', -> expect(up.util.simpleEase(0.25)).toBeAround(0.25, 0.2) expect(up.util.simpleEase(0.50)).toBeAround(0.50, 0.2) expect(up.util.simpleEase(0.75)).toBeAround(0.75, 0.2) describe 'up.util.timer', -> it 'calls the given function after waiting the given milliseconds', (done) -> callback = jasmine.createSpy() expectNotCalled = -> expect(callback).not.toHaveBeenCalled() expectCalled = -> expect(callback).toHaveBeenCalled() up.util.timer(100, callback) expectNotCalled() setTimeout(expectNotCalled, 50) setTimeout(expectCalled, 50 + 75) setTimeout(done, 50 + 75) describe 'if the delay is zero', -> it 'calls the given function in the next execution frame', -> callback = jasmine.createSpy() up.util.timer(0, callback) expect(callback).not.toHaveBeenCalled() setTimeout((-> expect(callback).toHaveBeenCalled()), 0) # describe 'up.util.argNames', -> # # it 'returns an array of argument names for the given function', -> # fun = ($element, data) -> # expect(up.util.argNames(fun)).toEqual(['$element', 'data']) describe 'up.util.pick', -> it 'returns a copy of the given object with only the given whitelisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.pick(original, ['bar', 'bam']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'does not add empty keys to the returned object if the given object does not have that key', -> original = foo: 'foo-value' whitelisted = up.util.pick(original, ['foo', 'bar']) expect(whitelisted).toHaveOwnProperty('foo') expect(whitelisted).not.toHaveOwnProperty('bar') it 'copies properties that are computed by a getter', -> original = foo: 'foo-value' bar: 'bar-value' Object.defineProperty(original, 'baz', get: -> return 'baz-value') whitelisted = up.util.pick(original, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' it 'copies inherited properties', -> parent = foo: 'foo-value' child = Object.create(parent) child.bar = 'bar-value' child.baz = 'baz-value' whitelisted = up.util.pick(child, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' describe 'up.util.omit', -> it 'returns a copy of the given object but omits the given blacklisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.omit(original, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'copies inherited properties', -> parent = foo: 'foo-value' bar: 'bar-value' child = Object.create(parent) child.baz = 'baz-value' child.bam = 'bam-value' whitelisted = up.util.omit(child, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' describe 'up.util.every', -> it 'returns true if all element in the array returns true for the given function', -> result = up.util.every ['foo', 'bar', 'baz'], up.util.isPresent expect(result).toBe(true) it 'returns false if an element in the array returns false for the given function', -> result = up.util.every ['foo', 'bar', null, 'baz'], up.util.isPresent expect(result).toBe(false) it 'short-circuits once an element returns false', -> count = 0 up.util.every ['foo', 'bar', '', 'baz'], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.every array, (item, index) -> args.push(index) true expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> allTrue = [ { prop: true }, { prop: true } ] someFalse = [ { prop: true }, { prop: false } ] expect(up.util.every(allTrue, 'prop')).toBe(true) expect(up.util.every(someFalse, 'prop')).toBe(false) # describe 'up.util.none', -> # # it 'returns true if no element in the array returns true for the given function', -> # result = up.util.none ['foo', 'bar', 'baz'], up.util.isBlank # expect(result).toBe(true) # # it 'returns false if an element in the array returns false for the given function', -> # result = up.util.none ['foo', 'bar', null, 'baz'], up.util.isBlank # expect(result).toBe(false) # # it 'short-circuits once an element returns true', -> # count = 0 # up.util.none ['foo', 'bar', '', 'baz'], (element) -> # count += 1 # up.util.isBlank(element) # expect(count).toBe(3) # # it 'passes the iteration index as second argument to the given function', -> # array = ["apple", "orange", "cucumber"] # args = [] # up.util.none array, (item, index) -> # args.push(index) # false # expect(args).toEqual [0, 1, 2] # # it 'accepts a property name instead of a function, which collects that property from each item', -> # allFalse = [ { prop: false }, { prop: false } ] # someTrue = [ { prop: true }, { prop: false } ] # expect(up.util.none(allFalse, 'prop')).toBe(true) # expect(up.util.none(someTrue, 'prop')).toBe(false) describe 'up.util.some', -> it 'returns true if at least one element in the array returns true for the given function', -> result = up.util.some ['', 'bar', null], up.util.isPresent expect(result).toBe(true) it 'returns false if no element in the array returns true for the given function', -> result = up.util.some ['', null, undefined], up.util.isPresent expect(result).toBe(false) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.some array, (item, index) -> args.push(index) false expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> someTrue = [ { prop: true }, { prop: false } ] allFalse = [ { prop: false }, { prop: false } ] expect(up.util.some(someTrue, 'prop')).toBe(true) expect(up.util.some(allFalse, 'prop')).toBe(false) it 'short-circuits once an element returns true', -> count = 0 up.util.some [null, undefined, 'foo', ''], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.some nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.findResult', -> it 'consecutively applies the function to each array element and returns the first truthy return value', -> map = { a: '', b: null, c: undefined, d: 'DEH', e: 'EH' } fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c', 'd', 'e'], fn expect(result).toEqual('DEH') it 'returns undefined if the function does not return a truthy value for any element in the array', -> map = {} fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c'], fn expect(result).toBeUndefined() it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.findResult nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.isBlank', -> it 'returns false for false', -> expect(up.util.isBlank(false)).toBe(false) it 'returns false for true', -> expect(up.util.isBlank(true)).toBe(false) it 'returns true for null', -> expect(up.util.isBlank(null)).toBe(true) it 'returns true for undefined', -> expect(up.util.isBlank(undefined)).toBe(true) it 'returns true for an empty String', -> expect(up.util.isBlank('')).toBe(true) it 'returns false for a String with at least one character', -> expect(up.util.isBlank('string')).toBe(false) it 'returns true for an empty array', -> expect(up.util.isBlank([])).toBe(true) it 'returns false for an array with at least one element', -> expect(up.util.isBlank(['element'])).toBe(false) it 'returns true for an empty jQuery collection', -> expect(up.util.isBlank($([]))).toBe(true) it 'returns false for a jQuery collection with at least one element', -> expect(up.util.isBlank($('body'))).toBe(false) it 'returns true for an empty object', -> expect(up.util.isBlank({})).toBe(true) it 'returns false for a function', -> expect(up.util.isBlank((->))).toBe(false) it 'returns true for an object with at least one key', -> expect(up.util.isBlank({key: 'value'})).toBe(false) it 'returns true for an object with an [up.util.isBlank.key] method that returns true', -> value = {} value[up.util.isBlank.key] = -> true expect(up.util.isBlank(value)).toBe(true) it 'returns false for an object with an [up.util.isBlank.key] method that returns false', -> value = {} value[up.util.isBlank.key] = -> false expect(up.util.isBlank(value)).toBe(false) it 'returns false for a DOM element', -> value = document.body expect(up.util.isBlank(value)).toBe(false) describe 'up.util.normalizeURL', -> it 'normalizes a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') expect(up.util.normalizeURL('foo')).toBe("/qux/foo") it 'normalizes an absolute path', -> expect(up.util.normalizeURL('/foo')).toBe("/foo") it 'preserves a protocol and hostname for a URL from another domain', -> expect(up.util.normalizeURL('http://example.com/foo/bar')).toBe('http://example.com/foo/bar') it 'preserves a query string', -> expect(up.util.normalizeURL('/foo/bar?key=value')).toBe('/foo/bar?key=value') it 'strips a query string with { search: false } option', -> expect(up.util.normalizeURL('/foo/bar?key=value', search: false)).toBe('/foo/bar') describe 'trailing slashes', -> it 'does not strip a trailing slash by default', -> expect(up.util.normalizeURL('/foo/')).toEqual("/foo/") it 'strips a trailing slash with { trailingSlash: false }', -> expect(up.util.normalizeURL('/foo/', trailingSlash: false)).toEqual("/foo") it 'does not strip a trailing slash when passed the "/" URL', -> expect(up.util.normalizeURL('/', trailingSlash: false)).toEqual("/") it 'normalizes redundant segments', -> expect(up.util.normalizeURL('/foo/../foo')).toBe("/foo") describe 'hash fragments', -> it 'strips a #hash with { hash: false }', -> expect(up.util.normalizeURL('/foo/bar#fragment', hash: false)).toBe('/foo/bar') it 'preserves a #hash by default', -> expect(up.util.normalizeURL('/foo/bar#fragment')).toBe('/foo/bar#fragment') it 'puts a #hash behind the query string', -> expect(up.util.normalizeURL('/foo/bar?key=value#fragment')).toBe('/foo/bar?key=value#fragment') describe 'up.util.find', -> it 'finds the first element in the given array that matches the given tester', -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'b' expect(up.util.find(array, tester)).toEqual('bar') it "returns undefined if the given array doesn't contain a matching element", -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'z' expect(up.util.find(array, tester)).toBeUndefined() describe 'up.util.remove', -> it 'removes the given string from the given array', -> array = ['a', 'b', 'c'] up.util.remove(array, 'b') expect(array).toEqual ['a', 'c'] it 'removes the given object from the given array', -> obj1 = { 'key': 1 } obj2 = { 'key': 2 } obj3 = { 'key': 3 } array = [obj1, obj2, obj3] up.util.remove(array, obj2) expect(array).toEqual [obj1, obj3] it 'returns the removed value if the array was changed', -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'b') expect(returned).toBe('b') it "returns undefined if the given array didn't contain the given value", -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'd') expect(returned).toBeUndefined() describe 'up.util.unresolvablePromise', -> it 'return a pending promise', (done) -> promise = up.util.unresolvablePromise() promiseState(promise).then (result) -> expect(result.state).toEqual('pending') done() it 'returns a different object every time (to prevent memory leaks)', -> one = up.util.unresolvablePromise() two = up.util.unresolvablePromise() expect(one).not.toBe(two) describe 'up.util.flatten', -> it 'flattens the given array', -> array = [1, [2, 3], 4] expect(u.flatten(array)).toEqual([1, 2, 3, 4]) it 'only flattens one level deep for performance reasons', -> array = [1, [2, [3,4]], 5] expect(u.flatten(array)).toEqual([1, 2, [3, 4], 5]) describe 'up.util.renameKey', -> it 'renames a key in the given property', -> object = { a: 'a value', b: 'b value'} u.renameKey(object, 'a', 'c') expect(object.a).toBeUndefined() expect(object.b).toBe('b value') expect(object.c).toBe('a value') # describe 'up.util.offsetParent', -> # # it 'returns the first ascendant that has a "position" style', -> # $a = $fixture('.a') # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'does not return the given element, even when it has position', -> # $a = $fixture('.a').css(position: 'absolute') # $b = $a.affix('.b').css(position: 'relative') # # expect(up.util.offsetParent($b[0])).toBe($a[0]) # # it 'returns the <body> element if there is no closer offset parent', -> # $a = $fixture('.a') # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBe(document.body) # # it 'returns the offset parent for a detached element', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'returns a missing value (and not <body>) if the given detached element has no ancestor with position', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBeMissing() describe 'up.util.isCrossOrigin', -> it 'returns false for an absolute path', -> expect(up.util.isCrossOrigin('/foo')).toBe(false) it 'returns false for an relative path', -> expect(up.util.isCrossOrigin('foo')).toBe(false) it 'returns false for a fully qualified URL with the same protocol and hostname as the current location', -> fullURL = "#{location.protocol}//#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(false) it 'returns true for a fully qualified URL with a different protocol than the current location', -> fullURL = "otherprotocol://#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) it 'returns false for a fully qualified URL with a different hostname than the current location', -> fullURL = "#{location.protocol}//other-host.tld/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) describe 'up.util.isOptions', -> it 'returns true for an Object instance', -> expect(up.util.isOptions(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isOptions({ foo: 'bar'})).toBe(true) it 'returns true for a prototype-less object', -> expect(up.util.isOptions(Object.create(null))).toBe(true) it 'returns false for undefined', -> expect(up.util.isOptions(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isOptions(null)).toBe(false) it 'returns false for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isOptions(fn)).toBe(false) it 'returns false for an Array', -> expect(up.util.isOptions(['foo'])).toBe(false) it 'returns false for a jQuery collection', -> expect(up.util.isOptions($('body'))).toBe(false) it 'returns false for a Promise', -> expect(up.util.isOptions(Promise.resolve())).toBe(false) it 'returns false for a FormData object', -> expect(up.util.isOptions(new FormData())).toBe(false) it 'returns false for a Date', -> expect(up.util.isOptions(new Date())).toBe(false) it 'returns false for a RegExp', -> expect(up.util.isOptions(/foo/)).toBe(false) describe 'up.util.isObject', -> it 'returns true for an Object instance', -> expect(up.util.isObject(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isObject({ foo: 'bar'})).toBe(true) it 'returns false for undefined', -> expect(up.util.isObject(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isObject(null)).toBe(false) it 'returns true for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isObject(fn)).toBe(true) it 'returns true for an array', -> expect(up.util.isObject(['foo'])).toBe(true) it 'returns true for a jQuery collection', -> expect(up.util.isObject($('body'))).toBe(true) it 'returns true for a promise', -> expect(up.util.isObject(Promise.resolve())).toBe(true) it 'returns true for a FormData object', -> expect(up.util.isObject(new FormData())).toBe(true) describe 'up.util.merge', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'overrides (not merges) keys with object value', -> obj = { a: '1', b: { c: '2', d: '3' } } other = { e: '4', b: { f: '5', g: '6' }} obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', e: '4', b: { f: '5', g: '6' } } it 'ignores undefined arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, undefined) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(undefined, obj) expect(reverseResult).toEqual { a: 1, b: 2 } it 'ignores null arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, null) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(null, obj) expect(reverseResult).toEqual { a: 1, b: 2 } # it 'copies inherited values', -> # parent = { a: 1 } # child = Object.create(parent) # child.b = 2 # # result = up.util.merge(child, { c: 3 }) # expect(result).toEqual { a: 1, b: 2, c: 3 } describe 'up.util.mergeDefined', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'does not override values with an undefined value (unlike up.util.merge)', -> obj = { a: '1', b: '2' } other = { b: undefined, c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '2', c: '4' } # describe 'up.util.deepMerge', -> # # it 'recursively merges the given objects', -> # obj = { a: '1', b: { c: '2', d: '3' } } # other = { e: '4', b: { f: '5', g: '6' }} # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: '1', e: '4', b: { c: '2', d: '3', f: '5', g: '6' } } # # it 'ignores undefined arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, undefined) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(undefined, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'ignores null arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, null) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(null, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'overwrites (and does not concatenate) array values', -> # obj = { a: ['1', '2'] } # other = { a: ['3', '4'] } # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: ['3', '4'] } describe 'up.util.memoize', -> it 'returns a function that calls the memoized function', -> fun = (a, b) -> a + b memoized = u.memoize(fun) expect(memoized(2, 3)).toEqual(5) it 'returns the cached return value of the first call when called again', -> spy = jasmine.createSpy().and.returnValue(5) memoized = u.memoize(spy) expect(memoized(2, 3)).toEqual(5) expect(memoized(2, 3)).toEqual(5) expect(spy.calls.count()).toEqual(1) ['assign', 'assignPolyfill'].forEach (assignVariant) -> describe "up.util.#{assignVariant}", -> assign = up.util[assignVariant] it 'copies the second object into the first object', -> target = { a: 1 } source = { b: 2, c: 3 } assign(target, source) expect(target).toEqual { a: 1, b: 2, c: 3 } # Source is unchanged expect(source).toEqual { b: 2, c: 3 } it 'copies null property values', -> target = { a: 1, b: 2 } source = { b: null } assign(target, source) expect(target).toEqual { a: 1, b: null } it 'copies undefined property values', -> target = { a: 1, b: 2 } source = { b: undefined } assign(target, source) expect(target).toEqual { a: 1, b: undefined } it 'returns the first object', -> target = { a: 1 } source = { b: 2 } result = assign(target, source) expect(result).toBe(target) it 'takes multiple sources to copy from', -> target = { a: 1 } source1 = { b: 2, c: 3 } source2 = { d: 4, e: 5 } assign(target, source1, source2) expect(target).toEqual { a: 1, b: 2, c: 3, d: 4, e: 5 } describe 'up.util.copy', -> it 'returns a shallow copy of the given array', -> original = ['a', { b: 'c' }, 'd'] copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.pop() expect(copy.length).toBe(2) expect(original.length).toBe(3) # Test that the copy is shallow copy[1].x = 'y' expect(original[1].x).toEqual('y') it 'returns a shallow copy of the given plain object', -> original = {a: 'b', c: [1, 2], d: 'e'} copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.f = 'g' expect(original.f).toBeMissing() # Test that the copy is shallow copy.c.push(3) expect(original.c).toEqual [1, 2, 3] it 'allows custom classes to hook into the copy protocol by implementing a method named `up.util.copy.key`', -> class TestClass "#{up.util.copy.key}": -> return "custom copy" instance = new TestClass() expect(up.util.copy(instance)).toEqual("custom copy") it 'copies the given jQuery collection into an array', -> $one = $fixture('.one') $two = $fixture('.two') $collection = $one.add($two) copy = up.util.copy($collection) copy[0] = document.body expect($collection[0]).toBe($one[0]) it 'copies the given arguments object into an array', -> args = undefined (-> args = arguments)(1) copy = up.util.copy(args) expect(copy).toBeArray() copy[0] = 2 expect(args[0]).toBe(1) it 'returns the given string (which is immutable)', -> str = "foo" copy = up.util.copy(str) expect(copy).toBe(str) it 'returns the given number (which is immutable)', -> number = 123 copy = up.util.copy(number) expect(copy).toBe(number) it 'copies the given Date object', -> date = new Date('1995-12-17T03:24:00') expect(date.getFullYear()).toBe(1995) copy = up.util.copy(date) expect(copy.getFullYear()).toBe(date.getFullYear()) expect(copy.getHours()).toBe(date.getHours()) expect(copy.getMinutes()).toBe(date.getMinutes()) # Check that it's actually a copied object expect(copy).not.toBe(date) date.setFullYear(2018) expect(copy.getFullYear()).toBe(1995) # describe 'up.util.deepCopy', -> # # it 'returns a deep copy of the given array', -> # original = ['a', { b: 'c' }, 'd'] # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.pop() # expect(copy.length).toBe(2) # expect(original.length).toBe(3) # # # Test that the copy is deep # copy[1].x = 'y' # expect(original[1].x).toBeUndefined() # # it 'returns a deep copy of the given object', -> # original = {a: 'b', c: [1, 2], d: 'e'} # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.f = 'g' # expect(original.f).toBeMissing() # # # Test that the copy is deep # copy.c.push(3) # expect(original.c).toEqual [1, 2] describe 'up.util.isList', -> it 'returns true for an array', -> value = [1, 2, 3] expect(up.util.isList(value)).toBe(true) it 'returns true for an HTMLCollection', -> value = document.getElementsByTagName('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a jQuery collection', -> value = jQuery('body') expect(up.util.isList(value)).toBe(true) it 'returns true for an arguments object', -> value = undefined (-> value = arguments)() expect(up.util.isList(value)).toBe(true) it 'returns false for an object', -> value = { foo: 'bar' } expect(up.util.isList(value)).toBe(false) it 'returns false for a string', -> value = 'foo' expect(up.util.isList(value)).toBe(false) it 'returns false for a number', -> value = 123 expect(up.util.isList(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isList(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isList(value)).toBe(false) it 'returns false for NaN', -> value = NaN expect(up.util.isList(value)).toBe(false) describe 'up.util.isJQuery', -> it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isJQuery(value)).toBe(true) it 'returns false for a native element', -> value = document.body expect(up.util.isJQuery(value)).toBe(false) it 'returns false (and does not crash) for undefined', -> value = undefined expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object', -> value = window expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object if window.jquery (lowercase) is defined (bugfix)', -> window.jquery = '3.0.0' value = window expect(up.util.isJQuery(value)).toBe(false) delete window.jquery it 'returns false for the document object', -> value = document expect(up.util.isJQuery(value)).toBe(false) describe 'up.util.isPromise', -> it 'returns true for a Promise', -> value = new Promise(up.util.noop) expect(up.util.isPromise(value)).toBe(true) it 'returns true for an object with a #then() method', -> value = { then: -> } expect(up.util.isPromise(value)).toBe(true) it 'returns true for an up.Request', -> value = new up.Request(url: '/path') expect(up.util.isPromise(value)).toBe(true) it 'returns false for an object without a #then() method', -> value = { foo: '1' } expect(up.util.isPromise(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isPromise(value)).toBe(false) describe 'up.util.isRegExp', -> it 'returns true for a RegExp', -> value = /foo/ expect(up.util.isRegExp(value)).toBe(true) it 'returns false for a string', -> value = 'foo' expect(up.util.isRegExp(value)).toBe(false) it 'returns false for a undefined', -> value = undefined expect(up.util.isRegExp(value)).toBe(false) describe 'up.util.sprintf', -> describe 'with string argument', -> it 'serializes the string verbatim', -> formatted = up.util.sprintf('before %o after', 'argument') expect(formatted).toEqual('before argument after') describe 'with undefined argument', -> it 'serializes to the word "undefined"', -> formatted = up.util.sprintf('before %o after', undefined) expect(formatted).toEqual('before undefined after') describe 'with null argument', -> it 'serializes to the word "null"', -> formatted = up.util.sprintf('before %o after', null) expect(formatted).toEqual('before null after') describe 'with number argument', -> it 'serializes the number as string', -> formatted = up.util.sprintf('before %o after', 5) expect(formatted).toEqual('before 5 after') describe 'with function argument', -> it 'serializes the function code', -> formatted = up.util.sprintf('before %o after', `function foo() {}`) expect(formatted).toEqual('before function foo() { } after') describe 'with array argument', -> it 'recursively serializes the elements', -> formatted = up.util.sprintf('before %o after', [1, "foo"]) expect(formatted).toEqual('before [1, foo] after') describe 'with element argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element = $('<table id="id-value" name="name-value" class="class-value" title="title-value">') element = $element.get(0) formatted = up.util.sprintf('before %o after', element) expect(formatted).toEqual('before <table id="id-value" name="name-value" class="class-value"> after') describe 'with jQuery argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element1 = $('<table id="table-id">') $element2 = $('<ul id="ul-id">') formatted = up.util.sprintf('before %o after', $element1.add($element2)) expect(formatted).toEqual('before $(<table id="table-id">, <ul id="ul-id">) after') describe 'with object argument', -> it 'serializes to JSON', -> object = { foo: 'foo-value', bar: 'bar-value' } formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"foo":"foo-value","bar":"bar-value"} after') it 'serializes to a fallback string if the given structure has circular references', -> object = { foo: {} } object.foo.bar = object formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before (circular structure) after') it "skips a key if a getter crashes", -> object = {} Object.defineProperty(object, 'foo', get: (-> throw "error")) formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {} after') object.bar = 'bar' formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"bar":"bar"} after') describe 'up.util.renameKeys', -> it 'returns a copy of the given object, but with keys transformed by the given function', -> source = { foo: 1, bar: 2 } upcase = (str) -> str.toUpperCase() copy = up.util.renameKeys(source, upcase) expect(copy).toEqual { FOO: 1, BAR: 2 } it 'does not change the given object', -> source = { foo: 1 } upcase = (str) -> str.toUpperCase() up.util.renameKeys(source, upcase) expect(source).toEqual { foo: 1 } describe 'up.util.unprefixCamelCase', -> it 'returns the given key without the given prefixed', -> result = up.util.unprefixCamelCase('prefixFoo', 'prefix') expect(result).toEqual('foo') it 'returns undefined if the given key is not prefixed with the given prefix', -> result = up.util.unprefixCamelCase('foo', 'prefix') expect(result).toBeUndefined() it 'returns undefined if the given prefix is the full given key', -> result = up.util.unprefixCamelCase('prefix', 'prefix') expect(result).toBeUndefined() describe 'up.util.escapeHTML', -> it 'escapes double quotes', -> result = up.util.escapeHTML('before"after') expect(result).toEqual('before&quot;after') it 'escapes single quotes', -> result = up.util.escapeHTML("before'after") expect(result).toEqual('before&#x27;after') it 'escapes angle brackets', -> result = up.util.escapeHTML('before<script>after') expect(result).toEqual('before&lt;script&gt;after') describe 'up.util.asyncify()', -> it 'calls the given function synchronously', -> callback = jasmine.createSpy('callback') up.util.asyncify(callback) expect(callback).toHaveBeenCalled() it "returns a fulfilled promise for the given function's return value", (done) -> callback = -> return Promise.resolve('return value') up.util.asyncify(callback).then (value) -> expect(value).toEqual('return value') done() it 'returns a rejected promise if the given function throws an error', (done) -> callback = -> throw 'an error' up.util.asyncify(callback).catch (error) -> expect(error).toEqual('an error') done() describe 'up.util.evalOption()', -> it 'returns the given primitive value', -> expect(up.util.evalOption('foo')).toBe('foo') it 'calls the given function and returns its return value', -> fn = -> 'foo' expect(up.util.evalOption(fn)).toBe('foo') it 'calls the given function with additional args', -> sum = (a, b) -> a + b expect(up.util.evalOption(sum, 3, 2)).toBe(5) describe 'up.util.evalAutoOption()', -> describe 'if the first argument is a primitive value', -> it 'returns the first argument', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('foo', autoDefault)).toBe('foo') describe 'if the first agument is "auto"', -> it 'returns the second argument if it is a primitive value', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('auto', autoDefault)).toBe('auto default') it 'calls the second argument if it is a function', -> sum = (a, b) -> a + b expect(up.util.evalAutoOption('auto', sum, 2, 5)).toBe(7) describe 'if the first argument is a function', -> it 'calls the first argument', -> sum = (a, b) -> a + b autoDefault = 'auto default' expect(up.util.evalAutoOption(sum, autoDefault, 3, 5)).toBe(8) it 'still applies the auto default if the function returns "auto"', -> fn = -> 'auto' autoSum = (a, b) -> a + b expect(up.util.evalAutoOption(fn, autoSum, 3, 5)).toBe(8)
15891
u = up.util e = up.element $ = jQuery describe 'up.util', -> describe 'JavaScript functions', -> describe 'up.util.isEqual', -> describe 'for an Element', -> it 'returns true for the same Element reference', -> div = document.createElement('div') expect(up.util.isEqual(div, div)).toBe(true) it 'returns false for a different Element reference', -> div1 = document.createElement('div') div2 = document.createElement('div') expect(up.util.isEqual(div1, div2)).toBe(false) it 'returns false for a value this is no Element', -> div = document.createElement('div') expect(up.util.isEqual(div, 'other')).toBe(false) describe 'for an Array', -> it 'returns true for a different Array reference with the same elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'bar'] expect(up.util.isEqual(array1, array2)).toBe(true) it 'returns false for an Array with different elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'qux'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a suffix', -> array1 = ['foo', 'bar'] array2 = [ 'bar'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a prefix', -> array1 = ['foo', 'bar'] array2 = ['foo' ] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns true for a NodeList with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] nodeList = parent.querySelectorAll('.child') expect(up.util.isEqual(array, nodeList)).toBe(true) it 'returns true for a HTMLCollection with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] htmlCollection = parent.children expect(up.util.isEqual(array, htmlCollection)).toBe(true) it 'returns true for an arguments object with the same elements', -> toArguments = -> return arguments array = ['foo', 'bar'] args = toArguments('foo', 'bar') expect(up.util.isEqual(array, args)).toBe(true) it 'returns false for a value that is no Array', -> array = ['foo', 'bar'] expect(up.util.isEqual(array, 'foobar')).toBe(false) describe 'for a string', -> it 'returns true for a different string reference with the same characters', -> string1 = 'bar' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(true) it 'returns false for a string with different characters', -> string1 = 'foo' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(false) it 'returns true for a String() object with the same characters', -> stringLiteral = 'bar' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(true) it 'returns false for a String() object with different characters', -> stringLiteral = 'foo' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(false) it 'returns false for a value that is no string', -> expect(up.util.isEqual('foo', ['foo'])).toBe(false) describe 'for a number', -> it 'returns true for a different number reference with the same integer value', -> number1 = 123 number2 = 123 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns true for a different number reference with the same floating point value', -> number1 = 123.4 number2 = 123.4 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns false for a number with a different value', -> number1 = 123 number2 = 124 expect(up.util.isEqual(number1, number2)).toBe(false) it 'returns true for a Number() object with the same value', -> numberLiteral = 123 numberObject = new Number(123) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(true) it 'returns false for a Number() object with a different value', -> numberLiteral = 123 numberObject = new Object(124) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(false) it 'returns false for a value that is no number', -> expect(up.util.isEqual(123, '123')).toBe(false) describe 'for undefined', -> it 'returns true for undefined', -> expect(up.util.isEqual(undefined, undefined)).toBe(true) it 'returns false for null', -> expect(up.util.isEqual(undefined, null)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(undefined, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(undefined, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(undefined, '')).toBe(false) describe 'for null', -> it 'returns true for null', -> expect(up.util.isEqual(null, null)).toBe(true) it 'returns false for undefined', -> expect(up.util.isEqual(null, undefined)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(null, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(null, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(null, '')).toBe(false) describe 'for NaN', -> it "returns false for NaN because it represents multiple values", -> expect(up.util.isEqual(NaN, NaN)).toBe(false) it 'returns false for null', -> expect(up.util.isEqual(NaN, null)).toBe(false) it 'returns false for undefined', -> expect(up.util.isEqual(NaN, undefined)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(NaN, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(NaN, '')).toBe(false) describe 'for a Date', -> it 'returns true for another Date object that points to the same millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for another Date object that points to another millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:01') expect(up.util.isEqual(d1, d2)).toBe(false) it 'returns true for another Date object that points to the same millisecond in another time zone', -> d1 = new Date('2019-01-20T17:35:00+01:00') d2 = new Date('2019-01-20T16:35:00+00:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for a value that is not a Date', -> d1 = new Date('1995-12-17T03:24:00') d2 = '1995-12-17T03:24:00' expect(up.util.isEqual(d1, d2)).toBe(false) describe 'for a plain Object', -> it 'returns true for the same reference', -> obj = {} reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns true for another plain object with the same keys and values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(true) it 'returns false for another plain object with the same keys, but different values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'qux' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that is missing a key', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that has an additional key', -> obj1 = { foo: 'bar' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a non-plain Object, even if it has the same keys and values', -> class Account constructor: (@email) -> accountInstance = new Account('<EMAIL>') accountPlain = {} for key, value of accountInstance accountPlain[key] = value expect(up.util.isEqual(accountPlain, accountInstance)).toBe(false) it 'returns false for a value that is no object', -> obj = { foo: 'bar' } expect(up.util.isEqual(obj, 'foobar')).toBe(false) describe 'for a non-Plain object', -> it 'returns true for the same reference', -> obj = new FormData() reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns false for different references', -> obj1 = new FormData() obj2 = new FormData() expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a different object with the same keys and values', -> class Account constructor: (@email) -> account1 = new Account('<EMAIL>') account2 = new Account('<EMAIL>') expect(up.util.isEqual(account1, account2)).toBe(false) it 'allows the object to hook into the comparison protocol by implementing a method called `up.util.isEqual.key`', -> class Account constructor: (@email) -> "#{up.util.isEqual.key}": (other) -> @email == other.email account1 = new Account('<EMAIL>') account2 = new Account('<EMAIL>') account3 = new Account('<EMAIL>') expect(up.util.isEqual(account1, account2)).toBe(false) expect(up.util.isEqual(account1, account3)).toBe(true) it 'returns false for a value that is no object', -> class Account constructor: (@email) -> account = new Account('<EMAIL>') expect(up.util.isEqual(account, '<EMAIL>')).toBe(false) describe 'up.util.isElementish', -> it 'returns true for an element', -> value = document.body expect(up.util.isElementish(value)).toBe(true) it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for an array of elements', -> value = [document.body] expect(up.util.isElementish(value)).toBe(true) it 'returns false for an array of non-element values', -> value = ['foo'] expect(up.util.isElementish(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isElementish(value)).toBe(false) it 'returns true for the document', -> value = document expect(up.util.isElementish(value)).toBe(true) it 'returns true for the window', -> value = window expect(up.util.isElementish(value)).toBe(true) describe 'up.util.flatMap', -> it 'collects the Array results of the given map function, then concatenates the result arrays into one flat array', -> fun = (x) -> [x, x] result = up.util.flatMap([1, 2, 3], fun) expect(result).toEqual([1, 1, 2, 2, 3, 3]) it 'builds an array from mixed function return values of scalar values and lists', -> fun = (x) -> if x == 1 1 else [x, x] result = up.util.flatMap([0, 1, 2], fun) expect(result).toEqual [0, 0, 1, 2, 2] it 'flattens return values that are NodeLists', -> fun = (selector) -> document.querySelectorAll(selector) foo1 = $fixture('.foo-element')[0] foo2 = $fixture('.foo-element')[0] bar = $fixture('.bar-element')[0] result = up.util.flatMap(['.foo-element', '.bar-element'], fun) expect(result).toEqual [foo1, foo2, bar] describe 'up.util.uniq', -> it 'returns the given array with duplicates elements removed', -> input = [1, 2, 1, 1, 3] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3] it 'works on DOM elements', -> one = document.createElement("div") two = document.createElement("div") input = [one, one, two, two] result = up.util.uniq(input) expect(result).toEqual [one, two] it 'preserves insertion order', -> input = [1, 2, 3, 4, 2, 1] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3, 4] # describe 'up.util.uniqBy', -> # # it 'returns the given array with duplicate elements removed, calling the given function to determine value for uniqueness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, (element) -> element.length) # expect(result).toEqual ['foo', 'apple', 'orange'] # # it 'accepts a property name instead of a function, which collects that property from each item to compute uniquness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, 'length') # expect(result).toEqual ['foo', 'apple', 'orange'] # describe 'up.util.parsePath', -> # # it 'parses a plain name', -> # path = up.util.parsePath("foo") # expect(path).toEqual ['foo'] # # it 'considers underscores to be part of a name', -> # path = up.util.parsePath("foo_bar") # expect(path).toEqual ['foo_bar'] # # it 'considers dashes to be part of a name', -> # path = up.util.parsePath("foo-bar") # expect(path).toEqual ['foo-bar'] # # it 'parses dot-separated names into multiple path segments', -> # path = up.util.parsePath('foo.bar.baz') # expect(path).toEqual ['foo', 'bar', 'baz'] # # it 'parses nested params notation with square brackets', -> # path = up.util.parsePath('user[account][email]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses double quotes in square brackets', -> # path = up.util.parsePath('user["account"]["email"]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses single quotes in square brackets', -> # path = up.util.parsePath("user['account']['email']") # expect(path).toEqual ['user', 'account', 'email'] # # it 'allows square brackets inside quotes', -> # path = up.util.parsePath("element['a[up-href]']") # expect(path).toEqual ['element', 'a[up-href]'] # # it 'allows single quotes inside double quotes', -> # path = up.util.parsePath("element[\"a[up-href='foo']\"]") # expect(path).toEqual ['element', "a[up-href='foo']"] # # it 'allows double quotes inside single quotes', -> # path = up.util.parsePath("element['a[up-href=\"foo\"]']") # expect(path).toEqual ['element', 'a[up-href="foo"]'] # # it 'allows dots in square brackets when it is quoted', -> # path = up.util.parsePath('elements[".foo"]') # expect(path).toEqual ['elements', '.foo'] # # it 'allows different notation for each segment', -> # path = up.util.parsePath('foo.bar[baz]["bam"][\'qux\']') # expect(path).toEqual ['foo', 'bar', 'baz', 'bam', 'qux'] describe 'up.util.parseURL', -> it 'parses a full URL', -> url = up.util.parseURL('https://subdomain.domain.tld:123/path?search#hash') expect(url.protocol).toEqual('https:') expect(url.hostname).toEqual('subdomain.domain.tld') expect(url.port).toEqual('123') expect(url.pathname).toEqual('/path') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#hash') it 'parses an absolute path', -> url = up.util.parseURL('/qux/foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'parses a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') url = up.util.parseURL('foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element', -> link = document.createElement('a') link.href = '/qux/foo?search#bar' url = up.util.parseURL(link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element as a jQuery collection', -> $link = $('<a></a>').attr(href: '/qux/foo?search#bar') url = up.util.parseURL($link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') describe 'up.util.map', -> it 'creates a new array of values by calling the given function on each item of the given array', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element) -> element.length) expect(mapped).toEqual [5, 6, 8] it 'accepts a property name instead of a function, which collects that property from each item', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, 'length') expect(mapped).toEqual [5, 6, 8] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element, i) -> i) expect(mapped).toEqual [0, 1, 2] it 'maps over a NodeList collection', -> one = fixture('.qwertz[data-value=one]') two = fixture('.qwertz[data-value=two]') collection = document.querySelectorAll('.qwertz') result = up.util.map(collection, (elem) -> elem.dataset.value) expect(result).toEqual ['one', 'two'] it 'maps over a jQuery collection', -> one = fixture('.one') two = fixture('.two') collection = jQuery([one, two]) result = up.util.map(collection, 'className') expect(result).toEqual ['one', 'two'] describe 'up.util.mapObject', -> it 'creates an object from the given array and pairer', -> array = ['foo', 'bar', 'baz'] object = up.util.mapObject(array, (str) -> ["#{str}Key", "#{str}Value"]) expect(object).toEqual fooKey: 'fooValue' barKey: 'barValue' bazKey: 'bazValue' describe 'up.util.each', -> it 'calls the given function once for each item of the given array', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item) -> args.push(item) expect(args).toEqual ["apple", "orange", "cucumber"] it 'passes the iteration index as second argument to the given function', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item, index) -> args.push(index) expect(args).toEqual [0, 1, 2] it 'iterates over a NodeList', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] it 'iterates over a jQuery collection', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = jQuery([one, two]) callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.filter', -> it 'returns an array of those elements in the given array for which the given function returns true', -> array = ["foo", "orange", "cucumber"] results = up.util.filter array, (item) -> item.length > 3 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.filter array, (item, index) -> index % 2 == 0 expect(results).toEqual ['apple', 'cucumber'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.filter array, 'prop' expect(results).toEqual [{ name: 'b', prop: true }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.filter nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.reject', -> it 'returns an array of those elements in the given array for which the given function returns false', -> array = ["foo", "orange", "cucumber"] results = up.util.reject array, (item) -> item.length < 4 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.reject array, (item, index) -> index % 2 == 0 expect(results).toEqual ['orange', 'banana'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.reject array, 'prop' expect(results).toEqual [{ name: 'a', prop: false }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.reject nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] # describe 'up.util.previewable', -> # # it 'wraps a function into a proxy function with an additional .promise attribute', -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # expect(u.isFunction(proxy)).toBe(true) # expect(u.isPromise(proxy.promise)).toBe(true) # expect(proxy()).toEqual('return value') # # it "resolves the proxy's .promise when the inner function returns", (done) -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # u.task -> # expect(callback).not.toHaveBeenCalled() # proxy() # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() # # it "delays resolution of the proxy's .promise if the inner function returns a promise", (done) -> # funDeferred = u.newDeferred() # fun = -> funDeferred # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # proxy() # u.task -> # expect(callback).not.toHaveBeenCalled() # funDeferred.resolve('return value') # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() describe 'up.util.sequence', -> it 'combines the given functions into a single function', -> values = [] one = -> values.push('one') two = -> values.push('two') three = -> values.push('three') sequence = up.util.sequence([one, two, three]) expect(values).toEqual([]) sequence() expect(values).toEqual(['one', 'two', 'three']) describe 'up.util.muteRejection', -> it 'returns a promise that fulfills when the given promise fulfills', (done) -> fulfilledPromise = Promise.resolve() mutedPromise = up.util.muteRejection(fulfilledPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'returns a promise that fulfills when the given promise rejects', (done) -> rejectedPromise = Promise.reject() mutedPromise = up.util.muteRejection(rejectedPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'does not leave an unhandled rejection when the given promise rejects', (done) -> rejectGivenPromise = null givenPromise = new Promise (resolve, reject) -> rejectGivenPromise = reject mutedPromise = up.util.muteRejection(givenPromise) u.task -> rejectGivenPromise() u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') expect(window).not.toHaveUnhandledRejections() done() describe 'up.util.simpleEase', -> it 'returns 0 for 0', -> expect(up.util.simpleEase(0)).toBe(0) it 'returns 1 for 1', -> expect(up.util.simpleEase(1)).toBe(1) it 'returns steadily increasing values between 0 and 1', -> expect(up.util.simpleEase(0.25)).toBeAround(0.25, 0.2) expect(up.util.simpleEase(0.50)).toBeAround(0.50, 0.2) expect(up.util.simpleEase(0.75)).toBeAround(0.75, 0.2) describe 'up.util.timer', -> it 'calls the given function after waiting the given milliseconds', (done) -> callback = jasmine.createSpy() expectNotCalled = -> expect(callback).not.toHaveBeenCalled() expectCalled = -> expect(callback).toHaveBeenCalled() up.util.timer(100, callback) expectNotCalled() setTimeout(expectNotCalled, 50) setTimeout(expectCalled, 50 + 75) setTimeout(done, 50 + 75) describe 'if the delay is zero', -> it 'calls the given function in the next execution frame', -> callback = jasmine.createSpy() up.util.timer(0, callback) expect(callback).not.toHaveBeenCalled() setTimeout((-> expect(callback).toHaveBeenCalled()), 0) # describe 'up.util.argNames', -> # # it 'returns an array of argument names for the given function', -> # fun = ($element, data) -> # expect(up.util.argNames(fun)).toEqual(['$element', 'data']) describe 'up.util.pick', -> it 'returns a copy of the given object with only the given whitelisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.pick(original, ['bar', 'bam']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'does not add empty keys to the returned object if the given object does not have that key', -> original = foo: 'foo-value' whitelisted = up.util.pick(original, ['foo', 'bar']) expect(whitelisted).toHaveOwnProperty('foo') expect(whitelisted).not.toHaveOwnProperty('bar') it 'copies properties that are computed by a getter', -> original = foo: 'foo-value' bar: 'bar-value' Object.defineProperty(original, 'baz', get: -> return 'baz-value') whitelisted = up.util.pick(original, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' it 'copies inherited properties', -> parent = foo: 'foo-value' child = Object.create(parent) child.bar = 'bar-value' child.baz = 'baz-value' whitelisted = up.util.pick(child, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' describe 'up.util.omit', -> it 'returns a copy of the given object but omits the given blacklisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.omit(original, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'copies inherited properties', -> parent = foo: 'foo-value' bar: 'bar-value' child = Object.create(parent) child.baz = 'baz-value' child.bam = 'bam-value' whitelisted = up.util.omit(child, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' describe 'up.util.every', -> it 'returns true if all element in the array returns true for the given function', -> result = up.util.every ['foo', 'bar', 'baz'], up.util.isPresent expect(result).toBe(true) it 'returns false if an element in the array returns false for the given function', -> result = up.util.every ['foo', 'bar', null, 'baz'], up.util.isPresent expect(result).toBe(false) it 'short-circuits once an element returns false', -> count = 0 up.util.every ['foo', 'bar', '', 'baz'], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.every array, (item, index) -> args.push(index) true expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> allTrue = [ { prop: true }, { prop: true } ] someFalse = [ { prop: true }, { prop: false } ] expect(up.util.every(allTrue, 'prop')).toBe(true) expect(up.util.every(someFalse, 'prop')).toBe(false) # describe 'up.util.none', -> # # it 'returns true if no element in the array returns true for the given function', -> # result = up.util.none ['foo', 'bar', 'baz'], up.util.isBlank # expect(result).toBe(true) # # it 'returns false if an element in the array returns false for the given function', -> # result = up.util.none ['foo', 'bar', null, 'baz'], up.util.isBlank # expect(result).toBe(false) # # it 'short-circuits once an element returns true', -> # count = 0 # up.util.none ['foo', 'bar', '', 'baz'], (element) -> # count += 1 # up.util.isBlank(element) # expect(count).toBe(3) # # it 'passes the iteration index as second argument to the given function', -> # array = ["apple", "orange", "cucumber"] # args = [] # up.util.none array, (item, index) -> # args.push(index) # false # expect(args).toEqual [0, 1, 2] # # it 'accepts a property name instead of a function, which collects that property from each item', -> # allFalse = [ { prop: false }, { prop: false } ] # someTrue = [ { prop: true }, { prop: false } ] # expect(up.util.none(allFalse, 'prop')).toBe(true) # expect(up.util.none(someTrue, 'prop')).toBe(false) describe 'up.util.some', -> it 'returns true if at least one element in the array returns true for the given function', -> result = up.util.some ['', 'bar', null], up.util.isPresent expect(result).toBe(true) it 'returns false if no element in the array returns true for the given function', -> result = up.util.some ['', null, undefined], up.util.isPresent expect(result).toBe(false) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.some array, (item, index) -> args.push(index) false expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> someTrue = [ { prop: true }, { prop: false } ] allFalse = [ { prop: false }, { prop: false } ] expect(up.util.some(someTrue, 'prop')).toBe(true) expect(up.util.some(allFalse, 'prop')).toBe(false) it 'short-circuits once an element returns true', -> count = 0 up.util.some [null, undefined, 'foo', ''], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.some nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.findResult', -> it 'consecutively applies the function to each array element and returns the first truthy return value', -> map = { a: '', b: null, c: undefined, d: 'DEH', e: 'EH' } fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c', 'd', 'e'], fn expect(result).toEqual('DEH') it 'returns undefined if the function does not return a truthy value for any element in the array', -> map = {} fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c'], fn expect(result).toBeUndefined() it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.findResult nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.isBlank', -> it 'returns false for false', -> expect(up.util.isBlank(false)).toBe(false) it 'returns false for true', -> expect(up.util.isBlank(true)).toBe(false) it 'returns true for null', -> expect(up.util.isBlank(null)).toBe(true) it 'returns true for undefined', -> expect(up.util.isBlank(undefined)).toBe(true) it 'returns true for an empty String', -> expect(up.util.isBlank('')).toBe(true) it 'returns false for a String with at least one character', -> expect(up.util.isBlank('string')).toBe(false) it 'returns true for an empty array', -> expect(up.util.isBlank([])).toBe(true) it 'returns false for an array with at least one element', -> expect(up.util.isBlank(['element'])).toBe(false) it 'returns true for an empty jQuery collection', -> expect(up.util.isBlank($([]))).toBe(true) it 'returns false for a jQuery collection with at least one element', -> expect(up.util.isBlank($('body'))).toBe(false) it 'returns true for an empty object', -> expect(up.util.isBlank({})).toBe(true) it 'returns false for a function', -> expect(up.util.isBlank((->))).toBe(false) it 'returns true for an object with at least one key', -> expect(up.util.isBlank({key: 'value'})).toBe(false) it 'returns true for an object with an [up.util.isBlank.key] method that returns true', -> value = {} value[up.util.isBlank.key] = -> true expect(up.util.isBlank(value)).toBe(true) it 'returns false for an object with an [up.util.isBlank.key] method that returns false', -> value = {} value[up.util.isBlank.key] = -> false expect(up.util.isBlank(value)).toBe(false) it 'returns false for a DOM element', -> value = document.body expect(up.util.isBlank(value)).toBe(false) describe 'up.util.normalizeURL', -> it 'normalizes a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') expect(up.util.normalizeURL('foo')).toBe("/qux/foo") it 'normalizes an absolute path', -> expect(up.util.normalizeURL('/foo')).toBe("/foo") it 'preserves a protocol and hostname for a URL from another domain', -> expect(up.util.normalizeURL('http://example.com/foo/bar')).toBe('http://example.com/foo/bar') it 'preserves a query string', -> expect(up.util.normalizeURL('/foo/bar?key=value')).toBe('/foo/bar?key=value') it 'strips a query string with { search: false } option', -> expect(up.util.normalizeURL('/foo/bar?key=value', search: false)).toBe('/foo/bar') describe 'trailing slashes', -> it 'does not strip a trailing slash by default', -> expect(up.util.normalizeURL('/foo/')).toEqual("/foo/") it 'strips a trailing slash with { trailingSlash: false }', -> expect(up.util.normalizeURL('/foo/', trailingSlash: false)).toEqual("/foo") it 'does not strip a trailing slash when passed the "/" URL', -> expect(up.util.normalizeURL('/', trailingSlash: false)).toEqual("/") it 'normalizes redundant segments', -> expect(up.util.normalizeURL('/foo/../foo')).toBe("/foo") describe 'hash fragments', -> it 'strips a #hash with { hash: false }', -> expect(up.util.normalizeURL('/foo/bar#fragment', hash: false)).toBe('/foo/bar') it 'preserves a #hash by default', -> expect(up.util.normalizeURL('/foo/bar#fragment')).toBe('/foo/bar#fragment') it 'puts a #hash behind the query string', -> expect(up.util.normalizeURL('/foo/bar?key=value#fragment')).toBe('/foo/bar?key=value#fragment') describe 'up.util.find', -> it 'finds the first element in the given array that matches the given tester', -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'b' expect(up.util.find(array, tester)).toEqual('bar') it "returns undefined if the given array doesn't contain a matching element", -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'z' expect(up.util.find(array, tester)).toBeUndefined() describe 'up.util.remove', -> it 'removes the given string from the given array', -> array = ['a', 'b', 'c'] up.util.remove(array, 'b') expect(array).toEqual ['a', 'c'] it 'removes the given object from the given array', -> obj1 = { 'key': 1 } obj2 = { 'key': 2 } obj3 = { 'key': 3 } array = [obj1, obj2, obj3] up.util.remove(array, obj2) expect(array).toEqual [obj1, obj3] it 'returns the removed value if the array was changed', -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'b') expect(returned).toBe('b') it "returns undefined if the given array didn't contain the given value", -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'd') expect(returned).toBeUndefined() describe 'up.util.unresolvablePromise', -> it 'return a pending promise', (done) -> promise = up.util.unresolvablePromise() promiseState(promise).then (result) -> expect(result.state).toEqual('pending') done() it 'returns a different object every time (to prevent memory leaks)', -> one = up.util.unresolvablePromise() two = up.util.unresolvablePromise() expect(one).not.toBe(two) describe 'up.util.flatten', -> it 'flattens the given array', -> array = [1, [2, 3], 4] expect(u.flatten(array)).toEqual([1, 2, 3, 4]) it 'only flattens one level deep for performance reasons', -> array = [1, [2, [3,4]], 5] expect(u.flatten(array)).toEqual([1, 2, [3, 4], 5]) describe 'up.util.renameKey', -> it 'renames a key in the given property', -> object = { a: 'a value', b: 'b value'} u.renameKey(object, 'a', 'c') expect(object.a).toBeUndefined() expect(object.b).toBe('b value') expect(object.c).toBe('a value') # describe 'up.util.offsetParent', -> # # it 'returns the first ascendant that has a "position" style', -> # $a = $fixture('.a') # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'does not return the given element, even when it has position', -> # $a = $fixture('.a').css(position: 'absolute') # $b = $a.affix('.b').css(position: 'relative') # # expect(up.util.offsetParent($b[0])).toBe($a[0]) # # it 'returns the <body> element if there is no closer offset parent', -> # $a = $fixture('.a') # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBe(document.body) # # it 'returns the offset parent for a detached element', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'returns a missing value (and not <body>) if the given detached element has no ancestor with position', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBeMissing() describe 'up.util.isCrossOrigin', -> it 'returns false for an absolute path', -> expect(up.util.isCrossOrigin('/foo')).toBe(false) it 'returns false for an relative path', -> expect(up.util.isCrossOrigin('foo')).toBe(false) it 'returns false for a fully qualified URL with the same protocol and hostname as the current location', -> fullURL = "#{location.protocol}//#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(false) it 'returns true for a fully qualified URL with a different protocol than the current location', -> fullURL = "otherprotocol://#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) it 'returns false for a fully qualified URL with a different hostname than the current location', -> fullURL = "#{location.protocol}//other-host.tld/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) describe 'up.util.isOptions', -> it 'returns true for an Object instance', -> expect(up.util.isOptions(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isOptions({ foo: 'bar'})).toBe(true) it 'returns true for a prototype-less object', -> expect(up.util.isOptions(Object.create(null))).toBe(true) it 'returns false for undefined', -> expect(up.util.isOptions(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isOptions(null)).toBe(false) it 'returns false for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isOptions(fn)).toBe(false) it 'returns false for an Array', -> expect(up.util.isOptions(['foo'])).toBe(false) it 'returns false for a jQuery collection', -> expect(up.util.isOptions($('body'))).toBe(false) it 'returns false for a Promise', -> expect(up.util.isOptions(Promise.resolve())).toBe(false) it 'returns false for a FormData object', -> expect(up.util.isOptions(new FormData())).toBe(false) it 'returns false for a Date', -> expect(up.util.isOptions(new Date())).toBe(false) it 'returns false for a RegExp', -> expect(up.util.isOptions(/foo/)).toBe(false) describe 'up.util.isObject', -> it 'returns true for an Object instance', -> expect(up.util.isObject(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isObject({ foo: 'bar'})).toBe(true) it 'returns false for undefined', -> expect(up.util.isObject(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isObject(null)).toBe(false) it 'returns true for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isObject(fn)).toBe(true) it 'returns true for an array', -> expect(up.util.isObject(['foo'])).toBe(true) it 'returns true for a jQuery collection', -> expect(up.util.isObject($('body'))).toBe(true) it 'returns true for a promise', -> expect(up.util.isObject(Promise.resolve())).toBe(true) it 'returns true for a FormData object', -> expect(up.util.isObject(new FormData())).toBe(true) describe 'up.util.merge', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'overrides (not merges) keys with object value', -> obj = { a: '1', b: { c: '2', d: '3' } } other = { e: '4', b: { f: '5', g: '6' }} obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', e: '4', b: { f: '5', g: '6' } } it 'ignores undefined arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, undefined) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(undefined, obj) expect(reverseResult).toEqual { a: 1, b: 2 } it 'ignores null arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, null) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(null, obj) expect(reverseResult).toEqual { a: 1, b: 2 } # it 'copies inherited values', -> # parent = { a: 1 } # child = Object.create(parent) # child.b = 2 # # result = up.util.merge(child, { c: 3 }) # expect(result).toEqual { a: 1, b: 2, c: 3 } describe 'up.util.mergeDefined', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'does not override values with an undefined value (unlike up.util.merge)', -> obj = { a: '1', b: '2' } other = { b: undefined, c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '2', c: '4' } # describe 'up.util.deepMerge', -> # # it 'recursively merges the given objects', -> # obj = { a: '1', b: { c: '2', d: '3' } } # other = { e: '4', b: { f: '5', g: '6' }} # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: '1', e: '4', b: { c: '2', d: '3', f: '5', g: '6' } } # # it 'ignores undefined arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, undefined) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(undefined, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'ignores null arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, null) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(null, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'overwrites (and does not concatenate) array values', -> # obj = { a: ['1', '2'] } # other = { a: ['3', '4'] } # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: ['3', '4'] } describe 'up.util.memoize', -> it 'returns a function that calls the memoized function', -> fun = (a, b) -> a + b memoized = u.memoize(fun) expect(memoized(2, 3)).toEqual(5) it 'returns the cached return value of the first call when called again', -> spy = jasmine.createSpy().and.returnValue(5) memoized = u.memoize(spy) expect(memoized(2, 3)).toEqual(5) expect(memoized(2, 3)).toEqual(5) expect(spy.calls.count()).toEqual(1) ['assign', 'assignPolyfill'].forEach (assignVariant) -> describe "up.util.#{assignVariant}", -> assign = up.util[assignVariant] it 'copies the second object into the first object', -> target = { a: 1 } source = { b: 2, c: 3 } assign(target, source) expect(target).toEqual { a: 1, b: 2, c: 3 } # Source is unchanged expect(source).toEqual { b: 2, c: 3 } it 'copies null property values', -> target = { a: 1, b: 2 } source = { b: null } assign(target, source) expect(target).toEqual { a: 1, b: null } it 'copies undefined property values', -> target = { a: 1, b: 2 } source = { b: undefined } assign(target, source) expect(target).toEqual { a: 1, b: undefined } it 'returns the first object', -> target = { a: 1 } source = { b: 2 } result = assign(target, source) expect(result).toBe(target) it 'takes multiple sources to copy from', -> target = { a: 1 } source1 = { b: 2, c: 3 } source2 = { d: 4, e: 5 } assign(target, source1, source2) expect(target).toEqual { a: 1, b: 2, c: 3, d: 4, e: 5 } describe 'up.util.copy', -> it 'returns a shallow copy of the given array', -> original = ['a', { b: 'c' }, 'd'] copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.pop() expect(copy.length).toBe(2) expect(original.length).toBe(3) # Test that the copy is shallow copy[1].x = 'y' expect(original[1].x).toEqual('y') it 'returns a shallow copy of the given plain object', -> original = {a: 'b', c: [1, 2], d: 'e'} copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.f = 'g' expect(original.f).toBeMissing() # Test that the copy is shallow copy.c.push(3) expect(original.c).toEqual [1, 2, 3] it 'allows custom classes to hook into the copy protocol by implementing a method named `up.util.copy.key`', -> class TestClass "#{up.util.copy.key}": -> return "custom copy" instance = new TestClass() expect(up.util.copy(instance)).toEqual("custom copy") it 'copies the given jQuery collection into an array', -> $one = $fixture('.one') $two = $fixture('.two') $collection = $one.add($two) copy = up.util.copy($collection) copy[0] = document.body expect($collection[0]).toBe($one[0]) it 'copies the given arguments object into an array', -> args = undefined (-> args = arguments)(1) copy = up.util.copy(args) expect(copy).toBeArray() copy[0] = 2 expect(args[0]).toBe(1) it 'returns the given string (which is immutable)', -> str = "foo" copy = up.util.copy(str) expect(copy).toBe(str) it 'returns the given number (which is immutable)', -> number = 123 copy = up.util.copy(number) expect(copy).toBe(number) it 'copies the given Date object', -> date = new Date('1995-12-17T03:24:00') expect(date.getFullYear()).toBe(1995) copy = up.util.copy(date) expect(copy.getFullYear()).toBe(date.getFullYear()) expect(copy.getHours()).toBe(date.getHours()) expect(copy.getMinutes()).toBe(date.getMinutes()) # Check that it's actually a copied object expect(copy).not.toBe(date) date.setFullYear(2018) expect(copy.getFullYear()).toBe(1995) # describe 'up.util.deepCopy', -> # # it 'returns a deep copy of the given array', -> # original = ['a', { b: 'c' }, 'd'] # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.pop() # expect(copy.length).toBe(2) # expect(original.length).toBe(3) # # # Test that the copy is deep # copy[1].x = 'y' # expect(original[1].x).toBeUndefined() # # it 'returns a deep copy of the given object', -> # original = {a: 'b', c: [1, 2], d: 'e'} # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.f = 'g' # expect(original.f).toBeMissing() # # # Test that the copy is deep # copy.c.push(3) # expect(original.c).toEqual [1, 2] describe 'up.util.isList', -> it 'returns true for an array', -> value = [1, 2, 3] expect(up.util.isList(value)).toBe(true) it 'returns true for an HTMLCollection', -> value = document.getElementsByTagName('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a jQuery collection', -> value = jQuery('body') expect(up.util.isList(value)).toBe(true) it 'returns true for an arguments object', -> value = undefined (-> value = arguments)() expect(up.util.isList(value)).toBe(true) it 'returns false for an object', -> value = { foo: 'bar' } expect(up.util.isList(value)).toBe(false) it 'returns false for a string', -> value = 'foo' expect(up.util.isList(value)).toBe(false) it 'returns false for a number', -> value = 123 expect(up.util.isList(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isList(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isList(value)).toBe(false) it 'returns false for NaN', -> value = NaN expect(up.util.isList(value)).toBe(false) describe 'up.util.isJQuery', -> it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isJQuery(value)).toBe(true) it 'returns false for a native element', -> value = document.body expect(up.util.isJQuery(value)).toBe(false) it 'returns false (and does not crash) for undefined', -> value = undefined expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object', -> value = window expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object if window.jquery (lowercase) is defined (bugfix)', -> window.jquery = '3.0.0' value = window expect(up.util.isJQuery(value)).toBe(false) delete window.jquery it 'returns false for the document object', -> value = document expect(up.util.isJQuery(value)).toBe(false) describe 'up.util.isPromise', -> it 'returns true for a Promise', -> value = new Promise(up.util.noop) expect(up.util.isPromise(value)).toBe(true) it 'returns true for an object with a #then() method', -> value = { then: -> } expect(up.util.isPromise(value)).toBe(true) it 'returns true for an up.Request', -> value = new up.Request(url: '/path') expect(up.util.isPromise(value)).toBe(true) it 'returns false for an object without a #then() method', -> value = { foo: '1' } expect(up.util.isPromise(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isPromise(value)).toBe(false) describe 'up.util.isRegExp', -> it 'returns true for a RegExp', -> value = /foo/ expect(up.util.isRegExp(value)).toBe(true) it 'returns false for a string', -> value = 'foo' expect(up.util.isRegExp(value)).toBe(false) it 'returns false for a undefined', -> value = undefined expect(up.util.isRegExp(value)).toBe(false) describe 'up.util.sprintf', -> describe 'with string argument', -> it 'serializes the string verbatim', -> formatted = up.util.sprintf('before %o after', 'argument') expect(formatted).toEqual('before argument after') describe 'with undefined argument', -> it 'serializes to the word "undefined"', -> formatted = up.util.sprintf('before %o after', undefined) expect(formatted).toEqual('before undefined after') describe 'with null argument', -> it 'serializes to the word "null"', -> formatted = up.util.sprintf('before %o after', null) expect(formatted).toEqual('before null after') describe 'with number argument', -> it 'serializes the number as string', -> formatted = up.util.sprintf('before %o after', 5) expect(formatted).toEqual('before 5 after') describe 'with function argument', -> it 'serializes the function code', -> formatted = up.util.sprintf('before %o after', `function foo() {}`) expect(formatted).toEqual('before function foo() { } after') describe 'with array argument', -> it 'recursively serializes the elements', -> formatted = up.util.sprintf('before %o after', [1, "foo"]) expect(formatted).toEqual('before [1, foo] after') describe 'with element argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element = $('<table id="id-value" name="name-value" class="class-value" title="title-value">') element = $element.get(0) formatted = up.util.sprintf('before %o after', element) expect(formatted).toEqual('before <table id="id-value" name="name-value" class="class-value"> after') describe 'with jQuery argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element1 = $('<table id="table-id">') $element2 = $('<ul id="ul-id">') formatted = up.util.sprintf('before %o after', $element1.add($element2)) expect(formatted).toEqual('before $(<table id="table-id">, <ul id="ul-id">) after') describe 'with object argument', -> it 'serializes to JSON', -> object = { foo: 'foo-value', bar: 'bar-value' } formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"foo":"foo-value","bar":"bar-value"} after') it 'serializes to a fallback string if the given structure has circular references', -> object = { foo: {} } object.foo.bar = object formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before (circular structure) after') it "skips a key if a getter crashes", -> object = {} Object.defineProperty(object, 'foo', get: (-> throw "error")) formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {} after') object.bar = 'bar' formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"bar":"bar"} after') describe 'up.util.renameKeys', -> it 'returns a copy of the given object, but with keys transformed by the given function', -> source = { foo: 1, bar: 2 } upcase = (str) -> str.toUpperCase() copy = up.util.renameKeys(source, upcase) expect(copy).toEqual { FOO: 1, BAR: 2 } it 'does not change the given object', -> source = { foo: 1 } upcase = (str) -> str.toUpperCase() up.util.renameKeys(source, upcase) expect(source).toEqual { foo: 1 } describe 'up.util.unprefixCamelCase', -> it 'returns the given key without the given prefixed', -> result = up.util.unprefixCamelCase('prefixFoo', 'prefix') expect(result).toEqual('foo') it 'returns undefined if the given key is not prefixed with the given prefix', -> result = up.util.unprefixCamelCase('foo', 'prefix') expect(result).toBeUndefined() it 'returns undefined if the given prefix is the full given key', -> result = up.util.unprefixCamelCase('prefix', 'prefix') expect(result).toBeUndefined() describe 'up.util.escapeHTML', -> it 'escapes double quotes', -> result = up.util.escapeHTML('before"after') expect(result).toEqual('before&quot;after') it 'escapes single quotes', -> result = up.util.escapeHTML("before'after") expect(result).toEqual('before&#x27;after') it 'escapes angle brackets', -> result = up.util.escapeHTML('before<script>after') expect(result).toEqual('before&lt;script&gt;after') describe 'up.util.asyncify()', -> it 'calls the given function synchronously', -> callback = jasmine.createSpy('callback') up.util.asyncify(callback) expect(callback).toHaveBeenCalled() it "returns a fulfilled promise for the given function's return value", (done) -> callback = -> return Promise.resolve('return value') up.util.asyncify(callback).then (value) -> expect(value).toEqual('return value') done() it 'returns a rejected promise if the given function throws an error', (done) -> callback = -> throw 'an error' up.util.asyncify(callback).catch (error) -> expect(error).toEqual('an error') done() describe 'up.util.evalOption()', -> it 'returns the given primitive value', -> expect(up.util.evalOption('foo')).toBe('foo') it 'calls the given function and returns its return value', -> fn = -> 'foo' expect(up.util.evalOption(fn)).toBe('foo') it 'calls the given function with additional args', -> sum = (a, b) -> a + b expect(up.util.evalOption(sum, 3, 2)).toBe(5) describe 'up.util.evalAutoOption()', -> describe 'if the first argument is a primitive value', -> it 'returns the first argument', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('foo', autoDefault)).toBe('foo') describe 'if the first agument is "auto"', -> it 'returns the second argument if it is a primitive value', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('auto', autoDefault)).toBe('auto default') it 'calls the second argument if it is a function', -> sum = (a, b) -> a + b expect(up.util.evalAutoOption('auto', sum, 2, 5)).toBe(7) describe 'if the first argument is a function', -> it 'calls the first argument', -> sum = (a, b) -> a + b autoDefault = 'auto default' expect(up.util.evalAutoOption(sum, autoDefault, 3, 5)).toBe(8) it 'still applies the auto default if the function returns "auto"', -> fn = -> 'auto' autoSum = (a, b) -> a + b expect(up.util.evalAutoOption(fn, autoSum, 3, 5)).toBe(8)
true
u = up.util e = up.element $ = jQuery describe 'up.util', -> describe 'JavaScript functions', -> describe 'up.util.isEqual', -> describe 'for an Element', -> it 'returns true for the same Element reference', -> div = document.createElement('div') expect(up.util.isEqual(div, div)).toBe(true) it 'returns false for a different Element reference', -> div1 = document.createElement('div') div2 = document.createElement('div') expect(up.util.isEqual(div1, div2)).toBe(false) it 'returns false for a value this is no Element', -> div = document.createElement('div') expect(up.util.isEqual(div, 'other')).toBe(false) describe 'for an Array', -> it 'returns true for a different Array reference with the same elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'bar'] expect(up.util.isEqual(array1, array2)).toBe(true) it 'returns false for an Array with different elements', -> array1 = ['foo', 'bar'] array2 = ['foo', 'qux'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a suffix', -> array1 = ['foo', 'bar'] array2 = [ 'bar'] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns false for an Array that is a prefix', -> array1 = ['foo', 'bar'] array2 = ['foo' ] expect(up.util.isEqual(array1, array2)).toBe(false) it 'returns true for a NodeList with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] nodeList = parent.querySelectorAll('.child') expect(up.util.isEqual(array, nodeList)).toBe(true) it 'returns true for a HTMLCollection with the same elements', -> parent = e.affix(document.body, '.parent') child1 = e.affix(parent, '.child.one') child2 = e.affix(parent, '.child.two') array = [child1, child2] htmlCollection = parent.children expect(up.util.isEqual(array, htmlCollection)).toBe(true) it 'returns true for an arguments object with the same elements', -> toArguments = -> return arguments array = ['foo', 'bar'] args = toArguments('foo', 'bar') expect(up.util.isEqual(array, args)).toBe(true) it 'returns false for a value that is no Array', -> array = ['foo', 'bar'] expect(up.util.isEqual(array, 'foobar')).toBe(false) describe 'for a string', -> it 'returns true for a different string reference with the same characters', -> string1 = 'bar' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(true) it 'returns false for a string with different characters', -> string1 = 'foo' string2 = 'bar' expect(up.util.isEqual(string1, string2)).toBe(false) it 'returns true for a String() object with the same characters', -> stringLiteral = 'bar' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(true) it 'returns false for a String() object with different characters', -> stringLiteral = 'foo' stringObject = new String('bar') expect(up.util.isEqual(stringLiteral, stringObject)).toBe(false) it 'returns false for a value that is no string', -> expect(up.util.isEqual('foo', ['foo'])).toBe(false) describe 'for a number', -> it 'returns true for a different number reference with the same integer value', -> number1 = 123 number2 = 123 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns true for a different number reference with the same floating point value', -> number1 = 123.4 number2 = 123.4 expect(up.util.isEqual(number1, number2)).toBe(true) it 'returns false for a number with a different value', -> number1 = 123 number2 = 124 expect(up.util.isEqual(number1, number2)).toBe(false) it 'returns true for a Number() object with the same value', -> numberLiteral = 123 numberObject = new Number(123) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(true) it 'returns false for a Number() object with a different value', -> numberLiteral = 123 numberObject = new Object(124) expect(up.util.isEqual(numberLiteral, numberObject)).toBe(false) it 'returns false for a value that is no number', -> expect(up.util.isEqual(123, '123')).toBe(false) describe 'for undefined', -> it 'returns true for undefined', -> expect(up.util.isEqual(undefined, undefined)).toBe(true) it 'returns false for null', -> expect(up.util.isEqual(undefined, null)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(undefined, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(undefined, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(undefined, '')).toBe(false) describe 'for null', -> it 'returns true for null', -> expect(up.util.isEqual(null, null)).toBe(true) it 'returns false for undefined', -> expect(up.util.isEqual(null, undefined)).toBe(false) it 'returns false for NaN', -> expect(up.util.isEqual(null, NaN)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(null, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(null, '')).toBe(false) describe 'for NaN', -> it "returns false for NaN because it represents multiple values", -> expect(up.util.isEqual(NaN, NaN)).toBe(false) it 'returns false for null', -> expect(up.util.isEqual(NaN, null)).toBe(false) it 'returns false for undefined', -> expect(up.util.isEqual(NaN, undefined)).toBe(false) it 'returns false for an empty Object', -> expect(up.util.isEqual(NaN, {})).toBe(false) it 'returns false for an empty string', -> expect(up.util.isEqual(NaN, '')).toBe(false) describe 'for a Date', -> it 'returns true for another Date object that points to the same millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for another Date object that points to another millisecond', -> d1 = new Date('1995-12-17T03:24:00') d2 = new Date('1995-12-17T03:24:01') expect(up.util.isEqual(d1, d2)).toBe(false) it 'returns true for another Date object that points to the same millisecond in another time zone', -> d1 = new Date('2019-01-20T17:35:00+01:00') d2 = new Date('2019-01-20T16:35:00+00:00') expect(up.util.isEqual(d1, d2)).toBe(true) it 'returns false for a value that is not a Date', -> d1 = new Date('1995-12-17T03:24:00') d2 = '1995-12-17T03:24:00' expect(up.util.isEqual(d1, d2)).toBe(false) describe 'for a plain Object', -> it 'returns true for the same reference', -> obj = {} reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns true for another plain object with the same keys and values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(true) it 'returns false for another plain object with the same keys, but different values', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar', baz: 'qux' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that is missing a key', -> obj1 = { foo: 'bar', baz: 'bam' } obj2 = { foo: 'bar' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for another plain object that has an additional key', -> obj1 = { foo: 'bar' } obj2 = { foo: 'bar', baz: 'bam' } expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a non-plain Object, even if it has the same keys and values', -> class Account constructor: (@email) -> accountInstance = new Account('PI:EMAIL:<EMAIL>END_PI') accountPlain = {} for key, value of accountInstance accountPlain[key] = value expect(up.util.isEqual(accountPlain, accountInstance)).toBe(false) it 'returns false for a value that is no object', -> obj = { foo: 'bar' } expect(up.util.isEqual(obj, 'foobar')).toBe(false) describe 'for a non-Plain object', -> it 'returns true for the same reference', -> obj = new FormData() reference = obj expect(up.util.isEqual(obj, reference)).toBe(true) it 'returns false for different references', -> obj1 = new FormData() obj2 = new FormData() expect(up.util.isEqual(obj1, obj2)).toBe(false) it 'returns false for a different object with the same keys and values', -> class Account constructor: (@email) -> account1 = new Account('PI:EMAIL:<EMAIL>END_PI') account2 = new Account('PI:EMAIL:<EMAIL>END_PI') expect(up.util.isEqual(account1, account2)).toBe(false) it 'allows the object to hook into the comparison protocol by implementing a method called `up.util.isEqual.key`', -> class Account constructor: (@email) -> "#{up.util.isEqual.key}": (other) -> @email == other.email account1 = new Account('PI:EMAIL:<EMAIL>END_PI') account2 = new Account('PI:EMAIL:<EMAIL>END_PI') account3 = new Account('PI:EMAIL:<EMAIL>END_PI') expect(up.util.isEqual(account1, account2)).toBe(false) expect(up.util.isEqual(account1, account3)).toBe(true) it 'returns false for a value that is no object', -> class Account constructor: (@email) -> account = new Account('PI:EMAIL:<EMAIL>END_PI') expect(up.util.isEqual(account, 'PI:EMAIL:<EMAIL>END_PI')).toBe(false) describe 'up.util.isElementish', -> it 'returns true for an element', -> value = document.body expect(up.util.isElementish(value)).toBe(true) it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('body') expect(up.util.isElementish(value)).toBe(true) it 'returns true for an array of elements', -> value = [document.body] expect(up.util.isElementish(value)).toBe(true) it 'returns false for an array of non-element values', -> value = ['foo'] expect(up.util.isElementish(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isElementish(value)).toBe(false) it 'returns true for the document', -> value = document expect(up.util.isElementish(value)).toBe(true) it 'returns true for the window', -> value = window expect(up.util.isElementish(value)).toBe(true) describe 'up.util.flatMap', -> it 'collects the Array results of the given map function, then concatenates the result arrays into one flat array', -> fun = (x) -> [x, x] result = up.util.flatMap([1, 2, 3], fun) expect(result).toEqual([1, 1, 2, 2, 3, 3]) it 'builds an array from mixed function return values of scalar values and lists', -> fun = (x) -> if x == 1 1 else [x, x] result = up.util.flatMap([0, 1, 2], fun) expect(result).toEqual [0, 0, 1, 2, 2] it 'flattens return values that are NodeLists', -> fun = (selector) -> document.querySelectorAll(selector) foo1 = $fixture('.foo-element')[0] foo2 = $fixture('.foo-element')[0] bar = $fixture('.bar-element')[0] result = up.util.flatMap(['.foo-element', '.bar-element'], fun) expect(result).toEqual [foo1, foo2, bar] describe 'up.util.uniq', -> it 'returns the given array with duplicates elements removed', -> input = [1, 2, 1, 1, 3] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3] it 'works on DOM elements', -> one = document.createElement("div") two = document.createElement("div") input = [one, one, two, two] result = up.util.uniq(input) expect(result).toEqual [one, two] it 'preserves insertion order', -> input = [1, 2, 3, 4, 2, 1] result = up.util.uniq(input) expect(result).toEqual [1, 2, 3, 4] # describe 'up.util.uniqBy', -> # # it 'returns the given array with duplicate elements removed, calling the given function to determine value for uniqueness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, (element) -> element.length) # expect(result).toEqual ['foo', 'apple', 'orange'] # # it 'accepts a property name instead of a function, which collects that property from each item to compute uniquness', -> # input = ["foo", "bar", "apple", 'orange', 'banana'] # result = up.util.uniqBy(input, 'length') # expect(result).toEqual ['foo', 'apple', 'orange'] # describe 'up.util.parsePath', -> # # it 'parses a plain name', -> # path = up.util.parsePath("foo") # expect(path).toEqual ['foo'] # # it 'considers underscores to be part of a name', -> # path = up.util.parsePath("foo_bar") # expect(path).toEqual ['foo_bar'] # # it 'considers dashes to be part of a name', -> # path = up.util.parsePath("foo-bar") # expect(path).toEqual ['foo-bar'] # # it 'parses dot-separated names into multiple path segments', -> # path = up.util.parsePath('foo.bar.baz') # expect(path).toEqual ['foo', 'bar', 'baz'] # # it 'parses nested params notation with square brackets', -> # path = up.util.parsePath('user[account][email]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses double quotes in square brackets', -> # path = up.util.parsePath('user["account"]["email"]') # expect(path).toEqual ['user', 'account', 'email'] # # it 'parses single quotes in square brackets', -> # path = up.util.parsePath("user['account']['email']") # expect(path).toEqual ['user', 'account', 'email'] # # it 'allows square brackets inside quotes', -> # path = up.util.parsePath("element['a[up-href]']") # expect(path).toEqual ['element', 'a[up-href]'] # # it 'allows single quotes inside double quotes', -> # path = up.util.parsePath("element[\"a[up-href='foo']\"]") # expect(path).toEqual ['element', "a[up-href='foo']"] # # it 'allows double quotes inside single quotes', -> # path = up.util.parsePath("element['a[up-href=\"foo\"]']") # expect(path).toEqual ['element', 'a[up-href="foo"]'] # # it 'allows dots in square brackets when it is quoted', -> # path = up.util.parsePath('elements[".foo"]') # expect(path).toEqual ['elements', '.foo'] # # it 'allows different notation for each segment', -> # path = up.util.parsePath('foo.bar[baz]["bam"][\'qux\']') # expect(path).toEqual ['foo', 'bar', 'baz', 'bam', 'qux'] describe 'up.util.parseURL', -> it 'parses a full URL', -> url = up.util.parseURL('https://subdomain.domain.tld:123/path?search#hash') expect(url.protocol).toEqual('https:') expect(url.hostname).toEqual('subdomain.domain.tld') expect(url.port).toEqual('123') expect(url.pathname).toEqual('/path') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#hash') it 'parses an absolute path', -> url = up.util.parseURL('/qux/foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'parses a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') url = up.util.parseURL('foo?search#bar') expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element', -> link = document.createElement('a') link.href = '/qux/foo?search#bar' url = up.util.parseURL(link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') it 'allows to pass a link element as a jQuery collection', -> $link = $('<a></a>').attr(href: '/qux/foo?search#bar') url = up.util.parseURL($link) expect(url.protocol).toEqual(location.protocol) expect(url.hostname).toEqual(location.hostname) expect(url.port).toEqual(location.port) expect(url.pathname).toEqual('/qux/foo') expect(url.search).toEqual('?search') expect(url.hash).toEqual('#bar') describe 'up.util.map', -> it 'creates a new array of values by calling the given function on each item of the given array', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element) -> element.length) expect(mapped).toEqual [5, 6, 8] it 'accepts a property name instead of a function, which collects that property from each item', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, 'length') expect(mapped).toEqual [5, 6, 8] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] mapped = up.util.map(array, (element, i) -> i) expect(mapped).toEqual [0, 1, 2] it 'maps over a NodeList collection', -> one = fixture('.qwertz[data-value=one]') two = fixture('.qwertz[data-value=two]') collection = document.querySelectorAll('.qwertz') result = up.util.map(collection, (elem) -> elem.dataset.value) expect(result).toEqual ['one', 'two'] it 'maps over a jQuery collection', -> one = fixture('.one') two = fixture('.two') collection = jQuery([one, two]) result = up.util.map(collection, 'className') expect(result).toEqual ['one', 'two'] describe 'up.util.mapObject', -> it 'creates an object from the given array and pairer', -> array = ['foo', 'bar', 'baz'] object = up.util.mapObject(array, (str) -> ["#{str}Key", "#{str}Value"]) expect(object).toEqual fooKey: 'fooValue' barKey: 'barValue' bazKey: 'bazValue' describe 'up.util.each', -> it 'calls the given function once for each item of the given array', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item) -> args.push(item) expect(args).toEqual ["apple", "orange", "cucumber"] it 'passes the iteration index as second argument to the given function', -> args = [] array = ["apple", "orange", "cucumber"] up.util.each array, (item, index) -> args.push(index) expect(args).toEqual [0, 1, 2] it 'iterates over a NodeList', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] it 'iterates over a jQuery collection', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = jQuery([one, two]) callback = jasmine.createSpy() up.util.each nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.filter', -> it 'returns an array of those elements in the given array for which the given function returns true', -> array = ["foo", "orange", "cucumber"] results = up.util.filter array, (item) -> item.length > 3 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.filter array, (item, index) -> index % 2 == 0 expect(results).toEqual ['apple', 'cucumber'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.filter array, 'prop' expect(results).toEqual [{ name: 'b', prop: true }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.filter nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.reject', -> it 'returns an array of those elements in the given array for which the given function returns false', -> array = ["foo", "orange", "cucumber"] results = up.util.reject array, (item) -> item.length < 4 expect(results).toEqual ['orange', 'cucumber'] it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber", "banana"] results = up.util.reject array, (item, index) -> index % 2 == 0 expect(results).toEqual ['orange', 'banana'] it 'accepts a property name instead of a function, which checks that property from each item', -> array = [ { name: 'a', prop: false }, { name: 'b', prop: true } ] results = up.util.reject array, 'prop' expect(results).toEqual [{ name: 'a', prop: false }] it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.reject nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] # describe 'up.util.previewable', -> # # it 'wraps a function into a proxy function with an additional .promise attribute', -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # expect(u.isFunction(proxy)).toBe(true) # expect(u.isPromise(proxy.promise)).toBe(true) # expect(proxy()).toEqual('return value') # # it "resolves the proxy's .promise when the inner function returns", (done) -> # fun = -> 'return value' # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # u.task -> # expect(callback).not.toHaveBeenCalled() # proxy() # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() # # it "delays resolution of the proxy's .promise if the inner function returns a promise", (done) -> # funDeferred = u.newDeferred() # fun = -> funDeferred # proxy = up.util.previewable(fun) # callback = jasmine.createSpy('promise callback') # proxy.promise.then(callback) # proxy() # u.task -> # expect(callback).not.toHaveBeenCalled() # funDeferred.resolve('return value') # u.task -> # expect(callback).toHaveBeenCalledWith('return value') # done() describe 'up.util.sequence', -> it 'combines the given functions into a single function', -> values = [] one = -> values.push('one') two = -> values.push('two') three = -> values.push('three') sequence = up.util.sequence([one, two, three]) expect(values).toEqual([]) sequence() expect(values).toEqual(['one', 'two', 'three']) describe 'up.util.muteRejection', -> it 'returns a promise that fulfills when the given promise fulfills', (done) -> fulfilledPromise = Promise.resolve() mutedPromise = up.util.muteRejection(fulfilledPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'returns a promise that fulfills when the given promise rejects', (done) -> rejectedPromise = Promise.reject() mutedPromise = up.util.muteRejection(rejectedPromise) u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') done() it 'does not leave an unhandled rejection when the given promise rejects', (done) -> rejectGivenPromise = null givenPromise = new Promise (resolve, reject) -> rejectGivenPromise = reject mutedPromise = up.util.muteRejection(givenPromise) u.task -> rejectGivenPromise() u.task -> promiseState(mutedPromise).then (result) -> expect(result.state).toEqual('fulfilled') expect(window).not.toHaveUnhandledRejections() done() describe 'up.util.simpleEase', -> it 'returns 0 for 0', -> expect(up.util.simpleEase(0)).toBe(0) it 'returns 1 for 1', -> expect(up.util.simpleEase(1)).toBe(1) it 'returns steadily increasing values between 0 and 1', -> expect(up.util.simpleEase(0.25)).toBeAround(0.25, 0.2) expect(up.util.simpleEase(0.50)).toBeAround(0.50, 0.2) expect(up.util.simpleEase(0.75)).toBeAround(0.75, 0.2) describe 'up.util.timer', -> it 'calls the given function after waiting the given milliseconds', (done) -> callback = jasmine.createSpy() expectNotCalled = -> expect(callback).not.toHaveBeenCalled() expectCalled = -> expect(callback).toHaveBeenCalled() up.util.timer(100, callback) expectNotCalled() setTimeout(expectNotCalled, 50) setTimeout(expectCalled, 50 + 75) setTimeout(done, 50 + 75) describe 'if the delay is zero', -> it 'calls the given function in the next execution frame', -> callback = jasmine.createSpy() up.util.timer(0, callback) expect(callback).not.toHaveBeenCalled() setTimeout((-> expect(callback).toHaveBeenCalled()), 0) # describe 'up.util.argNames', -> # # it 'returns an array of argument names for the given function', -> # fun = ($element, data) -> # expect(up.util.argNames(fun)).toEqual(['$element', 'data']) describe 'up.util.pick', -> it 'returns a copy of the given object with only the given whitelisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.pick(original, ['bar', 'bam']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'does not add empty keys to the returned object if the given object does not have that key', -> original = foo: 'foo-value' whitelisted = up.util.pick(original, ['foo', 'bar']) expect(whitelisted).toHaveOwnProperty('foo') expect(whitelisted).not.toHaveOwnProperty('bar') it 'copies properties that are computed by a getter', -> original = foo: 'foo-value' bar: 'bar-value' Object.defineProperty(original, 'baz', get: -> return 'baz-value') whitelisted = up.util.pick(original, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' it 'copies inherited properties', -> parent = foo: 'foo-value' child = Object.create(parent) child.bar = 'bar-value' child.baz = 'baz-value' whitelisted = up.util.pick(child, ['foo', 'baz']) expect(whitelisted).toEqual foo: 'foo-value' baz: 'baz-value' describe 'up.util.omit', -> it 'returns a copy of the given object but omits the given blacklisted properties', -> original = foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' whitelisted = up.util.omit(original, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' # Show that original did not change expect(original).toEqual foo: 'foo-value' bar: 'bar-value' baz: 'baz-value' bam: 'bam-value' it 'copies inherited properties', -> parent = foo: 'foo-value' bar: 'bar-value' child = Object.create(parent) child.baz = 'baz-value' child.bam = 'bam-value' whitelisted = up.util.omit(child, ['foo', 'baz']) expect(whitelisted).toEqual bar: 'bar-value' bam: 'bam-value' describe 'up.util.every', -> it 'returns true if all element in the array returns true for the given function', -> result = up.util.every ['foo', 'bar', 'baz'], up.util.isPresent expect(result).toBe(true) it 'returns false if an element in the array returns false for the given function', -> result = up.util.every ['foo', 'bar', null, 'baz'], up.util.isPresent expect(result).toBe(false) it 'short-circuits once an element returns false', -> count = 0 up.util.every ['foo', 'bar', '', 'baz'], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.every array, (item, index) -> args.push(index) true expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> allTrue = [ { prop: true }, { prop: true } ] someFalse = [ { prop: true }, { prop: false } ] expect(up.util.every(allTrue, 'prop')).toBe(true) expect(up.util.every(someFalse, 'prop')).toBe(false) # describe 'up.util.none', -> # # it 'returns true if no element in the array returns true for the given function', -> # result = up.util.none ['foo', 'bar', 'baz'], up.util.isBlank # expect(result).toBe(true) # # it 'returns false if an element in the array returns false for the given function', -> # result = up.util.none ['foo', 'bar', null, 'baz'], up.util.isBlank # expect(result).toBe(false) # # it 'short-circuits once an element returns true', -> # count = 0 # up.util.none ['foo', 'bar', '', 'baz'], (element) -> # count += 1 # up.util.isBlank(element) # expect(count).toBe(3) # # it 'passes the iteration index as second argument to the given function', -> # array = ["apple", "orange", "cucumber"] # args = [] # up.util.none array, (item, index) -> # args.push(index) # false # expect(args).toEqual [0, 1, 2] # # it 'accepts a property name instead of a function, which collects that property from each item', -> # allFalse = [ { prop: false }, { prop: false } ] # someTrue = [ { prop: true }, { prop: false } ] # expect(up.util.none(allFalse, 'prop')).toBe(true) # expect(up.util.none(someTrue, 'prop')).toBe(false) describe 'up.util.some', -> it 'returns true if at least one element in the array returns true for the given function', -> result = up.util.some ['', 'bar', null], up.util.isPresent expect(result).toBe(true) it 'returns false if no element in the array returns true for the given function', -> result = up.util.some ['', null, undefined], up.util.isPresent expect(result).toBe(false) it 'passes the iteration index as second argument to the given function', -> array = ["apple", "orange", "cucumber"] args = [] up.util.some array, (item, index) -> args.push(index) false expect(args).toEqual [0, 1, 2] it 'accepts a property name instead of a function, which collects that property from each item', -> someTrue = [ { prop: true }, { prop: false } ] allFalse = [ { prop: false }, { prop: false } ] expect(up.util.some(someTrue, 'prop')).toBe(true) expect(up.util.some(allFalse, 'prop')).toBe(false) it 'short-circuits once an element returns true', -> count = 0 up.util.some [null, undefined, 'foo', ''], (element) -> count += 1 up.util.isPresent(element) expect(count).toBe(3) it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.some nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.findResult', -> it 'consecutively applies the function to each array element and returns the first truthy return value', -> map = { a: '', b: null, c: undefined, d: 'DEH', e: 'EH' } fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c', 'd', 'e'], fn expect(result).toEqual('DEH') it 'returns undefined if the function does not return a truthy value for any element in the array', -> map = {} fn = (el) -> map[el] result = up.util.findResult ['a', 'b', 'c'], fn expect(result).toBeUndefined() it 'iterates over an array-like value', -> one = fixture('.qwertz') two = fixture('.qwertz') nodeList = document.querySelectorAll('.qwertz') callback = jasmine.createSpy() up.util.findResult nodeList, callback expect(callback.calls.allArgs()).toEqual [[one, 0], [two, 1]] describe 'up.util.isBlank', -> it 'returns false for false', -> expect(up.util.isBlank(false)).toBe(false) it 'returns false for true', -> expect(up.util.isBlank(true)).toBe(false) it 'returns true for null', -> expect(up.util.isBlank(null)).toBe(true) it 'returns true for undefined', -> expect(up.util.isBlank(undefined)).toBe(true) it 'returns true for an empty String', -> expect(up.util.isBlank('')).toBe(true) it 'returns false for a String with at least one character', -> expect(up.util.isBlank('string')).toBe(false) it 'returns true for an empty array', -> expect(up.util.isBlank([])).toBe(true) it 'returns false for an array with at least one element', -> expect(up.util.isBlank(['element'])).toBe(false) it 'returns true for an empty jQuery collection', -> expect(up.util.isBlank($([]))).toBe(true) it 'returns false for a jQuery collection with at least one element', -> expect(up.util.isBlank($('body'))).toBe(false) it 'returns true for an empty object', -> expect(up.util.isBlank({})).toBe(true) it 'returns false for a function', -> expect(up.util.isBlank((->))).toBe(false) it 'returns true for an object with at least one key', -> expect(up.util.isBlank({key: 'value'})).toBe(false) it 'returns true for an object with an [up.util.isBlank.key] method that returns true', -> value = {} value[up.util.isBlank.key] = -> true expect(up.util.isBlank(value)).toBe(true) it 'returns false for an object with an [up.util.isBlank.key] method that returns false', -> value = {} value[up.util.isBlank.key] = -> false expect(up.util.isBlank(value)).toBe(false) it 'returns false for a DOM element', -> value = document.body expect(up.util.isBlank(value)).toBe(false) describe 'up.util.normalizeURL', -> it 'normalizes a relative path', -> up.history.config.enabled = true up.history.replace('/qux/') expect(up.util.normalizeURL('foo')).toBe("/qux/foo") it 'normalizes an absolute path', -> expect(up.util.normalizeURL('/foo')).toBe("/foo") it 'preserves a protocol and hostname for a URL from another domain', -> expect(up.util.normalizeURL('http://example.com/foo/bar')).toBe('http://example.com/foo/bar') it 'preserves a query string', -> expect(up.util.normalizeURL('/foo/bar?key=value')).toBe('/foo/bar?key=value') it 'strips a query string with { search: false } option', -> expect(up.util.normalizeURL('/foo/bar?key=value', search: false)).toBe('/foo/bar') describe 'trailing slashes', -> it 'does not strip a trailing slash by default', -> expect(up.util.normalizeURL('/foo/')).toEqual("/foo/") it 'strips a trailing slash with { trailingSlash: false }', -> expect(up.util.normalizeURL('/foo/', trailingSlash: false)).toEqual("/foo") it 'does not strip a trailing slash when passed the "/" URL', -> expect(up.util.normalizeURL('/', trailingSlash: false)).toEqual("/") it 'normalizes redundant segments', -> expect(up.util.normalizeURL('/foo/../foo')).toBe("/foo") describe 'hash fragments', -> it 'strips a #hash with { hash: false }', -> expect(up.util.normalizeURL('/foo/bar#fragment', hash: false)).toBe('/foo/bar') it 'preserves a #hash by default', -> expect(up.util.normalizeURL('/foo/bar#fragment')).toBe('/foo/bar#fragment') it 'puts a #hash behind the query string', -> expect(up.util.normalizeURL('/foo/bar?key=value#fragment')).toBe('/foo/bar?key=value#fragment') describe 'up.util.find', -> it 'finds the first element in the given array that matches the given tester', -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'b' expect(up.util.find(array, tester)).toEqual('bar') it "returns undefined if the given array doesn't contain a matching element", -> array = ['foo', 'bar', 'baz'] tester = (element) -> element[0] == 'z' expect(up.util.find(array, tester)).toBeUndefined() describe 'up.util.remove', -> it 'removes the given string from the given array', -> array = ['a', 'b', 'c'] up.util.remove(array, 'b') expect(array).toEqual ['a', 'c'] it 'removes the given object from the given array', -> obj1 = { 'key': 1 } obj2 = { 'key': 2 } obj3 = { 'key': 3 } array = [obj1, obj2, obj3] up.util.remove(array, obj2) expect(array).toEqual [obj1, obj3] it 'returns the removed value if the array was changed', -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'b') expect(returned).toBe('b') it "returns undefined if the given array didn't contain the given value", -> array = ['a', 'b', 'c'] returned = up.util.remove(array, 'd') expect(returned).toBeUndefined() describe 'up.util.unresolvablePromise', -> it 'return a pending promise', (done) -> promise = up.util.unresolvablePromise() promiseState(promise).then (result) -> expect(result.state).toEqual('pending') done() it 'returns a different object every time (to prevent memory leaks)', -> one = up.util.unresolvablePromise() two = up.util.unresolvablePromise() expect(one).not.toBe(two) describe 'up.util.flatten', -> it 'flattens the given array', -> array = [1, [2, 3], 4] expect(u.flatten(array)).toEqual([1, 2, 3, 4]) it 'only flattens one level deep for performance reasons', -> array = [1, [2, [3,4]], 5] expect(u.flatten(array)).toEqual([1, 2, [3, 4], 5]) describe 'up.util.renameKey', -> it 'renames a key in the given property', -> object = { a: 'a value', b: 'b value'} u.renameKey(object, 'a', 'c') expect(object.a).toBeUndefined() expect(object.b).toBe('b value') expect(object.c).toBe('a value') # describe 'up.util.offsetParent', -> # # it 'returns the first ascendant that has a "position" style', -> # $a = $fixture('.a') # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'does not return the given element, even when it has position', -> # $a = $fixture('.a').css(position: 'absolute') # $b = $a.affix('.b').css(position: 'relative') # # expect(up.util.offsetParent($b[0])).toBe($a[0]) # # it 'returns the <body> element if there is no closer offset parent', -> # $a = $fixture('.a') # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBe(document.body) # # it 'returns the offset parent for a detached element', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b').css(position: 'relative') # $c = $b.affix('.c') # $d = $c.affix('.d') # # expect(up.util.offsetParent($d[0])).toBe($b[0]) # # it 'returns a missing value (and not <body>) if the given detached element has no ancestor with position', -> # $a = $fixture('.a').detach() # $b = $a.affix('.b') # # expect(up.util.offsetParent($b[0])).toBeMissing() describe 'up.util.isCrossOrigin', -> it 'returns false for an absolute path', -> expect(up.util.isCrossOrigin('/foo')).toBe(false) it 'returns false for an relative path', -> expect(up.util.isCrossOrigin('foo')).toBe(false) it 'returns false for a fully qualified URL with the same protocol and hostname as the current location', -> fullURL = "#{location.protocol}//#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(false) it 'returns true for a fully qualified URL with a different protocol than the current location', -> fullURL = "otherprotocol://#{location.host}/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) it 'returns false for a fully qualified URL with a different hostname than the current location', -> fullURL = "#{location.protocol}//other-host.tld/foo" expect(up.util.isCrossOrigin(fullURL)).toBe(true) describe 'up.util.isOptions', -> it 'returns true for an Object instance', -> expect(up.util.isOptions(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isOptions({ foo: 'bar'})).toBe(true) it 'returns true for a prototype-less object', -> expect(up.util.isOptions(Object.create(null))).toBe(true) it 'returns false for undefined', -> expect(up.util.isOptions(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isOptions(null)).toBe(false) it 'returns false for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isOptions(fn)).toBe(false) it 'returns false for an Array', -> expect(up.util.isOptions(['foo'])).toBe(false) it 'returns false for a jQuery collection', -> expect(up.util.isOptions($('body'))).toBe(false) it 'returns false for a Promise', -> expect(up.util.isOptions(Promise.resolve())).toBe(false) it 'returns false for a FormData object', -> expect(up.util.isOptions(new FormData())).toBe(false) it 'returns false for a Date', -> expect(up.util.isOptions(new Date())).toBe(false) it 'returns false for a RegExp', -> expect(up.util.isOptions(/foo/)).toBe(false) describe 'up.util.isObject', -> it 'returns true for an Object instance', -> expect(up.util.isObject(new Object())).toBe(true) it 'returns true for an object literal', -> expect(up.util.isObject({ foo: 'bar'})).toBe(true) it 'returns false for undefined', -> expect(up.util.isObject(undefined)).toBe(false) it 'returns false for null', -> expect(up.util.isObject(null)).toBe(false) it 'returns true for a function (which is technically an object)', -> fn = -> 'foo' fn.key = 'value' expect(up.util.isObject(fn)).toBe(true) it 'returns true for an array', -> expect(up.util.isObject(['foo'])).toBe(true) it 'returns true for a jQuery collection', -> expect(up.util.isObject($('body'))).toBe(true) it 'returns true for a promise', -> expect(up.util.isObject(Promise.resolve())).toBe(true) it 'returns true for a FormData object', -> expect(up.util.isObject(new FormData())).toBe(true) describe 'up.util.merge', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'overrides (not merges) keys with object value', -> obj = { a: '1', b: { c: '2', d: '3' } } other = { e: '4', b: { f: '5', g: '6' }} obj = up.util.merge(obj, other) expect(obj).toEqual { a: '1', e: '4', b: { f: '5', g: '6' } } it 'ignores undefined arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, undefined) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(undefined, obj) expect(reverseResult).toEqual { a: 1, b: 2 } it 'ignores null arguments', -> obj = { a: 1, b: 2 } result = up.util.merge(obj, null) expect(result).toEqual { a: 1, b: 2 } reverseResult = up.util.merge(null, obj) expect(reverseResult).toEqual { a: 1, b: 2 } # it 'copies inherited values', -> # parent = { a: 1 } # child = Object.create(parent) # child.b = 2 # # result = up.util.merge(child, { c: 3 }) # expect(result).toEqual { a: 1, b: 2, c: 3 } describe 'up.util.mergeDefined', -> it 'merges the given objects', -> obj = { a: '1', b: '2' } other = { b: '3', c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '3', c: '4' } it 'does not override values with an undefined value (unlike up.util.merge)', -> obj = { a: '1', b: '2' } other = { b: undefined, c: '4' } obj = up.util.mergeDefined(obj, other) expect(obj).toEqual { a: '1', b: '2', c: '4' } # describe 'up.util.deepMerge', -> # # it 'recursively merges the given objects', -> # obj = { a: '1', b: { c: '2', d: '3' } } # other = { e: '4', b: { f: '5', g: '6' }} # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: '1', e: '4', b: { c: '2', d: '3', f: '5', g: '6' } } # # it 'ignores undefined arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, undefined) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(undefined, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'ignores null arguments', -> # obj = { a: 1, b: 2 } # # result = up.util.deepMerge(obj, null) # expect(result).toEqual { a: 1, b: 2 } # # reverseResult = up.util.deepMerge(null, obj) # expect(reverseResult).toEqual { a: 1, b: 2 } # # it 'overwrites (and does not concatenate) array values', -> # obj = { a: ['1', '2'] } # other = { a: ['3', '4'] } # obj = up.util.deepMerge(obj, other) # expect(obj).toEqual { a: ['3', '4'] } describe 'up.util.memoize', -> it 'returns a function that calls the memoized function', -> fun = (a, b) -> a + b memoized = u.memoize(fun) expect(memoized(2, 3)).toEqual(5) it 'returns the cached return value of the first call when called again', -> spy = jasmine.createSpy().and.returnValue(5) memoized = u.memoize(spy) expect(memoized(2, 3)).toEqual(5) expect(memoized(2, 3)).toEqual(5) expect(spy.calls.count()).toEqual(1) ['assign', 'assignPolyfill'].forEach (assignVariant) -> describe "up.util.#{assignVariant}", -> assign = up.util[assignVariant] it 'copies the second object into the first object', -> target = { a: 1 } source = { b: 2, c: 3 } assign(target, source) expect(target).toEqual { a: 1, b: 2, c: 3 } # Source is unchanged expect(source).toEqual { b: 2, c: 3 } it 'copies null property values', -> target = { a: 1, b: 2 } source = { b: null } assign(target, source) expect(target).toEqual { a: 1, b: null } it 'copies undefined property values', -> target = { a: 1, b: 2 } source = { b: undefined } assign(target, source) expect(target).toEqual { a: 1, b: undefined } it 'returns the first object', -> target = { a: 1 } source = { b: 2 } result = assign(target, source) expect(result).toBe(target) it 'takes multiple sources to copy from', -> target = { a: 1 } source1 = { b: 2, c: 3 } source2 = { d: 4, e: 5 } assign(target, source1, source2) expect(target).toEqual { a: 1, b: 2, c: 3, d: 4, e: 5 } describe 'up.util.copy', -> it 'returns a shallow copy of the given array', -> original = ['a', { b: 'c' }, 'd'] copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.pop() expect(copy.length).toBe(2) expect(original.length).toBe(3) # Test that the copy is shallow copy[1].x = 'y' expect(original[1].x).toEqual('y') it 'returns a shallow copy of the given plain object', -> original = {a: 'b', c: [1, 2], d: 'e'} copy = up.util.copy(original) expect(copy).toEqual(original) # Test that changes to copy don't change original copy.f = 'g' expect(original.f).toBeMissing() # Test that the copy is shallow copy.c.push(3) expect(original.c).toEqual [1, 2, 3] it 'allows custom classes to hook into the copy protocol by implementing a method named `up.util.copy.key`', -> class TestClass "#{up.util.copy.key}": -> return "custom copy" instance = new TestClass() expect(up.util.copy(instance)).toEqual("custom copy") it 'copies the given jQuery collection into an array', -> $one = $fixture('.one') $two = $fixture('.two') $collection = $one.add($two) copy = up.util.copy($collection) copy[0] = document.body expect($collection[0]).toBe($one[0]) it 'copies the given arguments object into an array', -> args = undefined (-> args = arguments)(1) copy = up.util.copy(args) expect(copy).toBeArray() copy[0] = 2 expect(args[0]).toBe(1) it 'returns the given string (which is immutable)', -> str = "foo" copy = up.util.copy(str) expect(copy).toBe(str) it 'returns the given number (which is immutable)', -> number = 123 copy = up.util.copy(number) expect(copy).toBe(number) it 'copies the given Date object', -> date = new Date('1995-12-17T03:24:00') expect(date.getFullYear()).toBe(1995) copy = up.util.copy(date) expect(copy.getFullYear()).toBe(date.getFullYear()) expect(copy.getHours()).toBe(date.getHours()) expect(copy.getMinutes()).toBe(date.getMinutes()) # Check that it's actually a copied object expect(copy).not.toBe(date) date.setFullYear(2018) expect(copy.getFullYear()).toBe(1995) # describe 'up.util.deepCopy', -> # # it 'returns a deep copy of the given array', -> # original = ['a', { b: 'c' }, 'd'] # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.pop() # expect(copy.length).toBe(2) # expect(original.length).toBe(3) # # # Test that the copy is deep # copy[1].x = 'y' # expect(original[1].x).toBeUndefined() # # it 'returns a deep copy of the given object', -> # original = {a: 'b', c: [1, 2], d: 'e'} # # copy = up.util.deepCopy(original) # expect(copy).toEqual(original) # # # Test that changes to copy don't change original # copy.f = 'g' # expect(original.f).toBeMissing() # # # Test that the copy is deep # copy.c.push(3) # expect(original.c).toEqual [1, 2] describe 'up.util.isList', -> it 'returns true for an array', -> value = [1, 2, 3] expect(up.util.isList(value)).toBe(true) it 'returns true for an HTMLCollection', -> value = document.getElementsByTagName('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a NodeList', -> value = document.querySelectorAll('div') expect(up.util.isList(value)).toBe(true) it 'returns true for a jQuery collection', -> value = jQuery('body') expect(up.util.isList(value)).toBe(true) it 'returns true for an arguments object', -> value = undefined (-> value = arguments)() expect(up.util.isList(value)).toBe(true) it 'returns false for an object', -> value = { foo: 'bar' } expect(up.util.isList(value)).toBe(false) it 'returns false for a string', -> value = 'foo' expect(up.util.isList(value)).toBe(false) it 'returns false for a number', -> value = 123 expect(up.util.isList(value)).toBe(false) it 'returns false for undefined', -> value = undefined expect(up.util.isList(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isList(value)).toBe(false) it 'returns false for NaN', -> value = NaN expect(up.util.isList(value)).toBe(false) describe 'up.util.isJQuery', -> it 'returns true for a jQuery collection', -> value = $('body') expect(up.util.isJQuery(value)).toBe(true) it 'returns false for a native element', -> value = document.body expect(up.util.isJQuery(value)).toBe(false) it 'returns false (and does not crash) for undefined', -> value = undefined expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object', -> value = window expect(up.util.isJQuery(value)).toBe(false) it 'returns false for the window object if window.jquery (lowercase) is defined (bugfix)', -> window.jquery = '3.0.0' value = window expect(up.util.isJQuery(value)).toBe(false) delete window.jquery it 'returns false for the document object', -> value = document expect(up.util.isJQuery(value)).toBe(false) describe 'up.util.isPromise', -> it 'returns true for a Promise', -> value = new Promise(up.util.noop) expect(up.util.isPromise(value)).toBe(true) it 'returns true for an object with a #then() method', -> value = { then: -> } expect(up.util.isPromise(value)).toBe(true) it 'returns true for an up.Request', -> value = new up.Request(url: '/path') expect(up.util.isPromise(value)).toBe(true) it 'returns false for an object without a #then() method', -> value = { foo: '1' } expect(up.util.isPromise(value)).toBe(false) it 'returns false for null', -> value = null expect(up.util.isPromise(value)).toBe(false) describe 'up.util.isRegExp', -> it 'returns true for a RegExp', -> value = /foo/ expect(up.util.isRegExp(value)).toBe(true) it 'returns false for a string', -> value = 'foo' expect(up.util.isRegExp(value)).toBe(false) it 'returns false for a undefined', -> value = undefined expect(up.util.isRegExp(value)).toBe(false) describe 'up.util.sprintf', -> describe 'with string argument', -> it 'serializes the string verbatim', -> formatted = up.util.sprintf('before %o after', 'argument') expect(formatted).toEqual('before argument after') describe 'with undefined argument', -> it 'serializes to the word "undefined"', -> formatted = up.util.sprintf('before %o after', undefined) expect(formatted).toEqual('before undefined after') describe 'with null argument', -> it 'serializes to the word "null"', -> formatted = up.util.sprintf('before %o after', null) expect(formatted).toEqual('before null after') describe 'with number argument', -> it 'serializes the number as string', -> formatted = up.util.sprintf('before %o after', 5) expect(formatted).toEqual('before 5 after') describe 'with function argument', -> it 'serializes the function code', -> formatted = up.util.sprintf('before %o after', `function foo() {}`) expect(formatted).toEqual('before function foo() { } after') describe 'with array argument', -> it 'recursively serializes the elements', -> formatted = up.util.sprintf('before %o after', [1, "foo"]) expect(formatted).toEqual('before [1, foo] after') describe 'with element argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element = $('<table id="id-value" name="name-value" class="class-value" title="title-value">') element = $element.get(0) formatted = up.util.sprintf('before %o after', element) expect(formatted).toEqual('before <table id="id-value" name="name-value" class="class-value"> after') describe 'with jQuery argument', -> it 'serializes the tag name with id, name and class attributes, but ignores other attributes', -> $element1 = $('<table id="table-id">') $element2 = $('<ul id="ul-id">') formatted = up.util.sprintf('before %o after', $element1.add($element2)) expect(formatted).toEqual('before $(<table id="table-id">, <ul id="ul-id">) after') describe 'with object argument', -> it 'serializes to JSON', -> object = { foo: 'foo-value', bar: 'bar-value' } formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"foo":"foo-value","bar":"bar-value"} after') it 'serializes to a fallback string if the given structure has circular references', -> object = { foo: {} } object.foo.bar = object formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before (circular structure) after') it "skips a key if a getter crashes", -> object = {} Object.defineProperty(object, 'foo', get: (-> throw "error")) formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {} after') object.bar = 'bar' formatted = up.util.sprintf('before %o after', object) expect(formatted).toEqual('before {"bar":"bar"} after') describe 'up.util.renameKeys', -> it 'returns a copy of the given object, but with keys transformed by the given function', -> source = { foo: 1, bar: 2 } upcase = (str) -> str.toUpperCase() copy = up.util.renameKeys(source, upcase) expect(copy).toEqual { FOO: 1, BAR: 2 } it 'does not change the given object', -> source = { foo: 1 } upcase = (str) -> str.toUpperCase() up.util.renameKeys(source, upcase) expect(source).toEqual { foo: 1 } describe 'up.util.unprefixCamelCase', -> it 'returns the given key without the given prefixed', -> result = up.util.unprefixCamelCase('prefixFoo', 'prefix') expect(result).toEqual('foo') it 'returns undefined if the given key is not prefixed with the given prefix', -> result = up.util.unprefixCamelCase('foo', 'prefix') expect(result).toBeUndefined() it 'returns undefined if the given prefix is the full given key', -> result = up.util.unprefixCamelCase('prefix', 'prefix') expect(result).toBeUndefined() describe 'up.util.escapeHTML', -> it 'escapes double quotes', -> result = up.util.escapeHTML('before"after') expect(result).toEqual('before&quot;after') it 'escapes single quotes', -> result = up.util.escapeHTML("before'after") expect(result).toEqual('before&#x27;after') it 'escapes angle brackets', -> result = up.util.escapeHTML('before<script>after') expect(result).toEqual('before&lt;script&gt;after') describe 'up.util.asyncify()', -> it 'calls the given function synchronously', -> callback = jasmine.createSpy('callback') up.util.asyncify(callback) expect(callback).toHaveBeenCalled() it "returns a fulfilled promise for the given function's return value", (done) -> callback = -> return Promise.resolve('return value') up.util.asyncify(callback).then (value) -> expect(value).toEqual('return value') done() it 'returns a rejected promise if the given function throws an error', (done) -> callback = -> throw 'an error' up.util.asyncify(callback).catch (error) -> expect(error).toEqual('an error') done() describe 'up.util.evalOption()', -> it 'returns the given primitive value', -> expect(up.util.evalOption('foo')).toBe('foo') it 'calls the given function and returns its return value', -> fn = -> 'foo' expect(up.util.evalOption(fn)).toBe('foo') it 'calls the given function with additional args', -> sum = (a, b) -> a + b expect(up.util.evalOption(sum, 3, 2)).toBe(5) describe 'up.util.evalAutoOption()', -> describe 'if the first argument is a primitive value', -> it 'returns the first argument', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('foo', autoDefault)).toBe('foo') describe 'if the first agument is "auto"', -> it 'returns the second argument if it is a primitive value', -> autoDefault = 'auto default' expect(up.util.evalAutoOption('auto', autoDefault)).toBe('auto default') it 'calls the second argument if it is a function', -> sum = (a, b) -> a + b expect(up.util.evalAutoOption('auto', sum, 2, 5)).toBe(7) describe 'if the first argument is a function', -> it 'calls the first argument', -> sum = (a, b) -> a + b autoDefault = 'auto default' expect(up.util.evalAutoOption(sum, autoDefault, 3, 5)).toBe(8) it 'still applies the auto default if the function returns "auto"', -> fn = -> 'auto' autoSum = (a, b) -> a + b expect(up.util.evalAutoOption(fn, autoSum, 3, 5)).toBe(8)
[ { "context": "###\nCopyright 2016 Resin.io\n\nLicensed under the Apache License, Version 2.0 (", "end": 27, "score": 0.7747095227241516, "start": 19, "tag": "NAME", "value": "Resin.io" } ]
packages/resin-settings-storage/lib/local-storage.coffee
resin-io-playground/resin-sdk-lerna
0
### Copyright 2016 Resin.io Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ### if localStorage? module.exports = -> localStorage else # Fallback to filesystem based storage if not in the browser. { LocalStorage } = require('node-localstorage') module.exports = (dataDirectory) -> # Set infinite quota new LocalStorage(dataDirectory, Infinity)
109632
### Copyright 2016 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ### if localStorage? module.exports = -> localStorage else # Fallback to filesystem based storage if not in the browser. { LocalStorage } = require('node-localstorage') module.exports = (dataDirectory) -> # Set infinite quota new LocalStorage(dataDirectory, Infinity)
true
### Copyright 2016 PI:NAME:<NAME>END_PI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ### if localStorage? module.exports = -> localStorage else # Fallback to filesystem based storage if not in the browser. { LocalStorage } = require('node-localstorage') module.exports = (dataDirectory) -> # Set infinite quota new LocalStorage(dataDirectory, Infinity)
[ { "context": "t alert to silence\", ->\n @room.user.say('alice', '@hubot set centerdevice deployment alert to bl", "end": 509, "score": 0.663211464881897, "start": 504, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot set centerdevice deployment alert to bl", "end": 642, "score": 0.7047351002693176, "start": 637, "tag": "NAME", "value": "alice" }, { "context": "yment alert to bla.blupp']\n ['hubot', \"@alice Yay. I just set the deployment alert to silence t", "end": 733, "score": 0.7370803952217102, "start": 726, "tag": "USERNAME", "value": "\"@alice" }, { "context": "ert to bla.blupp']\n ['hubot', \"@alice Yay. I just set the deployment alert to silence to 'b", "end": 737, "score": 0.5906405448913574, "start": 734, "tag": "NAME", "value": "Yay" }, { "context": "t alert to silence\", ->\n @room.user.say('alice', '@hubot get centerdevice deployment alert').the", "end": 1011, "score": 0.6751087307929993, "start": 1006, "tag": "NAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot get centerdevice deployment alert']\n ", "end": 1131, "score": 0.6870630979537964, "start": 1126, "tag": "NAME", "value": "alice" }, { "context": "rdevice deployment alert']\n ['hubot', \"@alice Ja, the current deployment alert to silence ", "end": 1201, "score": 0.47300252318382263, "start": 1201, "tag": "NAME", "value": "" }, { "context": "vice deployment alert']\n ['hubot', \"@alice Ja, the current deployment alert to silence is 't", "end": 1209, "score": 0.9498996138572693, "start": 1204, "tag": "USERNAME", "value": "alice" }, { "context": "deployment alert']\n ['hubot', \"@alice Ja, the current deployment alert to silence is 'tes", "end": 1211, "score": 0.6118645668029785, "start": 1210, "tag": "NAME", "value": "J" }, { "context": "g.alert\", \"bla.blupp\"\n @room.user.say 'alice', '@hubot get centerdevice deployment alert'\n\n ", "end": 1506, "score": 0.49564117193222046, "start": 1501, "tag": "NAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot get centerdevice deployment alert']\n ", "end": 1641, "score": 0.5909463763237, "start": 1636, "tag": "NAME", "value": "alice" }, { "context": "rdevice deployment alert']\n ['hubot', \"@alice Ja, the current deployment alert to silence is 'b", "end": 1719, "score": 0.7138984799385071, "start": 1712, "tag": "USERNAME", "value": "\"@alice" }, { "context": "deployment alert']\n ['hubot', \"@alice Ja, the current deployment alert to silence is 'bla.", "end": 1722, "score": 0.6691397428512573, "start": 1720, "tag": "NAME", "value": "Ja" }, { "context": "nt tags to silence\", ->\n @room.user.say('alice', '@hubot set centerdevice deployment tags to hos", "end": 1931, "score": 0.47594425082206726, "start": 1926, "tag": "NAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot set centerdevice deployment tags to hos", "end": 2079, "score": 0.9672937989234924, "start": 2074, "tag": "NAME", "value": "alice" }, { "context": "ost=muffin,service=lukas']\n ['hubot', \"@alice Yay. I just set the deployment tags to silen", "end": 2177, "score": 0.8754544854164124, "start": 2177, "tag": "NAME", "value": "" }, { "context": "=muffin,service=lukas']\n ['hubot', \"@alice Yay. I just set the deployment tags to silence to", "end": 2185, "score": 0.8295511603355408, "start": 2180, "tag": "USERNAME", "value": "alice" }, { "context": "in,service=lukas']\n ['hubot', \"@alice Yay. I just set the deployment tags to silence to 'ho", "end": 2189, "score": 0.8889857530593872, "start": 2186, "tag": "NAME", "value": "Yay" }, { "context": "nt tags to silence\", ->\n @room.user.say('alice', '@hubot get centerdevice deployment tags').then", "end": 2491, "score": 0.9654331207275391, "start": 2486, "tag": "NAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot get centerdevice deployment tags']\n ", "end": 2610, "score": 0.9756810069084167, "start": 2605, "tag": "NAME", "value": "alice" }, { "context": "erdevice deployment tags']\n ['hubot', \"@alice Ja, the current deployment tags to silence a", "end": 2679, "score": 0.9840554594993591, "start": 2679, "tag": "NAME", "value": "" }, { "context": "evice deployment tags']\n ['hubot', \"@alice Ja, the current deployment tags to silence are 'host", "end": 2690, "score": 0.7826990485191345, "start": 2682, "tag": "NAME", "value": "alice Ja" }, { "context": "service=centerdevice\"\n @room.user.say 'alice', '@hubot get centerdevice deployment tags'\n\n ", "end": 3018, "score": 0.9817471504211426, "start": 3013, "tag": "NAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot get centerdevice deployment tags']\n ", "end": 3152, "score": 0.9859828948974609, "start": 3147, "tag": "NAME", "value": "alice" }, { "context": "erdevice deployment tags']\n ['hubot', \"@alice Ja, the current deployment tags to silence a", "end": 3221, "score": 0.9816542863845825, "start": 3221, "tag": "NAME", "value": "" }, { "context": "evice deployment tags']\n ['hubot', \"@alice Ja, the current deployment tags to silence are 'h", "end": 3229, "score": 0.7006062269210815, "start": 3224, "tag": "NAME", "value": "alice" }, { "context": " deployment tags']\n ['hubot', \"@alice Ja, the current deployment tags to silence are 'host", "end": 3232, "score": 0.8073596954345703, "start": 3230, "tag": "NAME", "value": "Ja" }, { "context": "set_silence.failed',\n user: event.user\n room: event.room\n ", "end": 3956, "score": 0.6598448753356934, "start": 3952, "tag": "USERNAME", "value": "user" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot starting centerdevice deployment'\n ", "end": 4160, "score": 0.9948996901512146, "start": 4155, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot starting centerdevice deployment']\n ", "end": 4416, "score": 0.9948344826698303, "start": 4411, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e", "end": 4493, "score": 0.9925541281700134, "start": 4488, "tag": "USERNAME", "value": "alice" }, { "context": "Set Bosun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.']\n ", "end": 4548, "score": 0.5436224937438965, "start": 4544, "tag": "KEY", "value": "9533" }, { "context": "osun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me sil", "end": 4581, "score": 0.6364031434059143, "start": 4549, "tag": "KEY", "value": "74c3f9b74417b37e7cce75c384d29dc7" }, { "context": "b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me silence Bosun because deployment ...']", "end": 4616, "score": 0.9921584129333496, "start": 4611, "tag": "USERNAME", "value": "alice" }, { "context": " co =>\n yield @room.user.say 'alice', \"@hubot starting centerdevice deployment becaus", "end": 5483, "score": 0.993916928768158, "start": 5478, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', \"@hubot starting centerdevice deployment becaus", "end": 5757, "score": 0.9833223819732666, "start": 5752, "tag": "USERNAME", "value": "alice" }, { "context": "m.messages).to.eql [\n ['alice', \"@hubot starting centerdevice deployment because I'm bore", "end": 5767, "score": 0.6205251216888428, "start": 5765, "tag": "USERNAME", "value": "ot" }, { "context": "ent because I'm bored\"]\n ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e", "end": 5852, "score": 0.9746761918067932, "start": 5847, "tag": "USERNAME", "value": "alice" }, { "context": "417b37e7cce75c384d29dc7.']\n ['hubot', \"@alice Ok, let me silence Bosun because I'm bored ...\"]\n", "end": 5975, "score": 0.84339439868927, "start": 5968, "tag": "USERNAME", "value": "\"@alice" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot starting centerdevice deployment'\n ", "end": 7141, "score": 0.9836821556091309, "start": 7136, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot starting centerdevice deployment']\n ", "end": 7399, "score": 0.959178626537323, "start": 7394, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', '@alice Set Bosun silence successfully for 1s with id 6e8", "end": 7476, "score": 0.9910250902175903, "start": 7471, "tag": "USERNAME", "value": "alice" }, { "context": "ice Set Bosun silence successfully for 1s with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me sil", "end": 7563, "score": 0.8682071566581726, "start": 7523, "tag": "KEY", "value": "6e89533c74c3f9b74417b37e7cce75c384d29dc7" }, { "context": "417b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me silence Bosun because deployment ...']", "end": 7598, "score": 0.9231833219528198, "start": 7591, "tag": "USERNAME", "value": "'@alice" }, { "context": "ecause deployment ...']\n ['hubot', \"@alice Hey, your Bosun silence with id 6e89533c74c3f9b74", "end": 7680, "score": 0.9947202801704407, "start": 7675, "tag": "USERNAME", "value": "alice" }, { "context": "['hubot', \"@alice Hey, your Bosun silence with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7 expired, but it seems you're still deploying?! Ar", "end": 7753, "score": 0.8352647423744202, "start": 7713, "tag": "KEY", "value": "6e89533c74c3f9b74417b37e7cce75c384d29dc7" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot starting centerdevice deployment'\n ", "end": 8511, "score": 0.9053233861923218, "start": 8506, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot starting centerdevice deployment']\n ", "end": 8767, "score": 0.4984760284423828, "start": 8762, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', '@alice Oouch: Failed to set Bosun silence because Bosun ", "end": 8844, "score": 0.9863245487213135, "start": 8839, "tag": "USERNAME", "value": "alice" }, { "context": "ce because Bosun failed.']\n ['hubot', '@alice Ok, let me silence Bosun because deployment ...']", "end": 8935, "score": 0.8993780612945557, "start": 8928, "tag": "USERNAME", "value": "'@alice" }, { "context": "5ee396126a7ed8f3bf44\"\n @room.user.say 'alice', '@hubot starting centerdevice deployment'\n\n ", "end": 9538, "score": 0.8540766835212708, "start": 9533, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot starting centerdevice deployment']\n ", "end": 9685, "score": 0.7534401416778564, "start": 9680, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', \"@alice Ouuch, there's already a deployment silence with ", "end": 9762, "score": 0.9218237400054932, "start": 9757, "tag": "USERNAME", "value": "alice" }, { "context": "ice deployment']\n ['hubot', \"@alice Ouuch, there's already a deployment silence with id ", "end": 9765, "score": 0.5959931015968323, "start": 9764, "tag": "NAME", "value": "u" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot starting centerdevice deployment'\n ", "end": 10072, "score": 0.6746693849563599, "start": 10067, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot starting centerdevice deployment']\n ", "end": 10329, "score": 0.6438735127449036, "start": 10324, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', '@alice Ok, let me silence Bosun because deployment ...']", "end": 10406, "score": 0.7772579789161682, "start": 10401, "tag": "USERNAME", "value": "alice" }, { "context": "ecause deployment ...']\n ['hubot', '@alice Ouuch, request for bosun.set_silence timed out ..", "end": 10488, "score": 0.865247368812561, "start": 10483, "tag": "USERNAME", "value": "alice" }, { "context": "e deployment ...']\n ['hubot', '@alice Ouuch, request for bosun.set_silence timed out ... sorr", "end": 10494, "score": 0.6136727333068848, "start": 10489, "tag": "NAME", "value": "Ouuch" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot finished centerdevice deployment'\n ", "end": 11422, "score": 0.9084730744361877, "start": 11417, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot finished centerdevice deployment']\n ", "end": 11612, "score": 0.9360442161560059, "start": 11607, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', \"@alice Ok, I'll clear the Bosun silence for your deploym", "end": 11689, "score": 0.9617623090744019, "start": 11684, "tag": "USERNAME", "value": "alice" }, { "context": "sun can calm down ...\"]\n ['hubot', '@alice Cleared Bosun silence successfully with id 6e8953", "end": 11872, "score": 0.9491646885871887, "start": 11867, "tag": "USERNAME", "value": "alice" }, { "context": "b37e7cce75c384d29dc7.']\n ['hubot', '@alice Trying to clear Bosun silence for your deployment", "end": 11991, "score": 0.9603776931762695, "start": 11986, "tag": "USERNAME", "value": "alice" }, { "context": ": \"1s\"\n silence_id: \"6e89533c74c3f9b74417b37e7cce75c384d29dc7\"\n @room.robot.on 'bosun.check_silence'", "end": 12794, "score": 0.9977529048919678, "start": 12768, "tag": "KEY", "value": "b74417b37e7cce75c384d29dc7" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot starting centerdevice deployment'\n ", "end": 13387, "score": 0.945853590965271, "start": 13382, "tag": "NAME", "value": "alice" }, { "context": "e deployment'\n yield @room.user.say 'alice', '@hubot finish centerdevice deployment'\n ", "end": 13473, "score": 0.9565085768699646, "start": 13468, "tag": "NAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', '@alice Set Bosun silence successfully for 1s with id 6e8", "end": 13806, "score": 0.9869096279144287, "start": 13801, "tag": "USERNAME", "value": "alice" }, { "context": "ice Set Bosun silence successfully for 1s with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me sil", "end": 13893, "score": 0.9884359836578369, "start": 13853, "tag": "KEY", "value": "6e89533c74c3f9b74417b37e7cce75c384d29dc7" }, { "context": "b37e7cce75c384d29dc7.']\n ['hubot', '@alice Ok, let me silence Bosun because deployment ...']", "end": 13928, "score": 0.98653244972229, "start": 13923, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', \"@alice Ok, I'll clear the Bosun silence for your deploym", "end": 14075, "score": 0.9884049892425537, "start": 14070, "tag": "USERNAME", "value": "alice" }, { "context": "sun can calm down ...\"]\n ['hubot', '@alice Cleared Bosun silence successfully with id 6e8953", "end": 14258, "score": 0.9887163639068604, "start": 14253, "tag": "USERNAME", "value": "alice" }, { "context": "@alice Cleared Bosun silence successfully with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.']\n ['hubot', '@alice Trying to clea", "end": 14342, "score": 0.9878226518630981, "start": 14302, "tag": "KEY", "value": "6e89533c74c3f9b74417b37e7cce75c384d29dc7" }, { "context": "b37e7cce75c384d29dc7.']\n ['hubot', '@alice Trying to clear Bosun silence for your deployment", "end": 14377, "score": 0.6169769763946533, "start": 14372, "tag": "USERNAME", "value": "alice" }, { "context": "ce.silence_id\", \"6e89533c74c3f9b74417b37e7cce75c384d29dc7\"\n robot = @room.robot\n ", "end": 14922, "score": 0.5498625040054321, "start": 14921, "tag": "KEY", "value": "4" }, { "context": "ence_id\", \"6e89533c74c3f9b74417b37e7cce75c384d29dc7\"\n robot = @room.robot\n @roo", "end": 14928, "score": 0.5725526809692383, "start": 14927, "tag": "KEY", "value": "7" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot finished centerdevice deployment'\n ", "end": 15296, "score": 0.6726059317588806, "start": 15291, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot finished centerdevice deployment']\n ", "end": 15486, "score": 0.8682482242584229, "start": 15481, "tag": "USERNAME", "value": "alice" }, { "context": "room.messages).to.eql [\n ['alice', '@hubot finished centerdevice deployment']\n ", "end": 15496, "score": 0.7220672369003296, "start": 15491, "tag": "USERNAME", "value": "hubot" }, { "context": "nterdevice deployment']\n ['hubot', \"@alice Ok, I'll clear the Bosun silence for your deploym", "end": 15563, "score": 0.9839138984680176, "start": 15558, "tag": "USERNAME", "value": "alice" }, { "context": "sun can calm down ...\"]\n ['hubot', '@alice Oouch: Failed to clear Bosun silence with id 6e89", "end": 15746, "score": 0.9806656241416931, "start": 15741, "tag": "USERNAME", "value": "alice" }, { "context": "lice Oouch: Failed to clear Bosun silence with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7, because Bosun failed. Please talk directly to Bo", "end": 15832, "score": 0.8952770829200745, "start": 15792, "tag": "KEY", "value": "6e89533c74c3f9b74417b37e7cce75c384d29dc7" }, { "context": "to clear the silence.']\n ['hubot', '@alice Trying to clear Bosun silence for your deployment", "end": 15941, "score": 0.9888515472412109, "start": 15936, "tag": "USERNAME", "value": "alice" }, { "context": "t_silence.silence_id\"\n @room.user.say 'alice', '@hubot finished centerdevice deployment'\n\n ", "end": 16514, "score": 0.9005494713783264, "start": 16509, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot finished centerdevice deployment']\n ", "end": 16662, "score": 0.5462235808372498, "start": 16657, "tag": "USERNAME", "value": "alice" }, { "context": " centerdevice deployment']\n ['hubot', \"@alice Hm, there's no active Bosun silence. You're sure ", "end": 16739, "score": 0.7877804040908813, "start": 16732, "tag": "USERNAME", "value": "\"@alice" }, { "context": " co =>\n yield @room.user.say 'alice', '@hubot finished centerdevice deployment'\n ", "end": 17092, "score": 0.8167241215705872, "start": 17087, "tag": "USERNAME", "value": "alice" }, { "context": " expect(@room.messages).to.eql [\n ['alice', '@hubot finished centerdevice deployment']\n ", "end": 17282, "score": 0.8005289435386658, "start": 17277, "tag": "USERNAME", "value": "alice" }, { "context": "nterdevice deployment']\n ['hubot', \"@alice Ok, I'll clear the Bosun silence for your deploym", "end": 17359, "score": 0.9646332859992981, "start": 17354, "tag": "USERNAME", "value": "alice" }, { "context": "sun can calm down ...\"]\n ['hubot', '@alice Trying to clear Bosun silence for your deployment", "end": 17542, "score": 0.9633608460426331, "start": 17537, "tag": "USERNAME", "value": "alice" }, { "context": " for your deployment.']\n ['hubot', '@alice Ouuch, request for bosun.clear_silence timed out ", "end": 17627, "score": 0.9621109366416931, "start": 17622, "tag": "USERNAME", "value": "alice" }, { "context": "your deployment.']\n ['hubot', '@alice Ouuch, request for bosun.clear_silence timed out ... so", "end": 17633, "score": 0.6035120487213135, "start": 17628, "tag": "NAME", "value": "Ouuch" }, { "context": "or unauthorized user\", ->\n @room.user.say('bob', '@hubot starting centerdevice deployment').then", "end": 18126, "score": 0.765265166759491, "start": 18123, "tag": "USERNAME", "value": "bob" }, { "context": "centerdevice deployment']\n ['hubot', \"@bob Sorry, you're not allowed to do that. You need th", "end": 18312, "score": 0.9894388318061829, "start": 18309, "tag": "USERNAME", "value": "bob" }, { "context": "or unauthorized user\", ->\n @room.user.say('bob', '@hubot finished centerdevice deployment').then", "end": 18490, "score": 0.8333652019500732, "start": 18487, "tag": "USERNAME", "value": "bob" }, { "context": " expect(@room.messages).to.eql [\n ['bob', '@hubot finished centerdevice deployment']\n ", "end": 18603, "score": 0.612106442451477, "start": 18600, "tag": "USERNAME", "value": "bob" }, { "context": "ed centerdevice deployment']\n ['hubot', \"@bob Sorry, you're not allowed to do that. You need th", "end": 18676, "score": 0.8091968297958374, "start": 18671, "tag": "USERNAME", "value": "\"@bob" }, { "context": "h\n hasRole: (user, role) ->\n if user.name is 'alice' and role is 'centerdevice' then true else false\n", "end": 19642, "score": 0.9987658262252808, "start": 19637, "tag": "USERNAME", "value": "alice" } ]
test/centerdevice-test.coffee
CenterDevice/hubot-centerdevice
0
Helper = require('hubot-test-helper') chai = require 'chai' Promise = require('bluebird') co = require('co') expect = chai.expect process.env.EXPRESS_PORT = 18080 api_call_delay = 20 customMessages = [] describe 'centerdevice', -> beforeEach -> @room = setup_test_env {} afterEach -> tear_down_test_env @room context "deployment", -> context "authorized user", -> context "deployment alert", -> it "set deployment alert to silence", -> @room.user.say('alice', '@hubot set centerdevice deployment alert to bla.blupp').then => expect(@room.messages).to.eql [ ['alice', '@hubot set centerdevice deployment alert to bla.blupp'] ['hubot', "@alice Yay. I just set the deployment alert to silence to 'bla.blupp'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.alert" ).to.eql "bla.blupp" it "get default deployment alert to silence", -> @room.user.say('alice', '@hubot get centerdevice deployment alert').then => expect(@room.messages).to.eql [ ['alice', '@hubot get centerdevice deployment alert'] ['hubot', "@alice Ja, the current deployment alert to silence is 'test.lukas'. Hope, that helps."] ] context "get deployment alert to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.alert", "bla.blupp" @room.user.say 'alice', '@hubot get centerdevice deployment alert' it "get", -> expect(@room.messages).to.eql [ ['alice', '@hubot get centerdevice deployment alert'] ['hubot', "@alice Ja, the current deployment alert to silence is 'bla.blupp'. Hope, that helps."] ] context "deployment tags", -> it "set deployment tags to silence", -> @room.user.say('alice', '@hubot set centerdevice deployment tags to host=muffin,service=lukas').then => expect(@room.messages).to.eql [ ['alice', '@hubot set centerdevice deployment tags to host=muffin,service=lukas'] ['hubot', "@alice Yay. I just set the deployment tags to silence to 'host=muffin,service=lukas'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.tags" ).to.eql "host=muffin,service=lukas" it "get default deployment tags to silence", -> @room.user.say('alice', '@hubot get centerdevice deployment tags').then => expect(@room.messages).to.eql [ ['alice', '@hubot get centerdevice deployment tags'] ['hubot', "@alice Ja, the current deployment tags to silence are 'host=muffin,service=lukas'. Hope, that helps."] ] context "get deployment tags to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.tags", "host=nuss,service=centerdevice" @room.user.say 'alice', '@hubot get centerdevice deployment tags' it "get", -> expect(@room.messages).to.eql [ ['alice', '@hubot get centerdevice deployment tags'] ['hubot', "@alice Ja, the current deployment tags to silence are 'host=nuss,service=centerdevice'. Hope, that helps."] ] context "start deployment", -> context "start deployment successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> if event.alert? and event.tags? robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" else robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Alert ('#{event.alert}') or tags ('#{event.tags}') have not been set correctly." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment whit message successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', "@hubot starting centerdevice deployment because I'm bored" yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', "@hubot starting centerdevice deployment because I'm bored"] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', "@alice Ok, let me silence Bosun because I'm bored ..."] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment successfully and silence expires", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', "@alice Hey, your Bosun silence with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7 expired, but it seems you're still deploying?! Are you okay?"] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment failed", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Oouch: Failed to set Bosun silence because Bosun failed.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "try to start deployment with pending silence", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "dd406bdce72df2e8c69b5ee396126a7ed8f3bf44" @room.user.say 'alice', '@hubot starting centerdevice deployment' it "start deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', "@alice Ouuch, there's already a deployment silence with id dd406bdce72df2e8c69b5ee396126a7ed8f3bf44 pending. Finish that deployment and ask Bosun for active silences."] ] context "start deployment timed out", -> beforeEach -> co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 200 it "start deployment", -> @room.messages.splice(1,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', '@alice Ouuch, request for bosun.set_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment", -> context "finish deployment successfully", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "finish deployment with delay running out after silence becomes inactive", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield @room.user.say 'alice', '@hubot finish centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['alice', '@hubot finish centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment failed", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.failed', user: event.user room: event.room silence_id: event.silence_id message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Oouch: Failed to clear Bosun silence with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7, because Bosun failed. Please talk directly to Bosun to clear the silence.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "try to finish deployment with no pending silence", -> beforeEach -> @room.robot.brain.remove "centerdevice.bosun.set_silence.silence_id" @room.user.say 'alice', '@hubot finished centerdevice deployment' it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Hm, there's no active Bosun silence. You're sure there's a deployment going on?"] ] context "finish deployment timed out", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 300 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ['hubot', '@alice Ouuch, request for bosun.clear_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "unauthorized user", -> it "fail to start deployment for unauthorized user", -> @room.user.say('bob', '@hubot starting centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot starting centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] it "fail to finish deployment for unauthorized user", -> @room.user.say('bob', '@hubot finished centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot finished centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] setup_test_env = (env) -> process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_ALERT = "test.lukas" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_TAGS = "host=muffin,service=lukas" process.env.HUBOT_CENTERDEVICE_ROLE = "centerdevice" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_SILENCE_DURATION = "10m" process.env.HUBOT_CENTERDEVICE_LOG_LEVEL = "error" process.env.HUBOT_CENTERDEVICE_BOSUN_TIMEOUT = 100 process.env.HUBOT_CENTERDEVICE_SILENCE_CHECK_INTERVAL = 200 process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY = 100 helper = new Helper('../src/centerdevice.coffee') room = helper.createRoom() room.robot.auth = new MockAuth room tear_down_test_env = (room) -> room.destroy() # Force reload of module under test delete require.cache[require.resolve('../src/centerdevice')] class MockAuth hasRole: (user, role) -> if user.name is 'alice' and role is 'centerdevice' then true else false
91200
Helper = require('hubot-test-helper') chai = require 'chai' Promise = require('bluebird') co = require('co') expect = chai.expect process.env.EXPRESS_PORT = 18080 api_call_delay = 20 customMessages = [] describe 'centerdevice', -> beforeEach -> @room = setup_test_env {} afterEach -> tear_down_test_env @room context "deployment", -> context "authorized user", -> context "deployment alert", -> it "set deployment alert to silence", -> @room.user.say('alice', '@hubot set centerdevice deployment alert to bla.blupp').then => expect(@room.messages).to.eql [ ['<NAME>', '@hubot set centerdevice deployment alert to bla.blupp'] ['hubot', "@alice <NAME>. I just set the deployment alert to silence to 'bla.blupp'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.alert" ).to.eql "bla.blupp" it "get default deployment alert to silence", -> @room.user.say('<NAME>', '@hubot get centerdevice deployment alert').then => expect(@room.messages).to.eql [ ['<NAME>', '@hubot get centerdevice deployment alert'] ['hubot',<NAME> "@alice <NAME>a, the current deployment alert to silence is 'test.lukas'. Hope, that helps."] ] context "get deployment alert to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.alert", "bla.blupp" @room.user.say '<NAME>', '@hubot get centerdevice deployment alert' it "get", -> expect(@room.messages).to.eql [ ['<NAME>', '@hubot get centerdevice deployment alert'] ['hubot', "@alice <NAME>, the current deployment alert to silence is 'bla.blupp'. Hope, that helps."] ] context "deployment tags", -> it "set deployment tags to silence", -> @room.user.say('<NAME>', '@hubot set centerdevice deployment tags to host=muffin,service=lukas').then => expect(@room.messages).to.eql [ ['<NAME>', '@hubot set centerdevice deployment tags to host=muffin,service=lukas'] ['hubot',<NAME> "@alice <NAME>. I just set the deployment tags to silence to 'host=muffin,service=lukas'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.tags" ).to.eql "host=muffin,service=lukas" it "get default deployment tags to silence", -> @room.user.say('<NAME>', '@hubot get centerdevice deployment tags').then => expect(@room.messages).to.eql [ ['<NAME>', '@hubot get centerdevice deployment tags'] ['hubot',<NAME> "@<NAME>, the current deployment tags to silence are 'host=muffin,service=lukas'. Hope, that helps."] ] context "get deployment tags to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.tags", "host=nuss,service=centerdevice" @room.user.say '<NAME>', '@hubot get centerdevice deployment tags' it "get", -> expect(@room.messages).to.eql [ ['<NAME>', '@hubot get centerdevice deployment tags'] ['hubot',<NAME> "@<NAME> <NAME>, the current deployment tags to silence are 'host=nuss,service=centerdevice'. Hope, that helps."] ] context "start deployment", -> context "start deployment successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> if event.alert? and event.tags? robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" else robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Alert ('#{event.alert}') or tags ('#{event.tags}') have not been set correctly." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e8<KEY>c<KEY>.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment whit message successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', "@hubot starting centerdevice deployment because I'm bored" yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', "@hubot starting centerdevice deployment because I'm bored"] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', "@alice Ok, let me silence Bosun because I'm bored ..."] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment successfully and silence expires", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id <KEY>.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', "@alice Hey, your Bosun silence with id <KEY> expired, but it seems you're still deploying?! Are you okay?"] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment failed", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Oouch: Failed to set Bosun silence because Bosun failed.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "try to start deployment with pending silence", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "dd406bdce72df2e8c69b5ee396126a7ed8f3bf44" @room.user.say 'alice', '@hubot starting centerdevice deployment' it "start deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', "@alice O<NAME>uch, there's already a deployment silence with id dd406bdce72df2e8c69b5ee396126a7ed8f3bf44 pending. Finish that deployment and ask Bosun for active silences."] ] context "start deployment timed out", -> beforeEach -> co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 200 it "start deployment", -> @room.messages.splice(1,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', '@alice <NAME>, request for bosun.set_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment", -> context "finish deployment successfully", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "finish deployment with delay running out after silence becomes inactive", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9<KEY>" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say '<NAME>', '@hubot starting centerdevice deployment' yield @room.user.say '<NAME>', '@hubot finish centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id <KEY>.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['alice', '@hubot finish centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id <KEY>.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment failed", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c38<KEY>d29dc<KEY>" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.failed', user: event.user room: event.room silence_id: event.silence_id message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Oouch: Failed to clear Bosun silence with id <KEY>, because Bosun failed. Please talk directly to Bosun to clear the silence.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "try to finish deployment with no pending silence", -> beforeEach -> @room.robot.brain.remove "centerdevice.bosun.set_silence.silence_id" @room.user.say 'alice', '@hubot finished centerdevice deployment' it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Hm, there's no active Bosun silence. You're sure there's a deployment going on?"] ] context "finish deployment timed out", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 300 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ['hubot', '@alice <NAME>, request for bosun.clear_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "unauthorized user", -> it "fail to start deployment for unauthorized user", -> @room.user.say('bob', '@hubot starting centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot starting centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] it "fail to finish deployment for unauthorized user", -> @room.user.say('bob', '@hubot finished centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot finished centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] setup_test_env = (env) -> process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_ALERT = "test.lukas" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_TAGS = "host=muffin,service=lukas" process.env.HUBOT_CENTERDEVICE_ROLE = "centerdevice" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_SILENCE_DURATION = "10m" process.env.HUBOT_CENTERDEVICE_LOG_LEVEL = "error" process.env.HUBOT_CENTERDEVICE_BOSUN_TIMEOUT = 100 process.env.HUBOT_CENTERDEVICE_SILENCE_CHECK_INTERVAL = 200 process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY = 100 helper = new Helper('../src/centerdevice.coffee') room = helper.createRoom() room.robot.auth = new MockAuth room tear_down_test_env = (room) -> room.destroy() # Force reload of module under test delete require.cache[require.resolve('../src/centerdevice')] class MockAuth hasRole: (user, role) -> if user.name is 'alice' and role is 'centerdevice' then true else false
true
Helper = require('hubot-test-helper') chai = require 'chai' Promise = require('bluebird') co = require('co') expect = chai.expect process.env.EXPRESS_PORT = 18080 api_call_delay = 20 customMessages = [] describe 'centerdevice', -> beforeEach -> @room = setup_test_env {} afterEach -> tear_down_test_env @room context "deployment", -> context "authorized user", -> context "deployment alert", -> it "set deployment alert to silence", -> @room.user.say('alice', '@hubot set centerdevice deployment alert to bla.blupp').then => expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot set centerdevice deployment alert to bla.blupp'] ['hubot', "@alice PI:NAME:<NAME>END_PI. I just set the deployment alert to silence to 'bla.blupp'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.alert" ).to.eql "bla.blupp" it "get default deployment alert to silence", -> @room.user.say('PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment alert').then => expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment alert'] ['hubot',PI:NAME:<NAME>END_PI "@alice PI:NAME:<NAME>END_PIa, the current deployment alert to silence is 'test.lukas'. Hope, that helps."] ] context "get deployment alert to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.alert", "bla.blupp" @room.user.say 'PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment alert' it "get", -> expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment alert'] ['hubot', "@alice PI:NAME:<NAME>END_PI, the current deployment alert to silence is 'bla.blupp'. Hope, that helps."] ] context "deployment tags", -> it "set deployment tags to silence", -> @room.user.say('PI:NAME:<NAME>END_PI', '@hubot set centerdevice deployment tags to host=muffin,service=lukas').then => expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot set centerdevice deployment tags to host=muffin,service=lukas'] ['hubot',PI:NAME:<NAME>END_PI "@alice PI:NAME:<NAME>END_PI. I just set the deployment tags to silence to 'host=muffin,service=lukas'. Happy deploying!"] ] expect(@room.robot.brain.get "centerdevice.config.tags" ).to.eql "host=muffin,service=lukas" it "get default deployment tags to silence", -> @room.user.say('PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment tags').then => expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment tags'] ['hubot',PI:NAME:<NAME>END_PI "@PI:NAME:<NAME>END_PI, the current deployment tags to silence are 'host=muffin,service=lukas'. Hope, that helps."] ] context "get deployment tags to silence after setting", -> beforeEach -> @room.robot.brain.set "centerdevice.config.tags", "host=nuss,service=centerdevice" @room.user.say 'PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment tags' it "get", -> expect(@room.messages).to.eql [ ['PI:NAME:<NAME>END_PI', '@hubot get centerdevice deployment tags'] ['hubot',PI:NAME:<NAME>END_PI "@PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI, the current deployment tags to silence are 'host=nuss,service=centerdevice'. Hope, that helps."] ] context "start deployment", -> context "start deployment successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> if event.alert? and event.tags? robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" else robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Alert ('#{event.alert}') or tags ('#{event.tags}') have not been set correctly." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e8PI:KEY:<KEY>END_PIcPI:KEY:<KEY>END_PI.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment whit message successfully", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "10m" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', "@hubot starting centerdevice deployment because I'm bored" yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', "@hubot starting centerdevice deployment because I'm bored"] ['hubot', '@alice Set Bosun silence successfully for 10m with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', "@alice Ok, let me silence Bosun because I'm bored ..."] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql "6e89533c74c3f9b74417b37e7cce75c384d29dc7" expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment successfully and silence expires", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id PI:KEY:<KEY>END_PI.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', "@alice Hey, your Bosun silence with id PI:KEY:<KEY>END_PI expired, but it seems you're still deploying?! Are you okay?"] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "start deployment failed", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.failed', user: event.user room: event.room message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 50 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Oouch: Failed to set Bosun silence because Bosun failed.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "try to start deployment with pending silence", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "dd406bdce72df2e8c69b5ee396126a7ed8f3bf44" @room.user.say 'alice', '@hubot starting centerdevice deployment' it "start deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', "@alice OPI:NAME:<NAME>END_PIuch, there's already a deployment silence with id dd406bdce72df2e8c69b5ee396126a7ed8f3bf44 pending. Finish that deployment and ask Bosun for active silences."] ] context "start deployment timed out", -> beforeEach -> co => yield @room.user.say 'alice', '@hubot starting centerdevice deployment' yield new Promise.delay 200 it "start deployment", -> @room.messages.splice(1,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['hubot', '@alice PI:NAME:<NAME>END_PI, request for bosun.set_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment", -> context "finish deployment successfully", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id 6e89533c74c3f9b74417b37e7cce75c384d29dc7.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "finish deployment with delay running out after silence becomes inactive", -> beforeEach -> robot = @room.robot @room.robot.on 'bosun.set_silence', (event) -> robot.emit 'bosun.result.set_silence.successful', user: event.user room: event.room duration: "1s" silence_id: "6e89533c74c3f9PI:KEY:<KEY>END_PI" @room.robot.on 'bosun.check_silence', (event) -> robot.emit 'bosun.result.check_silence.successful', user: event.user room: event.room silence_id: "6e89533c74c3f9b74417b37e7cce75c384d29dc7" active: false @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.successful', user: event.user room: event.room silence_id: event.silence_id co => yield @room.user.say 'PI:NAME:<NAME>END_PI', '@hubot starting centerdevice deployment' yield @room.user.say 'PI:NAME:<NAME>END_PI', '@hubot finish centerdevice deployment' yield new Promise.delay 1100 it "start deployment", -> @room.messages.splice(2,1) # Remove random bullshit msg expect(@room.messages).to.eql [ ['alice', '@hubot starting centerdevice deployment'] ['hubot', '@alice Set Bosun silence successfully for 1s with id PI:KEY:<KEY>END_PI.'] ['hubot', '@alice Ok, let me silence Bosun because deployment ...'] ['alice', '@hubot finish centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Cleared Bosun silence successfully with id PI:KEY:<KEY>END_PI.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.set_silence.pending" ).to.eql null context "finish deployment failed", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c38PI:KEY:<KEY>END_PId29dcPI:KEY:<KEY>END_PI" robot = @room.robot @room.robot.on 'bosun.clear_silence', (event) -> robot.emit 'bosun.result.clear_silence.failed', user: event.user room: event.room silence_id: event.silence_id message: "Bosun failed." co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 200 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Oouch: Failed to clear Bosun silence with id PI:KEY:<KEY>END_PI, because Bosun failed. Please talk directly to Bosun to clear the silence.'] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "try to finish deployment with no pending silence", -> beforeEach -> @room.robot.brain.remove "centerdevice.bosun.set_silence.silence_id" @room.user.say 'alice', '@hubot finished centerdevice deployment' it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Hm, there's no active Bosun silence. You're sure there's a deployment going on?"] ] context "finish deployment timed out", -> beforeEach -> @room.robot.brain.set "centerdevice.bosun.set_silence.silence_id", "6e89533c74c3f9b74417b37e7cce75c384d29dc7" co => yield @room.user.say 'alice', '@hubot finished centerdevice deployment' yield new Promise.delay 300 it "finish deployment", -> expect(@room.messages).to.eql [ ['alice', '@hubot finished centerdevice deployment'] ['hubot', "@alice Ok, I'll clear the Bosun silence for your deployment in #{process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY / 60000} min so Bosun can calm down ..."] ['hubot', '@alice Trying to clear Bosun silence for your deployment.'] ['hubot', '@alice PI:NAME:<NAME>END_PI, request for bosun.clear_silence timed out ... sorry.'] ] expect(@room.robot.brain.get "centerdevice.bosun.set_silence.silence_id" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.timeout" ).to.eql null expect(@room.robot.brain.get "centerdevice.bosun.clear_silence.pending" ).to.eql null context "unauthorized user", -> it "fail to start deployment for unauthorized user", -> @room.user.say('bob', '@hubot starting centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot starting centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] it "fail to finish deployment for unauthorized user", -> @room.user.say('bob', '@hubot finished centerdevice deployment').then => expect(@room.messages).to.eql [ ['bob', '@hubot finished centerdevice deployment'] ['hubot', "@bob Sorry, you're not allowed to do that. You need the 'centerdevice' role."] ] setup_test_env = (env) -> process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_ALERT = "test.lukas" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_BOSUN_TAGS = "host=muffin,service=lukas" process.env.HUBOT_CENTERDEVICE_ROLE = "centerdevice" process.env.HUBOT_CENTERDEVICE_DEPLOYMENT_SILENCE_DURATION = "10m" process.env.HUBOT_CENTERDEVICE_LOG_LEVEL = "error" process.env.HUBOT_CENTERDEVICE_BOSUN_TIMEOUT = 100 process.env.HUBOT_CENTERDEVICE_SILENCE_CHECK_INTERVAL = 200 process.env.HUBOT_CENTERDEVICE_SILENCE_CLEAR_DELAY = 100 helper = new Helper('../src/centerdevice.coffee') room = helper.createRoom() room.robot.auth = new MockAuth room tear_down_test_env = (room) -> room.destroy() # Force reload of module under test delete require.cache[require.resolve('../src/centerdevice')] class MockAuth hasRole: (user, role) -> if user.name is 'alice' and role is 'centerdevice' then true else false
[ { "context": " _roleId: 2\n phone: '13011111111'\n email: '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85", "end": 420, "score": 0.9999130368232727, "start": 394, "tag": "EMAIL", "value": "13011111111@teambition.com" }, { "context": " email: '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231", "end": 434, "score": 0.41973286867141724, "start": 433, "tag": "USERNAME", "value": "1" }, { "context": " email: '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231'", "end": 435, "score": 0.3579805791378021, "start": 434, "tag": "PASSWORD", "value": "3" }, { "context": " email: '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231'\n ", "end": 437, "score": 0.45738521218299866, "start": 435, "tag": "USERNAME", "value": "01" }, { "context": "il: '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231'\n _", "end": 441, "score": 0.3812069892883301, "start": 439, "tag": "PASSWORD", "value": "11" }, { "context": " '13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231'\n _ro", "end": 443, "score": 0.3805864751338959, "start": 442, "tag": "PASSWORD", "value": "1" }, { "context": "'13011111111@teambition.com'\n name: '13011111111'\n ,\n _id: '55f7d19c85efe377996a1231'\n _rol", "end": 444, "score": 0.33081862330436707, "start": 443, "tag": "USERNAME", "value": "1" }, { "context": " _roleId: 0\n phone: '13011111112'\n email: '13011111112@teambition.com'\n name: '13011111111'\n ],\n \"55f7d19c85efe377", "end": 564, "score": 0.9999151825904846, "start": 538, "tag": "EMAIL", "value": "13011111112@teambition.com" }, { "context": " email: '13011111112@teambition.com'\n name: '13011111111'\n ],\n \"55f7d19c85efe377996a114f\": [\n _id: '5", "end": 588, "score": 0.5480905175209045, "start": 577, "tag": "USERNAME", "value": "13011111111" }, { "context": " _roleId: 0\n phone: '13011111112'\n email: '13011111112@teambition.com'\n name: '13011111111'\n ]\n\napp.get '/tbapi/org", "end": 741, "score": 0.9999030828475952, "start": 715, "tag": "EMAIL", "value": "13011111112@teambition.com" } ]
talk-api2x/test/servers/teambition.coffee
ikingye/talk-os
3,084
express = require 'express' _ = require 'lodash' module.exports = app = express() tbOrgs = '55f7d19c85efe377996a113f': _id: "55f7d19c85efe377996a113f" name: "orgz1" '55f7d19c85efe377996a114f': _id: "55f7d19c85efe377996a114f" name: "orgz2" tbMembers = "55f7d19c85efe377996a113f": [ _id: '55f7d19c85efe377996a1230' _roleId: 2 phone: '13011111111' email: '13011111111@teambition.com' name: '13011111111' , _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: '13011111112@teambition.com' name: '13011111111' ], "55f7d19c85efe377996a114f": [ _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: '13011111112@teambition.com' name: '13011111111' ] app.get '/tbapi/organizations', (req, res) -> res.status(200).json _.values(tbOrgs) app.get '/tbapi/organizations/:_id', (req, res) -> res.status(200).json tbOrgs[req.params._id] app.get '/tbapi/v2/organizations/:_id/members', (req, res) -> res.status(200).json tbMembers[req.params._id] app.get '/url/content', (req, res) -> res.set 'Content-Type', 'text/html' res.status(200).send '<title> jianliao</title>'
223582
express = require 'express' _ = require 'lodash' module.exports = app = express() tbOrgs = '55f7d19c85efe377996a113f': _id: "55f7d19c85efe377996a113f" name: "orgz1" '55f7d19c85efe377996a114f': _id: "55f7d19c85efe377996a114f" name: "orgz2" tbMembers = "55f7d19c85efe377996a113f": [ _id: '55f7d19c85efe377996a1230' _roleId: 2 phone: '13011111111' email: '<EMAIL>' name: '1<PASSWORD>0111<PASSWORD>1<PASSWORD>1' , _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: '<EMAIL>' name: '13011111111' ], "55f7d19c85efe377996a114f": [ _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: '<EMAIL>' name: '13011111111' ] app.get '/tbapi/organizations', (req, res) -> res.status(200).json _.values(tbOrgs) app.get '/tbapi/organizations/:_id', (req, res) -> res.status(200).json tbOrgs[req.params._id] app.get '/tbapi/v2/organizations/:_id/members', (req, res) -> res.status(200).json tbMembers[req.params._id] app.get '/url/content', (req, res) -> res.set 'Content-Type', 'text/html' res.status(200).send '<title> jianliao</title>'
true
express = require 'express' _ = require 'lodash' module.exports = app = express() tbOrgs = '55f7d19c85efe377996a113f': _id: "55f7d19c85efe377996a113f" name: "orgz1" '55f7d19c85efe377996a114f': _id: "55f7d19c85efe377996a114f" name: "orgz2" tbMembers = "55f7d19c85efe377996a113f": [ _id: '55f7d19c85efe377996a1230' _roleId: 2 phone: '13011111111' email: 'PI:EMAIL:<EMAIL>END_PI' name: '1PI:PASSWORD:<PASSWORD>END_PI0111PI:PASSWORD:<PASSWORD>END_PI1PI:PASSWORD:<PASSWORD>END_PI1' , _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: 'PI:EMAIL:<EMAIL>END_PI' name: '13011111111' ], "55f7d19c85efe377996a114f": [ _id: '55f7d19c85efe377996a1231' _roleId: 0 phone: '13011111112' email: 'PI:EMAIL:<EMAIL>END_PI' name: '13011111111' ] app.get '/tbapi/organizations', (req, res) -> res.status(200).json _.values(tbOrgs) app.get '/tbapi/organizations/:_id', (req, res) -> res.status(200).json tbOrgs[req.params._id] app.get '/tbapi/v2/organizations/:_id/members', (req, res) -> res.status(200).json tbMembers[req.params._id] app.get '/url/content', (req, res) -> res.set 'Content-Type', 'text/html' res.status(200).send '<title> jianliao</title>'
[ { "context": "ype: #{compression}\\n\"\n # TODO: 12.4.2007 (tmason@wesabe.com) - use nsIStreamConverterService\n # (@mozi", "end": 2014, "score": 0.9999292492866516, "start": 1997, "tag": "EMAIL", "value": "tmason@wesabe.com" } ]
application/components/wesabe-sniffer.coffee
wesabe/ssu
28
# # Wesabe Firefox Uploader # Copyright (C) 2007 Wesabe, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # WCS_CID = Components.ID("{707ffd4c-2d95-4d04-af12-38c8137b387d}") Cc = Components.classes Ci = Components.interfaces Cr = Components.results class WesabeSniffer QueryInterface: (iid) -> if iid.equals(Ci.nsISupports) or iid.equals(Ci.nsIContentSniffer) return this throw Cr.NS_ERROR_NO_INTERFACE dataToString: (data) -> chars = "" shortCircuit = Math.min(data.length, 499) data = data[0...shortCircuit] for charCode in data if charCode isnt 0 chars += String.fromCharCode charCode chars.replace /^\s+|\s+$/, '' getMIMETypeFromContent: (request, data, length) -> # dump "WesabeSniffer.getMIMETypeFromContent(#{request}, #{data}, #{length})\n" collecting = true if collecting # Checkable - data is uncompressed and available for inspection/verification of file type checkable = false try # chan = request.QueryInterface Ci.nsIChannel # dump "WesabeSniffer.getMTFC: mime-type: #{chan.contentType}\n" http = request.QueryInterface Ci.nsIHttpChannel compression = http.getResponseHeader "Content-Encoding" # dump "WesabeSniffer.getMTFC: encoding-type: #{compression}\n" # TODO: 12.4.2007 (tmason@wesabe.com) - use nsIStreamConverterService # (@mozilla.org/streamConverters;1) for a conversion from gzip to uncompressed. catch ex checkable = true ext = "" try http = request.QueryInterface Ci.nsIHttpChannel cdHeader = http.getResponseHeader "content-disposition" # dump "WesabeSniffer.getMTFC: content-disposition: #{cdHeader}\n" if cdHeader.length > 0 cd = cdHeader.toLowerCase().split('filename=') if cd.length > 1 and cd[1].length > 0 filename = cd[1] # dump "WesabeSniffer.getMTFC: filename: #{filename}}\n" ext = @sniffExt filename # dump "WesabeSniffer.getMTFC: sniffed extension revealed '#{ext}'\n" catch ex # do nothing - merely means the header does not exist if ext.length > 0 or checkable # dump "WesabeSniffer.getMTFC: --- Content sniffing --- " intercept = true stringData = @dataToString data # dump "WesabeSniffer: getMTFC: checking data: \n#{stringData[0...25]}\n" con = new FileTyper stringData # dump "WesabeSniffer: getMTFC: sniffed content revealed #{con.isSupportedType() and "supported" or "unsupported"} type: '#{con}' versus extension '#{ext}'\n" if con.isSupportedType() and ext.toUpperCase() isnt con.getType() ext = con.getType() if ext.length > 0 try http = request.QueryInterface Ci.nsIHttpChannel # NOTE: We clear the Content-Disposition header because otherwise XulRunner will attempt # to present the file download prompt. We don't want that, but we do want the suggested # filename, so we try to save the original Content-Disposition header. try http.setResponseHeader "X-SSU-Content-Disposition", http.getResponseHeader("Content-Disposition"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Disposition header: #{ex.message}\n" http.setResponseHeader "Content-Disposition", "", false catch ex dump "WesabeSniffer.getMTFC: can't unset content-disposition: #{ex.message}\n" try http = request.QueryInterface Ci.nsIHttpChannel try http.setResponseHeader "X-SSU-Content-Type", http.getResponseHeader("Content-Type"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Type header: #{ex.message}\n" catch ex # dump "WesabeSniffer: getMTFC: marking request for intercept\n" return "application/x-ssu-intercept" sniffExt: (filename) -> ext = filename.match(/\.(\w+)/)?[1]?.toLowerCase() if ext in ['ofx', 'qif', 'ofc', 'qfx', 'pdf'] ext else '' WesabeSnifferFactory = createInstance: (outer, iid) -> if outer isnt null throw Cr.NS_ERROR_NO_AGGREGATION return new WesabeSniffer() WesabeSnifferModule = firstTime: true registerSelf: (compMgr, fileSpec, location, type) -> compMgr = compMgr.QueryInterface Ci.nsIComponentRegistrar compMgr.registerFactoryLocation WCS_CID, "Wesabe Sniffer", "@wesabe.com/contentsniffer;1", fileSpec, location, type unregisterSelf: (compMgr, fileSpec, location) -> getClassObject: (compMgr, cid, iid) -> unless iid.equals Ci.nsIFactory throw Cr.NS_ERROR_NOT_IMPLEMENTED if cid.equals WCS_CID return WesabeSnifferFactory throw Cr.NS_ERROR_NO_INTERFACE canUnload: (compMgr) -> true @NSGetModule = (compMgr, fileSpec) -> WesabeSnifferModule # FileTyper - guess at the type of data file based on magic-number-like markers TYPE = UNKNOWN : "UNKNOWN" OFX1 : "OFX/1" OFX2 : "OFX/2" OFC : "OFC" QIF : "QIF" PDF : "PDF" HTML : "HTML" MSMONEY : "MSMONEY-DB" # These regexes are run in (random, I think) order over the contents, # so be sure that none of the overlap. MARKER = OFX1 : new RegExp('OFXHEADER:', "i") OFX2 : new RegExp('<?OFX OFXHEADER="200"', "i") OFC : new RegExp('<OFC>', "i") QIF : /(^\^(EUR)*\s*$)|(^!Type:)/im PDF : /^%PDF-/ HTML : new RegExp('<HTML', "i") MSMONEY : new RegExp("MSMONEY-DB") class FileTyper constructor: (@contents) -> @filetype = @_guessType() _guessType: -> # Try each format-specific marker in turn. for own marker, pattern of MARKER if pattern.test @contents return TYPE[marker] return TYPE.UNKNOWN getType: -> @filetype toString: -> @filetype isUnknown: -> @filetype is TYPE.UNKNOWN isSupportedType: -> @filetype in [TYPE.OFX1, TYPE.OFX2, TYPE.OFC, TYPE.QIF, TYPE.PDF]
131658
# # Wesabe Firefox Uploader # Copyright (C) 2007 Wesabe, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # WCS_CID = Components.ID("{707ffd4c-2d95-4d04-af12-38c8137b387d}") Cc = Components.classes Ci = Components.interfaces Cr = Components.results class WesabeSniffer QueryInterface: (iid) -> if iid.equals(Ci.nsISupports) or iid.equals(Ci.nsIContentSniffer) return this throw Cr.NS_ERROR_NO_INTERFACE dataToString: (data) -> chars = "" shortCircuit = Math.min(data.length, 499) data = data[0...shortCircuit] for charCode in data if charCode isnt 0 chars += String.fromCharCode charCode chars.replace /^\s+|\s+$/, '' getMIMETypeFromContent: (request, data, length) -> # dump "WesabeSniffer.getMIMETypeFromContent(#{request}, #{data}, #{length})\n" collecting = true if collecting # Checkable - data is uncompressed and available for inspection/verification of file type checkable = false try # chan = request.QueryInterface Ci.nsIChannel # dump "WesabeSniffer.getMTFC: mime-type: #{chan.contentType}\n" http = request.QueryInterface Ci.nsIHttpChannel compression = http.getResponseHeader "Content-Encoding" # dump "WesabeSniffer.getMTFC: encoding-type: #{compression}\n" # TODO: 12.4.2007 (<EMAIL>) - use nsIStreamConverterService # (@mozilla.org/streamConverters;1) for a conversion from gzip to uncompressed. catch ex checkable = true ext = "" try http = request.QueryInterface Ci.nsIHttpChannel cdHeader = http.getResponseHeader "content-disposition" # dump "WesabeSniffer.getMTFC: content-disposition: #{cdHeader}\n" if cdHeader.length > 0 cd = cdHeader.toLowerCase().split('filename=') if cd.length > 1 and cd[1].length > 0 filename = cd[1] # dump "WesabeSniffer.getMTFC: filename: #{filename}}\n" ext = @sniffExt filename # dump "WesabeSniffer.getMTFC: sniffed extension revealed '#{ext}'\n" catch ex # do nothing - merely means the header does not exist if ext.length > 0 or checkable # dump "WesabeSniffer.getMTFC: --- Content sniffing --- " intercept = true stringData = @dataToString data # dump "WesabeSniffer: getMTFC: checking data: \n#{stringData[0...25]}\n" con = new FileTyper stringData # dump "WesabeSniffer: getMTFC: sniffed content revealed #{con.isSupportedType() and "supported" or "unsupported"} type: '#{con}' versus extension '#{ext}'\n" if con.isSupportedType() and ext.toUpperCase() isnt con.getType() ext = con.getType() if ext.length > 0 try http = request.QueryInterface Ci.nsIHttpChannel # NOTE: We clear the Content-Disposition header because otherwise XulRunner will attempt # to present the file download prompt. We don't want that, but we do want the suggested # filename, so we try to save the original Content-Disposition header. try http.setResponseHeader "X-SSU-Content-Disposition", http.getResponseHeader("Content-Disposition"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Disposition header: #{ex.message}\n" http.setResponseHeader "Content-Disposition", "", false catch ex dump "WesabeSniffer.getMTFC: can't unset content-disposition: #{ex.message}\n" try http = request.QueryInterface Ci.nsIHttpChannel try http.setResponseHeader "X-SSU-Content-Type", http.getResponseHeader("Content-Type"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Type header: #{ex.message}\n" catch ex # dump "WesabeSniffer: getMTFC: marking request for intercept\n" return "application/x-ssu-intercept" sniffExt: (filename) -> ext = filename.match(/\.(\w+)/)?[1]?.toLowerCase() if ext in ['ofx', 'qif', 'ofc', 'qfx', 'pdf'] ext else '' WesabeSnifferFactory = createInstance: (outer, iid) -> if outer isnt null throw Cr.NS_ERROR_NO_AGGREGATION return new WesabeSniffer() WesabeSnifferModule = firstTime: true registerSelf: (compMgr, fileSpec, location, type) -> compMgr = compMgr.QueryInterface Ci.nsIComponentRegistrar compMgr.registerFactoryLocation WCS_CID, "Wesabe Sniffer", "@wesabe.com/contentsniffer;1", fileSpec, location, type unregisterSelf: (compMgr, fileSpec, location) -> getClassObject: (compMgr, cid, iid) -> unless iid.equals Ci.nsIFactory throw Cr.NS_ERROR_NOT_IMPLEMENTED if cid.equals WCS_CID return WesabeSnifferFactory throw Cr.NS_ERROR_NO_INTERFACE canUnload: (compMgr) -> true @NSGetModule = (compMgr, fileSpec) -> WesabeSnifferModule # FileTyper - guess at the type of data file based on magic-number-like markers TYPE = UNKNOWN : "UNKNOWN" OFX1 : "OFX/1" OFX2 : "OFX/2" OFC : "OFC" QIF : "QIF" PDF : "PDF" HTML : "HTML" MSMONEY : "MSMONEY-DB" # These regexes are run in (random, I think) order over the contents, # so be sure that none of the overlap. MARKER = OFX1 : new RegExp('OFXHEADER:', "i") OFX2 : new RegExp('<?OFX OFXHEADER="200"', "i") OFC : new RegExp('<OFC>', "i") QIF : /(^\^(EUR)*\s*$)|(^!Type:)/im PDF : /^%PDF-/ HTML : new RegExp('<HTML', "i") MSMONEY : new RegExp("MSMONEY-DB") class FileTyper constructor: (@contents) -> @filetype = @_guessType() _guessType: -> # Try each format-specific marker in turn. for own marker, pattern of MARKER if pattern.test @contents return TYPE[marker] return TYPE.UNKNOWN getType: -> @filetype toString: -> @filetype isUnknown: -> @filetype is TYPE.UNKNOWN isSupportedType: -> @filetype in [TYPE.OFX1, TYPE.OFX2, TYPE.OFC, TYPE.QIF, TYPE.PDF]
true
# # Wesabe Firefox Uploader # Copyright (C) 2007 Wesabe, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # WCS_CID = Components.ID("{707ffd4c-2d95-4d04-af12-38c8137b387d}") Cc = Components.classes Ci = Components.interfaces Cr = Components.results class WesabeSniffer QueryInterface: (iid) -> if iid.equals(Ci.nsISupports) or iid.equals(Ci.nsIContentSniffer) return this throw Cr.NS_ERROR_NO_INTERFACE dataToString: (data) -> chars = "" shortCircuit = Math.min(data.length, 499) data = data[0...shortCircuit] for charCode in data if charCode isnt 0 chars += String.fromCharCode charCode chars.replace /^\s+|\s+$/, '' getMIMETypeFromContent: (request, data, length) -> # dump "WesabeSniffer.getMIMETypeFromContent(#{request}, #{data}, #{length})\n" collecting = true if collecting # Checkable - data is uncompressed and available for inspection/verification of file type checkable = false try # chan = request.QueryInterface Ci.nsIChannel # dump "WesabeSniffer.getMTFC: mime-type: #{chan.contentType}\n" http = request.QueryInterface Ci.nsIHttpChannel compression = http.getResponseHeader "Content-Encoding" # dump "WesabeSniffer.getMTFC: encoding-type: #{compression}\n" # TODO: 12.4.2007 (PI:EMAIL:<EMAIL>END_PI) - use nsIStreamConverterService # (@mozilla.org/streamConverters;1) for a conversion from gzip to uncompressed. catch ex checkable = true ext = "" try http = request.QueryInterface Ci.nsIHttpChannel cdHeader = http.getResponseHeader "content-disposition" # dump "WesabeSniffer.getMTFC: content-disposition: #{cdHeader}\n" if cdHeader.length > 0 cd = cdHeader.toLowerCase().split('filename=') if cd.length > 1 and cd[1].length > 0 filename = cd[1] # dump "WesabeSniffer.getMTFC: filename: #{filename}}\n" ext = @sniffExt filename # dump "WesabeSniffer.getMTFC: sniffed extension revealed '#{ext}'\n" catch ex # do nothing - merely means the header does not exist if ext.length > 0 or checkable # dump "WesabeSniffer.getMTFC: --- Content sniffing --- " intercept = true stringData = @dataToString data # dump "WesabeSniffer: getMTFC: checking data: \n#{stringData[0...25]}\n" con = new FileTyper stringData # dump "WesabeSniffer: getMTFC: sniffed content revealed #{con.isSupportedType() and "supported" or "unsupported"} type: '#{con}' versus extension '#{ext}'\n" if con.isSupportedType() and ext.toUpperCase() isnt con.getType() ext = con.getType() if ext.length > 0 try http = request.QueryInterface Ci.nsIHttpChannel # NOTE: We clear the Content-Disposition header because otherwise XulRunner will attempt # to present the file download prompt. We don't want that, but we do want the suggested # filename, so we try to save the original Content-Disposition header. try http.setResponseHeader "X-SSU-Content-Disposition", http.getResponseHeader("Content-Disposition"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Disposition header: #{ex.message}\n" http.setResponseHeader "Content-Disposition", "", false catch ex dump "WesabeSniffer.getMTFC: can't unset content-disposition: #{ex.message}\n" try http = request.QueryInterface Ci.nsIHttpChannel try http.setResponseHeader "X-SSU-Content-Type", http.getResponseHeader("Content-Type"), false catch ex dump "WesabeSniffer.getMTFC: can't preserve Content-Type header: #{ex.message}\n" catch ex # dump "WesabeSniffer: getMTFC: marking request for intercept\n" return "application/x-ssu-intercept" sniffExt: (filename) -> ext = filename.match(/\.(\w+)/)?[1]?.toLowerCase() if ext in ['ofx', 'qif', 'ofc', 'qfx', 'pdf'] ext else '' WesabeSnifferFactory = createInstance: (outer, iid) -> if outer isnt null throw Cr.NS_ERROR_NO_AGGREGATION return new WesabeSniffer() WesabeSnifferModule = firstTime: true registerSelf: (compMgr, fileSpec, location, type) -> compMgr = compMgr.QueryInterface Ci.nsIComponentRegistrar compMgr.registerFactoryLocation WCS_CID, "Wesabe Sniffer", "@wesabe.com/contentsniffer;1", fileSpec, location, type unregisterSelf: (compMgr, fileSpec, location) -> getClassObject: (compMgr, cid, iid) -> unless iid.equals Ci.nsIFactory throw Cr.NS_ERROR_NOT_IMPLEMENTED if cid.equals WCS_CID return WesabeSnifferFactory throw Cr.NS_ERROR_NO_INTERFACE canUnload: (compMgr) -> true @NSGetModule = (compMgr, fileSpec) -> WesabeSnifferModule # FileTyper - guess at the type of data file based on magic-number-like markers TYPE = UNKNOWN : "UNKNOWN" OFX1 : "OFX/1" OFX2 : "OFX/2" OFC : "OFC" QIF : "QIF" PDF : "PDF" HTML : "HTML" MSMONEY : "MSMONEY-DB" # These regexes are run in (random, I think) order over the contents, # so be sure that none of the overlap. MARKER = OFX1 : new RegExp('OFXHEADER:', "i") OFX2 : new RegExp('<?OFX OFXHEADER="200"', "i") OFC : new RegExp('<OFC>', "i") QIF : /(^\^(EUR)*\s*$)|(^!Type:)/im PDF : /^%PDF-/ HTML : new RegExp('<HTML', "i") MSMONEY : new RegExp("MSMONEY-DB") class FileTyper constructor: (@contents) -> @filetype = @_guessType() _guessType: -> # Try each format-specific marker in turn. for own marker, pattern of MARKER if pattern.test @contents return TYPE[marker] return TYPE.UNKNOWN getType: -> @filetype toString: -> @filetype isUnknown: -> @filetype is TYPE.UNKNOWN isSupportedType: -> @filetype in [TYPE.OFX1, TYPE.OFX2, TYPE.OFC, TYPE.QIF, TYPE.PDF]
[ { "context": " line breaks inside function parentheses\n# @author Teddy Katz\n###\n'use strict'\n\n#------------------------------", "end": 100, "score": 0.9998285174369812, "start": 90, "tag": "NAME", "value": "Teddy Katz" }, { "context": "]\n ,\n # TODO: uncomment if https://github.com/jashkenas/coffeescript/pull/5081 gets merged\n # ,\n # ", "end": 4535, "score": 0.9990482330322266, "start": 4526, "tag": "USERNAME", "value": "jashkenas" } ]
src/tests/rules/function-paren-newline.coffee
danielbayley/eslint-plugin-coffee
21
###* # @fileoverview enforce consistent line breaks inside function parentheses # @author Teddy Katz ### 'use strict' #------------------------------------------------------------------------------ # Requirements #------------------------------------------------------------------------------ rule = require '../../rules/function-paren-newline' {RuleTester} = require 'eslint' path = require 'path' #------------------------------------------------------------------------------ # Tests #------------------------------------------------------------------------------ LEFT_MISSING_ERROR = messageId: 'expectedAfter', type: 'Punctuator' LEFT_UNEXPECTED_ERROR = messageId: 'unexpectedAfter', type: 'Punctuator' RIGHT_MISSING_ERROR = messageId: 'expectedBefore', type: 'Punctuator' RIGHT_UNEXPECTED_ERROR = messageId: 'unexpectedBefore', type: 'Punctuator' ruleTester = new RuleTester parser: path.join __dirname, '../../..' ruleTester.run 'function-paren-newline', rule, valid: [ # multiline option (default) 'baz = (foo, bar) ->' '((foo, bar) ->)' '(foo, bar) => {}' '(foo) => {}' '() ->' '->' 'baz(foo, bar)' 'baz foo, bar' ''' baz a: 1 ''' ''' baz = ( foo, bar ) -> ''' ''' baz = ( foo bar ) -> ''' ''' baz( foo, bar ) ''' ''' baz("foo bar") ''' 'new Foo(bar, baz)' 'new Foo' 'new (Foo)' ''' (foo) (bar) ''' ''' foo.map (value) -> return value ''' , # always option code: 'baz = (foo, bar) ->' options: ['multiline'] , code: ''' baz = ( foo, bar ) -> ''' options: ['always'] , code: ''' baz( foo, bar ) ''' options: ['always'] , code: ''' baz( foo bar ) ''' options: ['always'] , code: ''' ( ) -> ''' options: ['always'] , # never option code: 'baz = (foo, bar) ->' options: ['never'] , code: '((foo, bar) ->)' options: ['never'] , code: 'baz(foo, bar)' options: ['never'] , code: 'baz foo, bar' options: ['never'] , code: '->' options: ['never'] , code: '() ->' options: ['never'] , # minItems option code: '(foo, bar) ->' options: [minItems: 3] , code: ''' ( foo, bar, qux ) -> ''' options: [minItems: 3] , code: ''' baz( foo, bar, qux ) ''' options: [minItems: 3] , code: 'baz(foo, bar)' options: [minItems: 3] , code: 'foo(bar, baz)' options: ['consistent'] , code: ''' foo(bar, baz) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: '->' options: ['always'] , code: ''' process.on 'exit', -> try fs.unlinkSync historyFile catch exception # Already deleted, nothing else to do. ''' options: ['always'] ] invalid: [ # multiline option (default) code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar) ''' # output: """ # baz(foo, bar) # """ errors: [LEFT_UNEXPECTED_ERROR] , code: ''' (foo, bar ) => {} ''' # output: """ # (foo, bar) => {} # """ errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # TODO: uncomment if https://github.com/jashkenas/coffeescript/pull/5081 gets merged # , # code: ''' # ( # foo = # 1 # ) -> # ''' # # output: """ # # function baz(foo = # # 1) {} # # """ # errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] code: ''' ( ) -> ''' # output: """ # function baz() {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' new Foo(bar, baz) ''' # output: """ # new Foo(\nbar, # baz\n) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' (### not fixed due to comment ### foo) -> ''' # output: null errors: [LEFT_UNEXPECTED_ERROR] , code: ''' baz = (foo ### not fixed due to comment ###) -> ''' # output: null errors: [RIGHT_UNEXPECTED_ERROR] , # always option code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ options: ['always'] errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ options: ['always'] errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '(foo, bar) ->' # output: 'function baz(\nfoo, bar\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '((foo, bar) ->)' # output: '(function(\nfoo, bar\n) {})' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: 'baz(foo, bar)' # output: 'baz(\nfoo, bar\n)' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '() ->' # output: 'function baz(\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , # never option code: ''' (foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function baz(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) => {} ''' # output: """ # (foo, # bar) => {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz( foo bar ) ''' # output: """ # baz(foo, # bar) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz = ( ) -> ''' # output: """ # function baz() {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # minItems option code: '(foo, bar, qux) ->' # output: 'function baz(\nfoo, bar, qux\n) {}' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: 'baz(foo, bar, qux)' # output: 'baz(\nfoo, bar, qux\n)' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar ) ''' # output: """ # baz(foo, # bar) # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' foo( bar, baz) ''' # output: """ # foo( # bar, # baz\n) # """ options: ['consistent'] errors: [RIGHT_MISSING_ERROR] , code: ''' foo(bar, baz ) ''' # output: """ # foo(bar, # baz) # """ options: ['consistent'] errors: [RIGHT_UNEXPECTED_ERROR] ]
222756
###* # @fileoverview enforce consistent line breaks inside function parentheses # @author <NAME> ### 'use strict' #------------------------------------------------------------------------------ # Requirements #------------------------------------------------------------------------------ rule = require '../../rules/function-paren-newline' {RuleTester} = require 'eslint' path = require 'path' #------------------------------------------------------------------------------ # Tests #------------------------------------------------------------------------------ LEFT_MISSING_ERROR = messageId: 'expectedAfter', type: 'Punctuator' LEFT_UNEXPECTED_ERROR = messageId: 'unexpectedAfter', type: 'Punctuator' RIGHT_MISSING_ERROR = messageId: 'expectedBefore', type: 'Punctuator' RIGHT_UNEXPECTED_ERROR = messageId: 'unexpectedBefore', type: 'Punctuator' ruleTester = new RuleTester parser: path.join __dirname, '../../..' ruleTester.run 'function-paren-newline', rule, valid: [ # multiline option (default) 'baz = (foo, bar) ->' '((foo, bar) ->)' '(foo, bar) => {}' '(foo) => {}' '() ->' '->' 'baz(foo, bar)' 'baz foo, bar' ''' baz a: 1 ''' ''' baz = ( foo, bar ) -> ''' ''' baz = ( foo bar ) -> ''' ''' baz( foo, bar ) ''' ''' baz("foo bar") ''' 'new Foo(bar, baz)' 'new Foo' 'new (Foo)' ''' (foo) (bar) ''' ''' foo.map (value) -> return value ''' , # always option code: 'baz = (foo, bar) ->' options: ['multiline'] , code: ''' baz = ( foo, bar ) -> ''' options: ['always'] , code: ''' baz( foo, bar ) ''' options: ['always'] , code: ''' baz( foo bar ) ''' options: ['always'] , code: ''' ( ) -> ''' options: ['always'] , # never option code: 'baz = (foo, bar) ->' options: ['never'] , code: '((foo, bar) ->)' options: ['never'] , code: 'baz(foo, bar)' options: ['never'] , code: 'baz foo, bar' options: ['never'] , code: '->' options: ['never'] , code: '() ->' options: ['never'] , # minItems option code: '(foo, bar) ->' options: [minItems: 3] , code: ''' ( foo, bar, qux ) -> ''' options: [minItems: 3] , code: ''' baz( foo, bar, qux ) ''' options: [minItems: 3] , code: 'baz(foo, bar)' options: [minItems: 3] , code: 'foo(bar, baz)' options: ['consistent'] , code: ''' foo(bar, baz) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: '->' options: ['always'] , code: ''' process.on 'exit', -> try fs.unlinkSync historyFile catch exception # Already deleted, nothing else to do. ''' options: ['always'] ] invalid: [ # multiline option (default) code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar) ''' # output: """ # baz(foo, bar) # """ errors: [LEFT_UNEXPECTED_ERROR] , code: ''' (foo, bar ) => {} ''' # output: """ # (foo, bar) => {} # """ errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # TODO: uncomment if https://github.com/jashkenas/coffeescript/pull/5081 gets merged # , # code: ''' # ( # foo = # 1 # ) -> # ''' # # output: """ # # function baz(foo = # # 1) {} # # """ # errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] code: ''' ( ) -> ''' # output: """ # function baz() {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' new Foo(bar, baz) ''' # output: """ # new Foo(\nbar, # baz\n) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' (### not fixed due to comment ### foo) -> ''' # output: null errors: [LEFT_UNEXPECTED_ERROR] , code: ''' baz = (foo ### not fixed due to comment ###) -> ''' # output: null errors: [RIGHT_UNEXPECTED_ERROR] , # always option code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ options: ['always'] errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ options: ['always'] errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '(foo, bar) ->' # output: 'function baz(\nfoo, bar\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '((foo, bar) ->)' # output: '(function(\nfoo, bar\n) {})' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: 'baz(foo, bar)' # output: 'baz(\nfoo, bar\n)' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '() ->' # output: 'function baz(\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , # never option code: ''' (foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function baz(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) => {} ''' # output: """ # (foo, # bar) => {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz( foo bar ) ''' # output: """ # baz(foo, # bar) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz = ( ) -> ''' # output: """ # function baz() {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # minItems option code: '(foo, bar, qux) ->' # output: 'function baz(\nfoo, bar, qux\n) {}' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: 'baz(foo, bar, qux)' # output: 'baz(\nfoo, bar, qux\n)' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar ) ''' # output: """ # baz(foo, # bar) # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' foo( bar, baz) ''' # output: """ # foo( # bar, # baz\n) # """ options: ['consistent'] errors: [RIGHT_MISSING_ERROR] , code: ''' foo(bar, baz ) ''' # output: """ # foo(bar, # baz) # """ options: ['consistent'] errors: [RIGHT_UNEXPECTED_ERROR] ]
true
###* # @fileoverview enforce consistent line breaks inside function parentheses # @author PI:NAME:<NAME>END_PI ### 'use strict' #------------------------------------------------------------------------------ # Requirements #------------------------------------------------------------------------------ rule = require '../../rules/function-paren-newline' {RuleTester} = require 'eslint' path = require 'path' #------------------------------------------------------------------------------ # Tests #------------------------------------------------------------------------------ LEFT_MISSING_ERROR = messageId: 'expectedAfter', type: 'Punctuator' LEFT_UNEXPECTED_ERROR = messageId: 'unexpectedAfter', type: 'Punctuator' RIGHT_MISSING_ERROR = messageId: 'expectedBefore', type: 'Punctuator' RIGHT_UNEXPECTED_ERROR = messageId: 'unexpectedBefore', type: 'Punctuator' ruleTester = new RuleTester parser: path.join __dirname, '../../..' ruleTester.run 'function-paren-newline', rule, valid: [ # multiline option (default) 'baz = (foo, bar) ->' '((foo, bar) ->)' '(foo, bar) => {}' '(foo) => {}' '() ->' '->' 'baz(foo, bar)' 'baz foo, bar' ''' baz a: 1 ''' ''' baz = ( foo, bar ) -> ''' ''' baz = ( foo bar ) -> ''' ''' baz( foo, bar ) ''' ''' baz("foo bar") ''' 'new Foo(bar, baz)' 'new Foo' 'new (Foo)' ''' (foo) (bar) ''' ''' foo.map (value) -> return value ''' , # always option code: 'baz = (foo, bar) ->' options: ['multiline'] , code: ''' baz = ( foo, bar ) -> ''' options: ['always'] , code: ''' baz( foo, bar ) ''' options: ['always'] , code: ''' baz( foo bar ) ''' options: ['always'] , code: ''' ( ) -> ''' options: ['always'] , # never option code: 'baz = (foo, bar) ->' options: ['never'] , code: '((foo, bar) ->)' options: ['never'] , code: 'baz(foo, bar)' options: ['never'] , code: 'baz foo, bar' options: ['never'] , code: '->' options: ['never'] , code: '() ->' options: ['never'] , # minItems option code: '(foo, bar) ->' options: [minItems: 3] , code: ''' ( foo, bar, qux ) -> ''' options: [minItems: 3] , code: ''' baz( foo, bar, qux ) ''' options: [minItems: 3] , code: 'baz(foo, bar)' options: [minItems: 3] , code: 'foo(bar, baz)' options: ['consistent'] , code: ''' foo(bar, baz) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: ''' foo( bar, baz ) ''' options: ['consistent'] , code: '->' options: ['always'] , code: ''' process.on 'exit', -> try fs.unlinkSync historyFile catch exception # Already deleted, nothing else to do. ''' options: ['always'] ] invalid: [ # multiline option (default) code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar) ''' # output: """ # baz(foo, bar) # """ errors: [LEFT_UNEXPECTED_ERROR] , code: ''' (foo, bar ) => {} ''' # output: """ # (foo, bar) => {} # """ errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # TODO: uncomment if https://github.com/jashkenas/coffeescript/pull/5081 gets merged # , # code: ''' # ( # foo = # 1 # ) -> # ''' # # output: """ # # function baz(foo = # # 1) {} # # """ # errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] code: ''' ( ) -> ''' # output: """ # function baz() {} # """ errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' new Foo(bar, baz) ''' # output: """ # new Foo(\nbar, # baz\n) # """ errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' (### not fixed due to comment ### foo) -> ''' # output: null errors: [LEFT_UNEXPECTED_ERROR] , code: ''' baz = (foo ### not fixed due to comment ###) -> ''' # output: null errors: [RIGHT_UNEXPECTED_ERROR] , # always option code: ''' (foo, bar ) -> ''' # output: """ # function baz(\nfoo, # bar # ) {} # """ options: ['always'] errors: [LEFT_MISSING_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function( # foo, # bar\n) {}) # """ options: ['always'] errors: [RIGHT_MISSING_ERROR] , code: ''' ((foo, bar) ->) ''' # output: """ # (function baz(\nfoo, # bar\n) {}) # """ options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '(foo, bar) ->' # output: 'function baz(\nfoo, bar\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '((foo, bar) ->)' # output: '(function(\nfoo, bar\n) {})' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: 'baz(foo, bar)' # output: 'baz(\nfoo, bar\n)' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: '() ->' # output: 'function baz(\n) {}' options: ['always'] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , # never option code: ''' (foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, # bar) {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' (( foo, bar ) ->) ''' # output: """ # (function baz(foo, # bar) {}) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' ( foo, bar ) => {} ''' # output: """ # (foo, # bar) => {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz( foo bar ) ''' # output: """ # baz(foo, # bar) # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' baz = ( ) -> ''' # output: """ # function baz() {} # """ options: ['never'] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , # minItems option code: '(foo, bar, qux) ->' # output: 'function baz(\nfoo, bar, qux\n) {}' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' ( foo, bar ) -> ''' # output: """ # function baz(foo, bar) {} # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: 'baz(foo, bar, qux)' # output: 'baz(\nfoo, bar, qux\n)' options: [minItems: 3] errors: [LEFT_MISSING_ERROR, RIGHT_MISSING_ERROR] , code: ''' baz( foo, bar ) ''' # output: """ # baz(foo, # bar) # """ options: [minItems: 3] errors: [LEFT_UNEXPECTED_ERROR, RIGHT_UNEXPECTED_ERROR] , code: ''' foo( bar, baz) ''' # output: """ # foo( # bar, # baz\n) # """ options: ['consistent'] errors: [RIGHT_MISSING_ERROR] , code: ''' foo(bar, baz ) ''' # output: """ # foo(bar, # baz) # """ options: ['consistent'] errors: [RIGHT_UNEXPECTED_ERROR] ]
[ { "context": "', {\n all: '*',\n admin: 'admin',\n user: 'user',\n guest: 'guest'\n })\n .config ($stateProvid", "end": 769, "score": 0.955430269241333, "start": 765, "tag": "USERNAME", "value": "user" }, { "context": "tId: 'c4be427f880b3ba97f0b',\n clientSecret: '6e8a021d87308058c935c0c102b60589d720f85a',\n grantPath:'/oauth2/access_token/?',\n ", "end": 1111, "score": 0.9997315406799316, "start": 1071, "tag": "KEY", "value": "6e8a021d87308058c935c0c102b60589d720f85a" } ]
app/scripts/app.coffee
calebhskim/expresso
0
'use strict' ###* # @ngdoc overview # @name expressoApp # @description # # expressoApp # # Main module of the application. ### angular .module 'expressoApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngSanitize', 'ngStorage', 'ngTouch', 'ui.router', 'angular-oauth2', 'ui.bootstrap' ] .constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', loginFailed: 'auth-login-failed', logoutSuccess: 'auth-logout-success', logoutFailed: 'auth-logout-failed', sessionTimeout: 'auth-session-timeout', notAuthenticated: 'auth-not-authenticated', notAuthorized: 'auth-not-authorized', modalClose: 'modal-closed' }) .constant('USER_ROLES', { all: '*', admin: 'admin', user: 'user', guest: 'guest' }) .config ($stateProvider, $sessionStorageProvider, $urlRouterProvider, OAuthProvider, OAuthTokenProvider, USER_ROLES) -> OAuthProvider.configure({ baseUrl: 'http://fathomless-sierra-4979.herokuapp.com', clientId: 'c4be427f880b3ba97f0b', clientSecret: '6e8a021d87308058c935c0c102b60589d720f85a', grantPath:'/oauth2/access_token/?', revokePath:'/oauth2/revoke_token' #TODO: figure out revoke path }) #TODO: Set secure back to true for HTTPS. seegno issue #21 OAuthTokenProvider.configure({ name: 'token', options: { secure: false } }) $stateProvider .state('home', { url: '/', templateUrl: 'views/main.html', controller: 'MainCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('contact', { url: '/contact', templateUrl: 'views/contact.html', controller: 'ContactCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('login', { url: '/login', templateUrl: 'views/login.html', controller: 'LoginCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('user', { url: '/dashboard', templateUrl: 'views/user.html', controller: 'UserCtrl', data: { authorizedRoles: [USER_ROLES.admin, USER_ROLES.user] } # TODO: Set up Auth Resolver just in case user loads before page # resolve: { # auth: resolveAuthentication = (AuthResolver) -> # return AuthResolver.resolve() # } }) $urlRouterProvider.otherwise('/') $sessionStorageProvider.set('session', {id: null, userId: null, userRole: null}) .run ($rootScope, $state, $window, $sessionStorage, $uibModal, $timeout, OAuth, AuthService, AUTH_EVENTS) -> if $sessionStorage.session.id and $sessionStorage.session.userRole and AuthService.isAuthorized($sessionStorage.session.userRole) and AuthService.isAuthenticated #TODO: check authenicated #send parameters to dashboard $state.go('user') $rootScope.$on('oauth:error', (event, rejection) -> # Ignore `invalid_grant` error - should be catched on `LoginController`. if 'invalid_grant' is rejection.data.error return # Refresh token when a `invalid_token` error occurs. if 'invalid_token' is rejection.data.error return OAuth.getRefreshToken() # Redirect to `/login` with the `error_reason`. return $window.location.href = '/login?error_reason=' + rejection.data.error ) $rootScope.$on('$stateChangeStart', (event, state) -> authorizedRoles = state.data.authorizedRoles if not AuthService.isAuthorized(authorizedRoles) event.preventDefault(); if AuthService.isAuthenticated() # user is not allowed $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); else # user is not logged in $rootScope.$broadcast(AUTH_EVENTS.notAuthenticated); ) $rootScope.$on(AUTH_EVENTS.notAuthenticated, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.notAuthorized, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.sessionTimeout, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.loginSuccess, (event, state) -> #TODO: make sure it is ok to just call cancel #$scope.cancel() event.preventDefault() $state.go('user') ) .controller('AppController', ($rootScope, $scope, USER_ROLES, AuthService) -> $rootScope.currentUser = null $rootScope.userRoles = USER_ROLES $rootScope.isAuthorized = AuthService.isAuthorized $rootScope.setCurrentUser = (user) -> $scope.currentUser = user )
220748
'use strict' ###* # @ngdoc overview # @name expressoApp # @description # # expressoApp # # Main module of the application. ### angular .module 'expressoApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngSanitize', 'ngStorage', 'ngTouch', 'ui.router', 'angular-oauth2', 'ui.bootstrap' ] .constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', loginFailed: 'auth-login-failed', logoutSuccess: 'auth-logout-success', logoutFailed: 'auth-logout-failed', sessionTimeout: 'auth-session-timeout', notAuthenticated: 'auth-not-authenticated', notAuthorized: 'auth-not-authorized', modalClose: 'modal-closed' }) .constant('USER_ROLES', { all: '*', admin: 'admin', user: 'user', guest: 'guest' }) .config ($stateProvider, $sessionStorageProvider, $urlRouterProvider, OAuthProvider, OAuthTokenProvider, USER_ROLES) -> OAuthProvider.configure({ baseUrl: 'http://fathomless-sierra-4979.herokuapp.com', clientId: 'c4be427f880b3ba97f0b', clientSecret: '<KEY>', grantPath:'/oauth2/access_token/?', revokePath:'/oauth2/revoke_token' #TODO: figure out revoke path }) #TODO: Set secure back to true for HTTPS. seegno issue #21 OAuthTokenProvider.configure({ name: 'token', options: { secure: false } }) $stateProvider .state('home', { url: '/', templateUrl: 'views/main.html', controller: 'MainCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('contact', { url: '/contact', templateUrl: 'views/contact.html', controller: 'ContactCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('login', { url: '/login', templateUrl: 'views/login.html', controller: 'LoginCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('user', { url: '/dashboard', templateUrl: 'views/user.html', controller: 'UserCtrl', data: { authorizedRoles: [USER_ROLES.admin, USER_ROLES.user] } # TODO: Set up Auth Resolver just in case user loads before page # resolve: { # auth: resolveAuthentication = (AuthResolver) -> # return AuthResolver.resolve() # } }) $urlRouterProvider.otherwise('/') $sessionStorageProvider.set('session', {id: null, userId: null, userRole: null}) .run ($rootScope, $state, $window, $sessionStorage, $uibModal, $timeout, OAuth, AuthService, AUTH_EVENTS) -> if $sessionStorage.session.id and $sessionStorage.session.userRole and AuthService.isAuthorized($sessionStorage.session.userRole) and AuthService.isAuthenticated #TODO: check authenicated #send parameters to dashboard $state.go('user') $rootScope.$on('oauth:error', (event, rejection) -> # Ignore `invalid_grant` error - should be catched on `LoginController`. if 'invalid_grant' is rejection.data.error return # Refresh token when a `invalid_token` error occurs. if 'invalid_token' is rejection.data.error return OAuth.getRefreshToken() # Redirect to `/login` with the `error_reason`. return $window.location.href = '/login?error_reason=' + rejection.data.error ) $rootScope.$on('$stateChangeStart', (event, state) -> authorizedRoles = state.data.authorizedRoles if not AuthService.isAuthorized(authorizedRoles) event.preventDefault(); if AuthService.isAuthenticated() # user is not allowed $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); else # user is not logged in $rootScope.$broadcast(AUTH_EVENTS.notAuthenticated); ) $rootScope.$on(AUTH_EVENTS.notAuthenticated, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.notAuthorized, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.sessionTimeout, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.loginSuccess, (event, state) -> #TODO: make sure it is ok to just call cancel #$scope.cancel() event.preventDefault() $state.go('user') ) .controller('AppController', ($rootScope, $scope, USER_ROLES, AuthService) -> $rootScope.currentUser = null $rootScope.userRoles = USER_ROLES $rootScope.isAuthorized = AuthService.isAuthorized $rootScope.setCurrentUser = (user) -> $scope.currentUser = user )
true
'use strict' ###* # @ngdoc overview # @name expressoApp # @description # # expressoApp # # Main module of the application. ### angular .module 'expressoApp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngSanitize', 'ngStorage', 'ngTouch', 'ui.router', 'angular-oauth2', 'ui.bootstrap' ] .constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', loginFailed: 'auth-login-failed', logoutSuccess: 'auth-logout-success', logoutFailed: 'auth-logout-failed', sessionTimeout: 'auth-session-timeout', notAuthenticated: 'auth-not-authenticated', notAuthorized: 'auth-not-authorized', modalClose: 'modal-closed' }) .constant('USER_ROLES', { all: '*', admin: 'admin', user: 'user', guest: 'guest' }) .config ($stateProvider, $sessionStorageProvider, $urlRouterProvider, OAuthProvider, OAuthTokenProvider, USER_ROLES) -> OAuthProvider.configure({ baseUrl: 'http://fathomless-sierra-4979.herokuapp.com', clientId: 'c4be427f880b3ba97f0b', clientSecret: 'PI:KEY:<KEY>END_PI', grantPath:'/oauth2/access_token/?', revokePath:'/oauth2/revoke_token' #TODO: figure out revoke path }) #TODO: Set secure back to true for HTTPS. seegno issue #21 OAuthTokenProvider.configure({ name: 'token', options: { secure: false } }) $stateProvider .state('home', { url: '/', templateUrl: 'views/main.html', controller: 'MainCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('contact', { url: '/contact', templateUrl: 'views/contact.html', controller: 'ContactCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('login', { url: '/login', templateUrl: 'views/login.html', controller: 'LoginCtrl', data: { authorizedRoles: [USER_ROLES.all] } }) .state('user', { url: '/dashboard', templateUrl: 'views/user.html', controller: 'UserCtrl', data: { authorizedRoles: [USER_ROLES.admin, USER_ROLES.user] } # TODO: Set up Auth Resolver just in case user loads before page # resolve: { # auth: resolveAuthentication = (AuthResolver) -> # return AuthResolver.resolve() # } }) $urlRouterProvider.otherwise('/') $sessionStorageProvider.set('session', {id: null, userId: null, userRole: null}) .run ($rootScope, $state, $window, $sessionStorage, $uibModal, $timeout, OAuth, AuthService, AUTH_EVENTS) -> if $sessionStorage.session.id and $sessionStorage.session.userRole and AuthService.isAuthorized($sessionStorage.session.userRole) and AuthService.isAuthenticated #TODO: check authenicated #send parameters to dashboard $state.go('user') $rootScope.$on('oauth:error', (event, rejection) -> # Ignore `invalid_grant` error - should be catched on `LoginController`. if 'invalid_grant' is rejection.data.error return # Refresh token when a `invalid_token` error occurs. if 'invalid_token' is rejection.data.error return OAuth.getRefreshToken() # Redirect to `/login` with the `error_reason`. return $window.location.href = '/login?error_reason=' + rejection.data.error ) $rootScope.$on('$stateChangeStart', (event, state) -> authorizedRoles = state.data.authorizedRoles if not AuthService.isAuthorized(authorizedRoles) event.preventDefault(); if AuthService.isAuthenticated() # user is not allowed $rootScope.$broadcast(AUTH_EVENTS.notAuthorized); else # user is not logged in $rootScope.$broadcast(AUTH_EVENTS.notAuthenticated); ) $rootScope.$on(AUTH_EVENTS.notAuthenticated, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.notAuthorized, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.sessionTimeout, (event, state) -> $state.go('login') ) $rootScope.$on(AUTH_EVENTS.loginSuccess, (event, state) -> #TODO: make sure it is ok to just call cancel #$scope.cancel() event.preventDefault() $state.go('user') ) .controller('AppController', ($rootScope, $scope, USER_ROLES, AuthService) -> $rootScope.currentUser = null $rootScope.userRoles = USER_ROLES $rootScope.isAuthorized = AuthService.isAuthorized $rootScope.setCurrentUser = (user) -> $scope.currentUser = user )
[ { "context": "'error.accounts.Incorrect password': 'Enter better password'}\nT9n.map 'en_GB_pidgin_us', {'error.accounts.Inc", "end": 586, "score": 0.5302287340164185, "start": 578, "tag": "PASSWORD", "value": "password" }, { "context": "idgin_us', {'error.accounts.Incorrect password': 'Dude, enter a less shitty password'}\n \nT9n.language = ", "end": 659, "score": 0.9303126335144043, "start": 655, "tag": "PASSWORD", "value": "Dude" }, { "context": "counts.Incorrect password': 'Dude, enter a less shitty password'}\n \nT9n.language = 'en_GB_pidgin'\nequ", "end": 678, "score": 0.5613104701042175, "start": 676, "tag": "PASSWORD", "value": "it" }, { "context": "ts.Incorrect password': 'Dude, enter a less shitty password'}\n \nT9n.language = 'en_GB_pidgin'\nequals T9n.get", "end": 689, "score": 0.6286962032318115, "start": 681, "tag": "PASSWORD", "value": "password" }, { "context": "ls T9n.get('error.accounts.Incorrect password'), 'Dude, enter a less shitty password'\n\nT9n.setLanguage 'p", "end": 893, "score": 0.7271369099617004, "start": 889, "tag": "PASSWORD", "value": "Dude" }, { "context": "s.Incorrect password'), 'Dude, enter a less shitty password'\n\nT9n.setLanguage 'pt_SOMETHINGINEXISTANT'\nequals", "end": 923, "score": 0.5612207055091858, "start": 915, "tag": "PASSWORD", "value": "password" } ]
examples/meteorPackage/server/testLanguageVariant.coffee
coWorkr-InSights/meteor-accounts-t9n
0
T9n.language = 'en' equals T9n.get('error.accounts.Incorrect password'), 'Incorrect password' T9n.map 'en_GB', 'error.accounts.Incorrect password': 'You might want to enter a more correct version of your password' T9n.language = 'en_GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.setLanguage 'en-GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.map 'en_GB_pidgin', {'error.accounts.Incorrect password': 'Enter better password'} T9n.map 'en_GB_pidgin_us', {'error.accounts.Incorrect password': 'Dude, enter a less shitty password'} T9n.language = 'en_GB_pidgin' equals T9n.get('error.accounts.Incorrect password'), 'Enter better password' T9n.language = 'en_GB_pidgin_us' equals T9n.get('error.accounts.Incorrect password'), 'Dude, enter a less shitty password' T9n.setLanguage 'pt_SOMETHINGINEXISTANT' equals T9n.language, 'pt' T9n.setLanguage 'pt_SOMETHINGINEXISTANT_1_2_3_4_5' equals T9n.language, 'pt' try T9n.setLanguage 'NOTTHERE_SOMETHINGINEXISTANT' catch e equals e.message, 'language NOTTHERE does not exist'
118253
T9n.language = 'en' equals T9n.get('error.accounts.Incorrect password'), 'Incorrect password' T9n.map 'en_GB', 'error.accounts.Incorrect password': 'You might want to enter a more correct version of your password' T9n.language = 'en_GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.setLanguage 'en-GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.map 'en_GB_pidgin', {'error.accounts.Incorrect password': 'Enter better <PASSWORD>'} T9n.map 'en_GB_pidgin_us', {'error.accounts.Incorrect password': '<PASSWORD>, enter a less sh<PASSWORD>ty <PASSWORD>'} T9n.language = 'en_GB_pidgin' equals T9n.get('error.accounts.Incorrect password'), 'Enter better password' T9n.language = 'en_GB_pidgin_us' equals T9n.get('error.accounts.Incorrect password'), '<PASSWORD>, enter a less shitty <PASSWORD>' T9n.setLanguage 'pt_SOMETHINGINEXISTANT' equals T9n.language, 'pt' T9n.setLanguage 'pt_SOMETHINGINEXISTANT_1_2_3_4_5' equals T9n.language, 'pt' try T9n.setLanguage 'NOTTHERE_SOMETHINGINEXISTANT' catch e equals e.message, 'language NOTTHERE does not exist'
true
T9n.language = 'en' equals T9n.get('error.accounts.Incorrect password'), 'Incorrect password' T9n.map 'en_GB', 'error.accounts.Incorrect password': 'You might want to enter a more correct version of your password' T9n.language = 'en_GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.setLanguage 'en-GB' equals T9n.get('error.accounts.Incorrect password'), 'You might want to enter a more correct version of your password' T9n.map 'en_GB_pidgin', {'error.accounts.Incorrect password': 'Enter better PI:PASSWORD:<PASSWORD>END_PI'} T9n.map 'en_GB_pidgin_us', {'error.accounts.Incorrect password': 'PI:PASSWORD:<PASSWORD>END_PI, enter a less shPI:PASSWORD:<PASSWORD>END_PIty PI:PASSWORD:<PASSWORD>END_PI'} T9n.language = 'en_GB_pidgin' equals T9n.get('error.accounts.Incorrect password'), 'Enter better password' T9n.language = 'en_GB_pidgin_us' equals T9n.get('error.accounts.Incorrect password'), 'PI:PASSWORD:<PASSWORD>END_PI, enter a less shitty PI:PASSWORD:<PASSWORD>END_PI' T9n.setLanguage 'pt_SOMETHINGINEXISTANT' equals T9n.language, 'pt' T9n.setLanguage 'pt_SOMETHINGINEXISTANT_1_2_3_4_5' equals T9n.language, 'pt' try T9n.setLanguage 'NOTTHERE_SOMETHINGINEXISTANT' catch e equals e.message, 'language NOTTHERE does not exist'
[ { "context": "###\n QuoJS 2.1\n (c) 2011, 2012 Javi Jiménez Villar (@soyjavi)\n http://quojs.tapquo.com\n###\n\n(($$) -", "end": 52, "score": 0.9998676776885986, "start": 33, "tag": "NAME", "value": "Javi Jiménez Villar" }, { "context": "#\n QuoJS 2.1\n (c) 2011, 2012 Javi Jiménez Villar (@soyjavi)\n http://quojs.tapquo.com\n###\n\n(($$) ->\n\n REA", "end": 62, "score": 0.9995441436767578, "start": 53, "tag": "USERNAME", "value": "(@soyjavi" } ]
src/QuoJS/src/quo.events.coffee
biojazzard/kirbout
2
### QuoJS 2.1 (c) 2011, 2012 Javi Jiménez Villar (@soyjavi) http://quojs.tapquo.com ### (($$) -> READY_EXPRESSION = /complete|loaded|interactive/ SHORTCUTS = [ "touch", "tap" ] SHORTCUTS_EVENTS = touch: "touchstart" tap: "tap" SHORTCUTS.forEach (event) -> $$.fn[event] = (callback) -> $$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callback @ $$.fn.on = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @bind(event, selector) else @delegate(selector, event, callback)) $$.fn.off = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @unbind(event, selector) else @undelegate(selector, event, callback)) $$.fn.ready = (callback) -> if READY_EXPRESSION.test(document.readyState) callback $$ else $$.fn.addEvent document, "DOMContentLoaded", -> callback $$ @ return ) Quo
15691
### QuoJS 2.1 (c) 2011, 2012 <NAME> (@soyjavi) http://quojs.tapquo.com ### (($$) -> READY_EXPRESSION = /complete|loaded|interactive/ SHORTCUTS = [ "touch", "tap" ] SHORTCUTS_EVENTS = touch: "touchstart" tap: "tap" SHORTCUTS.forEach (event) -> $$.fn[event] = (callback) -> $$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callback @ $$.fn.on = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @bind(event, selector) else @delegate(selector, event, callback)) $$.fn.off = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @unbind(event, selector) else @undelegate(selector, event, callback)) $$.fn.ready = (callback) -> if READY_EXPRESSION.test(document.readyState) callback $$ else $$.fn.addEvent document, "DOMContentLoaded", -> callback $$ @ return ) Quo
true
### QuoJS 2.1 (c) 2011, 2012 PI:NAME:<NAME>END_PI (@soyjavi) http://quojs.tapquo.com ### (($$) -> READY_EXPRESSION = /complete|loaded|interactive/ SHORTCUTS = [ "touch", "tap" ] SHORTCUTS_EVENTS = touch: "touchstart" tap: "tap" SHORTCUTS.forEach (event) -> $$.fn[event] = (callback) -> $$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callback @ $$.fn.on = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @bind(event, selector) else @delegate(selector, event, callback)) $$.fn.off = (event, selector, callback) -> (if (selector is `undefined` or $$.toType(selector) is "function") then @unbind(event, selector) else @undelegate(selector, event, callback)) $$.fn.ready = (callback) -> if READY_EXPRESSION.test(document.readyState) callback $$ else $$.fn.addEvent document, "DOMContentLoaded", -> callback $$ @ return ) Quo
[ { "context": "###\n Pokemon Go(c) MITM node proxy\n by Michael Strassburger <codepoet@cpan.org>\n\n This example replaces all ", "end": 61, "score": 0.9998809099197388, "start": 41, "tag": "NAME", "value": "Michael Strassburger" }, { "context": " Go(c) MITM node proxy\n by Michael Strassburger <codepoet@cpan.org>\n\n This example replaces all your pokemons with ", "end": 80, "score": 0.9999338984489441, "start": 63, "tag": "EMAIL", "value": "codepoet@cpan.org" } ]
example.replacePokemons.coffee
BuloZB/pokemon-go-mitm-node
393
### Pokemon Go(c) MITM node proxy by Michael Strassburger <codepoet@cpan.org> This example replaces all your pokemons with Mew, Mewto, Dragonite, ... Be aware: this is just visible to you and won't gain you any special powers all display pokemons will act as their original ones ### PokemonGoMITM = require './lib/pokemon-go-mitm' server = new PokemonGoMITM port: 8081 .addResponseHandler "GetInventory", (data) -> biggest = 151 if data.inventory_delta for item in data.inventory_delta.inventory_items if pokemon = item.inventory_item_data.pokemon_data pokemon.pokemon_id = biggest-- pokemon.cp = 1337 break unless biggest data
97897
### Pokemon Go(c) MITM node proxy by <NAME> <<EMAIL>> This example replaces all your pokemons with Mew, Mewto, Dragonite, ... Be aware: this is just visible to you and won't gain you any special powers all display pokemons will act as their original ones ### PokemonGoMITM = require './lib/pokemon-go-mitm' server = new PokemonGoMITM port: 8081 .addResponseHandler "GetInventory", (data) -> biggest = 151 if data.inventory_delta for item in data.inventory_delta.inventory_items if pokemon = item.inventory_item_data.pokemon_data pokemon.pokemon_id = biggest-- pokemon.cp = 1337 break unless biggest data
true
### Pokemon Go(c) MITM node proxy by PI:NAME:<NAME>END_PI <PI:EMAIL:<EMAIL>END_PI> This example replaces all your pokemons with Mew, Mewto, Dragonite, ... Be aware: this is just visible to you and won't gain you any special powers all display pokemons will act as their original ones ### PokemonGoMITM = require './lib/pokemon-go-mitm' server = new PokemonGoMITM port: 8081 .addResponseHandler "GetInventory", (data) -> biggest = 151 if data.inventory_delta for item in data.inventory_delta.inventory_items if pokemon = item.inventory_item_data.pokemon_data pokemon.pokemon_id = biggest-- pokemon.cp = 1337 break unless biggest data
[ { "context": " jid: config.thing\n password: config.password\n host: config.host\n port: c", "end": 880, "score": 0.9985297322273254, "start": 865, "tag": "PASSWORD", "value": "config.password" }, { "context": " jid: config.owner\n password: config.password\n host: config.host\n ", "end": 1266, "score": 0.9984147548675537, "start": 1251, "tag": "PASSWORD", "value": "config.password" }, { "context": "2'/>\n <str name='KEY' value='4857402340298342'/>\n </register>\n <", "end": 3622, "score": 0.9996911287307739, "start": 3606, "tag": "KEY", "value": "4857402340298342" }, { "context": "2'/>\n <str name='KEY' value='4857402340298342'/>\n </mine>\n ", "end": 6527, "score": 0.9996345639228821, "start": 6516, "tag": "KEY", "value": "48574023402" } ]
test/001-register-unregister.coffee
TNO-IoT/testing-xep-0347
0
# Tests if the server component complies to # https://xmpp.org/extensions/xep-0347.html # # This set test some basic functions for registration, claim, # search, update, disown and unregister functions. # ltx = require('node-xmpp-core').ltx Client = require 'node-xmpp-client' bunyan = require 'bunyan' shortId = require 'shortid' assert = require 'assert' chai = require 'chai' Q = require 'q' config = require './helpers/config' log = bunyan.createLogger name: '001 - register & unregister' level: 'trace' # global config thingConn = undefined ownerConn = undefined chai.should() assert = chai.assert describe 'Registering and unregistering a Thing', -> this.timeout 10000 before () -> defer = Q.defer() log.trace 'Connecting to XMPP server' thingConn = new Client jid: config.thing password: config.password host: config.host port: config.port reconnect: false thingConn.on 'online', () -> log.trace 'Thing is now online.' thingConn.send '<presence/>' thingConn.once 'stanza', (stanza) -> ownerConn = new Client jid: config.owner password: config.password host: config.host port: config.port reconnect: false ownerConn.on 'online', () -> log.trace 'Owner is now online.' defer.resolve() thingConn.on 'error', (err) -> log.warn err defer.reject() return defer.promise after () -> defer = Q.defer() log.trace 'Unsubscribing from presence!' thingConn.send "<presence type='unsubscribe' to='#{ config.registry }'/>" ready = () -> thingConn.end() defer.resolve() setTimeout ready, 100 ownerConn.end() return defer.promise describe 'subscribe to the presence of the registry', -> it 'sends the presence subscribtion', (done) -> log.trace 'Sending presence subscription' message = "<presence type='subscribe' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'presence' stanza.attrs.type.should.equal 'subscribe' stanza.attrs.from.should.equal config.registry answer = "<presence type='subscribed' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ answer }" thingConn.send answer done() describe 'register the thing in the registry', -> it 'sends registration message and receives a confirmation', (done) -> log.trace 'Sending register message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <register xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='4857402340298342'/> </register> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() describe 'the thing is not found yet because it is not claimed', -> it 'owner sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' done() describe 'the thing cannot be updated', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' done() describe 'the thing is claimed by the owner', -> it 'and the owner sends a claim message', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <mine xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='4857402340298342'/> </mine> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.thing thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.attrs.from.should.equal config.registry stanza.attrs.type.should.equal 'set' assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.owner thingConn.send "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" done() describe 'the thing can be found', -> it 'when someone sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'update of the meta information', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'by the owner of the thing', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'> <str name='MODEL' value='ABC'/> </update> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'should result in updated search results', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.servicelab.org'/> <strEq name='MODEL' value='ABC'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'disowning thing', -> it 'the owner sends the disown message and receives a confirmation', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'set' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' response = "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" log.info "Sending response: #{ response }" thingConn.send response ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() it 'the owner sends the disown and receives failure', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'error' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 error = stanza.children[0] error.name.should.equal 'error' error.attrs.type.should.equal 'cancel' assert.lengthOf error.children, 1 error.children[0].name.should.equal 'item-not-found' done() describe 'unregister the thing from the registry', -> it 'sends the unregister message and receives a confirmation', (done) -> log.trace 'Sending unregister message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <unregister xmlns='urn:xmpp:iot:discovery'/> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done()
186866
# Tests if the server component complies to # https://xmpp.org/extensions/xep-0347.html # # This set test some basic functions for registration, claim, # search, update, disown and unregister functions. # ltx = require('node-xmpp-core').ltx Client = require 'node-xmpp-client' bunyan = require 'bunyan' shortId = require 'shortid' assert = require 'assert' chai = require 'chai' Q = require 'q' config = require './helpers/config' log = bunyan.createLogger name: '001 - register & unregister' level: 'trace' # global config thingConn = undefined ownerConn = undefined chai.should() assert = chai.assert describe 'Registering and unregistering a Thing', -> this.timeout 10000 before () -> defer = Q.defer() log.trace 'Connecting to XMPP server' thingConn = new Client jid: config.thing password: <PASSWORD> host: config.host port: config.port reconnect: false thingConn.on 'online', () -> log.trace 'Thing is now online.' thingConn.send '<presence/>' thingConn.once 'stanza', (stanza) -> ownerConn = new Client jid: config.owner password: <PASSWORD> host: config.host port: config.port reconnect: false ownerConn.on 'online', () -> log.trace 'Owner is now online.' defer.resolve() thingConn.on 'error', (err) -> log.warn err defer.reject() return defer.promise after () -> defer = Q.defer() log.trace 'Unsubscribing from presence!' thingConn.send "<presence type='unsubscribe' to='#{ config.registry }'/>" ready = () -> thingConn.end() defer.resolve() setTimeout ready, 100 ownerConn.end() return defer.promise describe 'subscribe to the presence of the registry', -> it 'sends the presence subscribtion', (done) -> log.trace 'Sending presence subscription' message = "<presence type='subscribe' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'presence' stanza.attrs.type.should.equal 'subscribe' stanza.attrs.from.should.equal config.registry answer = "<presence type='subscribed' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ answer }" thingConn.send answer done() describe 'register the thing in the registry', -> it 'sends registration message and receives a confirmation', (done) -> log.trace 'Sending register message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <register xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='<KEY>'/> </register> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() describe 'the thing is not found yet because it is not claimed', -> it 'owner sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' done() describe 'the thing cannot be updated', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' done() describe 'the thing is claimed by the owner', -> it 'and the owner sends a claim message', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <mine xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='<KEY>98342'/> </mine> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.thing thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.attrs.from.should.equal config.registry stanza.attrs.type.should.equal 'set' assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.owner thingConn.send "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" done() describe 'the thing can be found', -> it 'when someone sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'update of the meta information', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'by the owner of the thing', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'> <str name='MODEL' value='ABC'/> </update> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'should result in updated search results', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.servicelab.org'/> <strEq name='MODEL' value='ABC'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'disowning thing', -> it 'the owner sends the disown message and receives a confirmation', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'set' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' response = "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" log.info "Sending response: #{ response }" thingConn.send response ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() it 'the owner sends the disown and receives failure', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'error' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 error = stanza.children[0] error.name.should.equal 'error' error.attrs.type.should.equal 'cancel' assert.lengthOf error.children, 1 error.children[0].name.should.equal 'item-not-found' done() describe 'unregister the thing from the registry', -> it 'sends the unregister message and receives a confirmation', (done) -> log.trace 'Sending unregister message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <unregister xmlns='urn:xmpp:iot:discovery'/> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done()
true
# Tests if the server component complies to # https://xmpp.org/extensions/xep-0347.html # # This set test some basic functions for registration, claim, # search, update, disown and unregister functions. # ltx = require('node-xmpp-core').ltx Client = require 'node-xmpp-client' bunyan = require 'bunyan' shortId = require 'shortid' assert = require 'assert' chai = require 'chai' Q = require 'q' config = require './helpers/config' log = bunyan.createLogger name: '001 - register & unregister' level: 'trace' # global config thingConn = undefined ownerConn = undefined chai.should() assert = chai.assert describe 'Registering and unregistering a Thing', -> this.timeout 10000 before () -> defer = Q.defer() log.trace 'Connecting to XMPP server' thingConn = new Client jid: config.thing password: PI:PASSWORD:<PASSWORD>END_PI host: config.host port: config.port reconnect: false thingConn.on 'online', () -> log.trace 'Thing is now online.' thingConn.send '<presence/>' thingConn.once 'stanza', (stanza) -> ownerConn = new Client jid: config.owner password: PI:PASSWORD:<PASSWORD>END_PI host: config.host port: config.port reconnect: false ownerConn.on 'online', () -> log.trace 'Owner is now online.' defer.resolve() thingConn.on 'error', (err) -> log.warn err defer.reject() return defer.promise after () -> defer = Q.defer() log.trace 'Unsubscribing from presence!' thingConn.send "<presence type='unsubscribe' to='#{ config.registry }'/>" ready = () -> thingConn.end() defer.resolve() setTimeout ready, 100 ownerConn.end() return defer.promise describe 'subscribe to the presence of the registry', -> it 'sends the presence subscribtion', (done) -> log.trace 'Sending presence subscription' message = "<presence type='subscribe' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'presence' stanza.attrs.type.should.equal 'subscribe' stanza.attrs.from.should.equal config.registry answer = "<presence type='subscribed' to='#{ config.registry }' id='#{ shortId.generate() }'/>" log.info "Sending message: #{ answer }" thingConn.send answer done() describe 'register the thing in the registry', -> it 'sends registration message and receives a confirmation', (done) -> log.trace 'Sending register message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <register xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='PI:KEY:<KEY>END_PI'/> </register> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() describe 'the thing is not found yet because it is not claimed', -> it 'owner sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' done() describe 'the thing cannot be updated', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' done() describe 'the thing is claimed by the owner', -> it 'and the owner sends a claim message', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <mine xmlns='urn:xmpp:iot:discovery'> <str name='SN' value='394872348732948723'/> <str name='MAN' value='www.ktc.se'/> <str name='MODEL' value='IMC'/> <num name='V' value='1.2'/> <str name='KEY' value='PI:KEY:<KEY>END_PI98342'/> </mine> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.thing thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.attrs.from.should.equal config.registry stanza.attrs.type.should.equal 'set' assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'claimed' stanza.children[0].attrs.jid.should.equal config.owner thingConn.send "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" done() describe 'the thing can be found', -> it 'when someone sends a search message', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.ktc.se'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'update of the meta information', -> it 'by the thing itself', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery'> <str name='MAN' value='www.servicelab.org'/> </update> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'by the owner of the thing', (done) -> message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <update xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'> <str name='MODEL' value='ABC'/> </update> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 0 done() it 'should result in updated search results', (done) -> message = "<iq type='get' to='#{ config.registry }' id='#{ shortId.generate() }'> <search xmlns='urn:xmpp:iot:discovery' offset='0' maxCount='20'> <strEq name='MAN' value='www.servicelab.org'/> <strEq name='MODEL' value='ABC'/> </search> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'found' found = stanza.children[0] assert.lengthOf found.children, 1 found.children[0].name.should.equal 'thing' found.children[0].attrs.jid.should.equal config.thing found.children[0].attrs.owner.should.equal config.owner done() describe 'disowning thing', -> it 'the owner sends the disown message and receives a confirmation', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'set' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 stanza.children[0].name.should.equal 'disowned' response = "<iq type='result' to='#{ stanza.attrs.from }' id='#{ stanza.attrs.id }'/>" log.info "Sending response: #{ response }" thingConn.send response ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done() it 'the owner sends the disown and receives failure', (done) -> log.trace 'sending disown message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <disown xmlns='urn:xmpp:iot:discovery' jid='#{ config.thing }'/> </iq>" log.info "Sending message: #{ message }" ownerConn.send message ownerConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'error' stanza.attrs.from.should.equal config.registry assert.lengthOf stanza.children, 1 error = stanza.children[0] error.name.should.equal 'error' error.attrs.type.should.equal 'cancel' assert.lengthOf error.children, 1 error.children[0].name.should.equal 'item-not-found' done() describe 'unregister the thing from the registry', -> it 'sends the unregister message and receives a confirmation', (done) -> log.trace 'Sending unregister message' message = "<iq type='set' to='#{ config.registry }' id='#{ shortId.generate() }'> <unregister xmlns='urn:xmpp:iot:discovery'/> </iq>" log.info "Sending message: #{ message }" thingConn.send message thingConn.once 'stanza', (stanza) -> log.info "Received message: #{ stanza.toString() }" stanza.name.should.equal 'iq' stanza.attrs.type.should.equal 'result' stanza.attrs.from.should.equal config.registry done()
[ { "context": "###\nCopyright (c) 2002-2013 \"Neo Technology,\"\nNetwork Engine for Objects in Lund AB [http://n", "end": 43, "score": 0.6924333572387695, "start": 33, "tag": "NAME", "value": "Technology" } ]
community/server/src/main/coffeescript/neo4j/webadmin/modules/loading/GlobalLoadingIndicator.coffee
rebaze/neo4j
1
### Copyright (c) 2002-2013 "Neo Technology," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define( ['lib/amd/jQuery'], ($) -> class GlobalLoadingIndicator constructor : (@target="#global-loading-indicator") -> @runningRequests = 0 init : -> $(window).ajaxSend @onAjaxSend $(window).ajaxComplete @onAjaxComplete onAjaxSend : => @runningRequests++ if @runningRequests is 1 @timeout = setTimeout @show, 1000 onAjaxComplete : => @runningRequests-- if @runningRequests <= 0 @runningRequests = 0 clearTimeout @timeout @hide() show : => $(@target).show() hide : => $(@target).hide() )
5669
### Copyright (c) 2002-2013 "Neo <NAME>," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define( ['lib/amd/jQuery'], ($) -> class GlobalLoadingIndicator constructor : (@target="#global-loading-indicator") -> @runningRequests = 0 init : -> $(window).ajaxSend @onAjaxSend $(window).ajaxComplete @onAjaxComplete onAjaxSend : => @runningRequests++ if @runningRequests is 1 @timeout = setTimeout @show, 1000 onAjaxComplete : => @runningRequests-- if @runningRequests <= 0 @runningRequests = 0 clearTimeout @timeout @hide() show : => $(@target).show() hide : => $(@target).hide() )
true
### Copyright (c) 2002-2013 "Neo PI:NAME:<NAME>END_PI," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define( ['lib/amd/jQuery'], ($) -> class GlobalLoadingIndicator constructor : (@target="#global-loading-indicator") -> @runningRequests = 0 init : -> $(window).ajaxSend @onAjaxSend $(window).ajaxComplete @onAjaxComplete onAjaxSend : => @runningRequests++ if @runningRequests is 1 @timeout = setTimeout @show, 1000 onAjaxComplete : => @runningRequests-- if @runningRequests <= 0 @runningRequests = 0 clearTimeout @timeout @hide() show : => $(@target).show() hide : => $(@target).hide() )
[ { "context": "cument.activeElement.type != 'url'\n key = String.fromCharCode(e.which)\n\n if key >= 1 && key <= 9 && sc", "end": 1297, "score": 0.8692470788955688, "start": 1278, "tag": "KEY", "value": "String.fromCharCode" } ]
app/coffee/directives/speed_dial_directive.coffee
waffleau/simple-speed-dial
2
speedDial = ($window) -> return { restrict : 'A' link: (scope, elem, width) -> calculateSizes = () -> dialColumns = localStorage.getItem('dial_columns') dialWidth = localStorage.getItem('dial_width') bookmarkMargin = 20 minEntryWidth = 120 # Assign sizes to the scope scope.dialWidth = $window.innerWidth * dialWidth * 0.01 scope.entryWidth = (scope.dialWidth / dialColumns) - bookmarkMargin scope.entryWidth = minEntryWidth if scope.entryWidth < minEntryWidth scope.entryHeight = scope.entryWidth * 0.8 || 0 scope.entryWidth = Math.floor(scope.entryWidth) scope.entryHeight = Math.floor(scope.entryHeight) resize = () -> calculateSizes() if localStorage.getItem('center_vertically') if localStorage.getItem('show_folder_list') scope.dialPadding = (($window.innerWidth - elem.innerHeight) / 2) - 50 || 0 else scope.dialPadding = ($window.innerWidth - elem.innerHeight) / 2 || 0 resize() angular.element($window).on 'resize', () -> resize() elem.on 'keypress', (e) -> if document.activeElement.type != 'text' && document.activeElement.type != 'url' key = String.fromCharCode(e.which) if key >= 1 && key <= 9 && scope.bookmarks.length > key window.location = scope.bookmarks[key - 1].url } angular.module('simpleSpeedDial') .directive('speedDial', speedDial)
83195
speedDial = ($window) -> return { restrict : 'A' link: (scope, elem, width) -> calculateSizes = () -> dialColumns = localStorage.getItem('dial_columns') dialWidth = localStorage.getItem('dial_width') bookmarkMargin = 20 minEntryWidth = 120 # Assign sizes to the scope scope.dialWidth = $window.innerWidth * dialWidth * 0.01 scope.entryWidth = (scope.dialWidth / dialColumns) - bookmarkMargin scope.entryWidth = minEntryWidth if scope.entryWidth < minEntryWidth scope.entryHeight = scope.entryWidth * 0.8 || 0 scope.entryWidth = Math.floor(scope.entryWidth) scope.entryHeight = Math.floor(scope.entryHeight) resize = () -> calculateSizes() if localStorage.getItem('center_vertically') if localStorage.getItem('show_folder_list') scope.dialPadding = (($window.innerWidth - elem.innerHeight) / 2) - 50 || 0 else scope.dialPadding = ($window.innerWidth - elem.innerHeight) / 2 || 0 resize() angular.element($window).on 'resize', () -> resize() elem.on 'keypress', (e) -> if document.activeElement.type != 'text' && document.activeElement.type != 'url' key = <KEY>(e.which) if key >= 1 && key <= 9 && scope.bookmarks.length > key window.location = scope.bookmarks[key - 1].url } angular.module('simpleSpeedDial') .directive('speedDial', speedDial)
true
speedDial = ($window) -> return { restrict : 'A' link: (scope, elem, width) -> calculateSizes = () -> dialColumns = localStorage.getItem('dial_columns') dialWidth = localStorage.getItem('dial_width') bookmarkMargin = 20 minEntryWidth = 120 # Assign sizes to the scope scope.dialWidth = $window.innerWidth * dialWidth * 0.01 scope.entryWidth = (scope.dialWidth / dialColumns) - bookmarkMargin scope.entryWidth = minEntryWidth if scope.entryWidth < minEntryWidth scope.entryHeight = scope.entryWidth * 0.8 || 0 scope.entryWidth = Math.floor(scope.entryWidth) scope.entryHeight = Math.floor(scope.entryHeight) resize = () -> calculateSizes() if localStorage.getItem('center_vertically') if localStorage.getItem('show_folder_list') scope.dialPadding = (($window.innerWidth - elem.innerHeight) / 2) - 50 || 0 else scope.dialPadding = ($window.innerWidth - elem.innerHeight) / 2 || 0 resize() angular.element($window).on 'resize', () -> resize() elem.on 'keypress', (e) -> if document.activeElement.type != 'text' && document.activeElement.type != 'url' key = PI:KEY:<KEY>END_PI(e.which) if key >= 1 && key <= 9 && scope.bookmarks.length > key window.location = scope.bookmarks[key - 1].url } angular.module('simpleSpeedDial') .directive('speedDial', speedDial)
[ { "context": "###\n# CoffeeScript implementation of nano.js by kaustavha\n# Nano is a templating engine by Tomasz Mazur & J", "end": 57, "score": 0.9892288446426392, "start": 48, "tag": "USERNAME", "value": "kaustavha" }, { "context": "o.js by kaustavha\n# Nano is a templating engine by Tomasz Mazur & Jacek Bacela\n# https://github.com/trix/nano\n###", "end": 103, "score": 0.999887228012085, "start": 91, "tag": "NAME", "value": "Tomasz Mazur" }, { "context": "ha\n# Nano is a templating engine by Tomasz Mazur & Jacek Bacela\n# https://github.com/trix/nano\n###\n\nnano = (templ", "end": 118, "score": 0.999886691570282, "start": 106, "tag": "NAME", "value": "Jacek Bacela" }, { "context": " Tomasz Mazur & Jacek Bacela\n# https://github.com/trix/nano\n###\n\nnano = (template, data) ->\n template", "end": 144, "score": 0.9988550543785095, "start": 140, "tag": "USERNAME", "value": "trix" } ]
src/scripts/nano.coffee
kaustavha/twitter-fontana
1
### # CoffeeScript implementation of nano.js by kaustavha # Nano is a templating engine by Tomasz Mazur & Jacek Bacela # https://github.com/trix/nano ### nano = (template, data) -> template.replace /\{([\w\.]*)\}/g, (str, key) -> keys = key.split("."); v = data[keys.shift()]; v = v[key] for key in keys `(typeof v !== "undefined" && v !== null) ? v : ""`
82620
### # CoffeeScript implementation of nano.js by kaustavha # Nano is a templating engine by <NAME> & <NAME> # https://github.com/trix/nano ### nano = (template, data) -> template.replace /\{([\w\.]*)\}/g, (str, key) -> keys = key.split("."); v = data[keys.shift()]; v = v[key] for key in keys `(typeof v !== "undefined" && v !== null) ? v : ""`
true
### # CoffeeScript implementation of nano.js by kaustavha # Nano is a templating engine by PI:NAME:<NAME>END_PI & PI:NAME:<NAME>END_PI # https://github.com/trix/nano ### nano = (template, data) -> template.replace /\{([\w\.]*)\}/g, (str, key) -> keys = key.split("."); v = data[keys.shift()]; v = v[key] for key in keys `(typeof v !== "undefined" && v !== null) ? v : ""`
[ { "context": "# Check My Links by Paul Livingstone\n# @ocodia\n\nremoveClassFromElements = (classname) ", "end": 36, "score": 0.99983811378479, "start": 20, "tag": "NAME", "value": "Paul Livingstone" }, { "context": "# Check My Links by Paul Livingstone\n# @ocodia\n\nremoveClassFromElements = (classname) ->\n x = d", "end": 46, "score": 0.9994297027587891, "start": 39, "tag": "USERNAME", "value": "@ocodia" } ]
check.coffee
misak1/Css-Viewer-plus
0
# Check My Links by Paul Livingstone # @ocodia removeClassFromElements = (classname) -> x = document.getElementsByClassName(classname) i = undefined i = 0 while i < x.length x[i].classList.remove classname i++ return removeElementsByClass = (className) -> elements = document.getElementsByClassName(className) while elements.length > 0 elements[0].parentNode.removeChild elements[0] return removeDOMElement = (id) -> if document.getElementById(id) document.getElementById(id).remove() return String::startsWith = (text) -> @substr(0, text.length) == text String::contains = (text) -> @indexOf(text) != -1 chrome.extension.onMessage.addListener (request, sender) -> # Gather links pageLinks = document.getElementsByTagName('a') totalvalid = pageLinks.length queued = 0 checked = 0 invalid = 0 passed = 0 rpBox = undefined # Clear the Previous Run removeDOMElement 'ALP_ReportBox' ((pg) -> blacklist = request.bl blacklisted = undefined cacheType = request.ca checkType = request.ct reportStyle = document.createElement('style') reportStyle.setAttribute 'rel', 'stylesheet' reportStyle.setAttribute 'type', 'text/css' document.getElementsByTagName('head')[0].appendChild reportStyle reportStyle.appendChild document.createTextNode('#ALP_ReportBox{font-weight: bold; width: 250px; position: fixed; right:0px; top: 0px; background: #fff; margin: 20px; padding: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 14px; border-radius: 5px; z-index: 99999; box-shadow: 0px 0px 3px rgba(0,0,0,1);}') reportBox = document.createElement('div') rbHeader = document.createElement('div') rbClose = document.createElement('div') rbClose.innerHTML = '&times;' rbClose.setAttribute 'id', 'ALP_RB_Close' rbSettings = document.createElement('div') reportBox.setAttribute 'id', 'ALP_ReportBox' rbHeader.innerHTML = 'Link Results' document.getElementsByTagName('body')[0].appendChild reportBox rpBox = document.getElementById('ALP_ReportBox') #//////// a = undefined e = undefined h = undefined i = undefined j = undefined r = undefined rcss = undefined rid = undefined tblcss = undefined tdlcss = undefined tdrcss = undefined rid = 'ALT_VIEWER_PLUS' e = (t) -> document.getElementsByTagName t a = (o, a) -> att = o.getAttribute(a) if a == 'alt' and att == null return 'alt未設定' att if document.getElementById(rid) return i = e('img') if i.length <= 0 return r = document.createElement('div') rcss = 'padding:0px;position:fixed;top:0;right:0;border:solid #ccc 1px;z-index:999;max-height:100%;overflow: auto;' tblcss = ' style=\'border-collapse:collapse;background:hsla(0,0%,0%,.75);\'' tdlcss = ' style=\'padding:0 .5em 0 0;border-bottom:solid #fff 2px;text-align:right;\'' tdrcss = ' style=\'padding:0 0 0 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F0EA30;width:250px;\'' r.id = rid r.style.cssText = rcss h = '<style>\n@-webkit-keyframes anime1 {\n0% {opacity: .2;}\n100% {opacity: 1;}\n}\n.img_blink{-webkit-animation: anime1 0.5s ease 0s infinite alternate;}\n</style>' h += '<table' + tblcss + ' class="ATT_VIEWER_TABLE">' j = 0 #/ meta h += '<tr><td colspan="2" style="padding:1em 0 0 1em;border-bottom:solid #fff 2px;text-align:left;color:#fff;white-space:pre-wrap;max-width:500px;line-height:1;font-size: 12px;">' h += '<span class="ALT_VIEWER_CLOSE" style="background-color: hsla(0,100%,100%,1);color: #000;position: absolute;right: 0;top: 0;padding: 0.5em 1em;">Close✕</span>' matas = '' Array::forEach.apply document.querySelectorAll('title, meta, h1'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' inn = e.innerHTML out.replace inn, '<span style="color:#F0EA30;">' + inn + '</span>' attrs = e.attributes i = attrs.length - 1 while i >= 0 # h += attrs[i].name + "->" + attrs[i].value + '\n'; out = out.replace(new RegExp(attrs[i].name, 'g'), '<span style="color:#70BE47;">' + attrs[i].name + '</span>').replace(new RegExp(attrs[i].value, 'g'), '<span style="color:#F55A21;">' + attrs[i].value + '</span>') i-- matas += out + '\n' return ] meta_txt = matas h += meta_txt h += '</td></tr>' #/ meta while j < i.length h += if j % 252 == 0 then '<tr>' else '<tr>' h += '<td' + tdlcss + '><img style=\'max-width: 350px;vertical-align:bottom;\' src=' + a(i[j], 'src') + '></td><td' + tdrcss + '>' + a(i[j], 'alt') + '</td></tr>' j++ #/// title titles = '' Array::forEach.apply document.querySelectorAll('[title]'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' attrs = e.attributes i = attrs.length - 1 while i >= 0 if attrs[i].name == 'title' title = attrs[i].value newout = out.replace('title', '<span style="color:#70BE47;">title</span>').replace(title, '<span style="color:#F55A21;">' + title + '</span>') h += '<tr><td' + tdlcss + ' style=\'max-width: 350px;vertical-align:top;\'><span style=\'max-width: 350px;display: inline-block;line-height:1;font-size: 12px;color: #fff;text-align: left;padding:.5em 0 0 .5em;overflow: hidden;\'>' + newout + '</span></td>' h += '<td class="ALT_VIEWER_TITLE" style="padding:1em 0 1em 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F55A21;width:250px;overflow: hidden;vertical-align: top;">' + title + '</td></tr>' i-- titles += out + '\n' return ] # console.log(titles); #/// /title h += '</table>' e('body')[0].appendChild r r.innerHTML = h r.onclick = -> # this.parentNode.removeChild(this); return # 閉じる document.querySelector('.ALT_VIEWER_CLOSE').onclick = -> `var i` i = r.childNodes.length - 1 while i >= 0 r.removeChild r.childNodes[i] i-- return window.scrollTo 0, 0 # hoverした画像にボーダー Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'solid 3px #F82F66' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="border-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'none' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="content-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.remove 'img_blink' return ), false return ] # hoverした時のtitle Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'solid 3px #F82F66' document.querySelector('[title$="' + title + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.title); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'none' document.querySelector('[title$="' + title + '"]').classList.remove 'img_blink' return ), false return ] #//////// document.getElementById('ALP_RB_Close').onclick = -> removeDOMElement 'ALP_ReportBox' return # Remove the event listener in the event this is run again without reloading chrome.extension.onMessage.removeListener doStuff return ) pageLinks true
24102
# Check My Links by <NAME> # @ocodia removeClassFromElements = (classname) -> x = document.getElementsByClassName(classname) i = undefined i = 0 while i < x.length x[i].classList.remove classname i++ return removeElementsByClass = (className) -> elements = document.getElementsByClassName(className) while elements.length > 0 elements[0].parentNode.removeChild elements[0] return removeDOMElement = (id) -> if document.getElementById(id) document.getElementById(id).remove() return String::startsWith = (text) -> @substr(0, text.length) == text String::contains = (text) -> @indexOf(text) != -1 chrome.extension.onMessage.addListener (request, sender) -> # Gather links pageLinks = document.getElementsByTagName('a') totalvalid = pageLinks.length queued = 0 checked = 0 invalid = 0 passed = 0 rpBox = undefined # Clear the Previous Run removeDOMElement 'ALP_ReportBox' ((pg) -> blacklist = request.bl blacklisted = undefined cacheType = request.ca checkType = request.ct reportStyle = document.createElement('style') reportStyle.setAttribute 'rel', 'stylesheet' reportStyle.setAttribute 'type', 'text/css' document.getElementsByTagName('head')[0].appendChild reportStyle reportStyle.appendChild document.createTextNode('#ALP_ReportBox{font-weight: bold; width: 250px; position: fixed; right:0px; top: 0px; background: #fff; margin: 20px; padding: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 14px; border-radius: 5px; z-index: 99999; box-shadow: 0px 0px 3px rgba(0,0,0,1);}') reportBox = document.createElement('div') rbHeader = document.createElement('div') rbClose = document.createElement('div') rbClose.innerHTML = '&times;' rbClose.setAttribute 'id', 'ALP_RB_Close' rbSettings = document.createElement('div') reportBox.setAttribute 'id', 'ALP_ReportBox' rbHeader.innerHTML = 'Link Results' document.getElementsByTagName('body')[0].appendChild reportBox rpBox = document.getElementById('ALP_ReportBox') #//////// a = undefined e = undefined h = undefined i = undefined j = undefined r = undefined rcss = undefined rid = undefined tblcss = undefined tdlcss = undefined tdrcss = undefined rid = 'ALT_VIEWER_PLUS' e = (t) -> document.getElementsByTagName t a = (o, a) -> att = o.getAttribute(a) if a == 'alt' and att == null return 'alt未設定' att if document.getElementById(rid) return i = e('img') if i.length <= 0 return r = document.createElement('div') rcss = 'padding:0px;position:fixed;top:0;right:0;border:solid #ccc 1px;z-index:999;max-height:100%;overflow: auto;' tblcss = ' style=\'border-collapse:collapse;background:hsla(0,0%,0%,.75);\'' tdlcss = ' style=\'padding:0 .5em 0 0;border-bottom:solid #fff 2px;text-align:right;\'' tdrcss = ' style=\'padding:0 0 0 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F0EA30;width:250px;\'' r.id = rid r.style.cssText = rcss h = '<style>\n@-webkit-keyframes anime1 {\n0% {opacity: .2;}\n100% {opacity: 1;}\n}\n.img_blink{-webkit-animation: anime1 0.5s ease 0s infinite alternate;}\n</style>' h += '<table' + tblcss + ' class="ATT_VIEWER_TABLE">' j = 0 #/ meta h += '<tr><td colspan="2" style="padding:1em 0 0 1em;border-bottom:solid #fff 2px;text-align:left;color:#fff;white-space:pre-wrap;max-width:500px;line-height:1;font-size: 12px;">' h += '<span class="ALT_VIEWER_CLOSE" style="background-color: hsla(0,100%,100%,1);color: #000;position: absolute;right: 0;top: 0;padding: 0.5em 1em;">Close✕</span>' matas = '' Array::forEach.apply document.querySelectorAll('title, meta, h1'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' inn = e.innerHTML out.replace inn, '<span style="color:#F0EA30;">' + inn + '</span>' attrs = e.attributes i = attrs.length - 1 while i >= 0 # h += attrs[i].name + "->" + attrs[i].value + '\n'; out = out.replace(new RegExp(attrs[i].name, 'g'), '<span style="color:#70BE47;">' + attrs[i].name + '</span>').replace(new RegExp(attrs[i].value, 'g'), '<span style="color:#F55A21;">' + attrs[i].value + '</span>') i-- matas += out + '\n' return ] meta_txt = matas h += meta_txt h += '</td></tr>' #/ meta while j < i.length h += if j % 252 == 0 then '<tr>' else '<tr>' h += '<td' + tdlcss + '><img style=\'max-width: 350px;vertical-align:bottom;\' src=' + a(i[j], 'src') + '></td><td' + tdrcss + '>' + a(i[j], 'alt') + '</td></tr>' j++ #/// title titles = '' Array::forEach.apply document.querySelectorAll('[title]'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' attrs = e.attributes i = attrs.length - 1 while i >= 0 if attrs[i].name == 'title' title = attrs[i].value newout = out.replace('title', '<span style="color:#70BE47;">title</span>').replace(title, '<span style="color:#F55A21;">' + title + '</span>') h += '<tr><td' + tdlcss + ' style=\'max-width: 350px;vertical-align:top;\'><span style=\'max-width: 350px;display: inline-block;line-height:1;font-size: 12px;color: #fff;text-align: left;padding:.5em 0 0 .5em;overflow: hidden;\'>' + newout + '</span></td>' h += '<td class="ALT_VIEWER_TITLE" style="padding:1em 0 1em 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F55A21;width:250px;overflow: hidden;vertical-align: top;">' + title + '</td></tr>' i-- titles += out + '\n' return ] # console.log(titles); #/// /title h += '</table>' e('body')[0].appendChild r r.innerHTML = h r.onclick = -> # this.parentNode.removeChild(this); return # 閉じる document.querySelector('.ALT_VIEWER_CLOSE').onclick = -> `var i` i = r.childNodes.length - 1 while i >= 0 r.removeChild r.childNodes[i] i-- return window.scrollTo 0, 0 # hoverした画像にボーダー Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'solid 3px #F82F66' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="border-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'none' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="content-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.remove 'img_blink' return ), false return ] # hoverした時のtitle Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'solid 3px #F82F66' document.querySelector('[title$="' + title + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.title); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'none' document.querySelector('[title$="' + title + '"]').classList.remove 'img_blink' return ), false return ] #//////// document.getElementById('ALP_RB_Close').onclick = -> removeDOMElement 'ALP_ReportBox' return # Remove the event listener in the event this is run again without reloading chrome.extension.onMessage.removeListener doStuff return ) pageLinks true
true
# Check My Links by PI:NAME:<NAME>END_PI # @ocodia removeClassFromElements = (classname) -> x = document.getElementsByClassName(classname) i = undefined i = 0 while i < x.length x[i].classList.remove classname i++ return removeElementsByClass = (className) -> elements = document.getElementsByClassName(className) while elements.length > 0 elements[0].parentNode.removeChild elements[0] return removeDOMElement = (id) -> if document.getElementById(id) document.getElementById(id).remove() return String::startsWith = (text) -> @substr(0, text.length) == text String::contains = (text) -> @indexOf(text) != -1 chrome.extension.onMessage.addListener (request, sender) -> # Gather links pageLinks = document.getElementsByTagName('a') totalvalid = pageLinks.length queued = 0 checked = 0 invalid = 0 passed = 0 rpBox = undefined # Clear the Previous Run removeDOMElement 'ALP_ReportBox' ((pg) -> blacklist = request.bl blacklisted = undefined cacheType = request.ca checkType = request.ct reportStyle = document.createElement('style') reportStyle.setAttribute 'rel', 'stylesheet' reportStyle.setAttribute 'type', 'text/css' document.getElementsByTagName('head')[0].appendChild reportStyle reportStyle.appendChild document.createTextNode('#ALP_ReportBox{font-weight: bold; width: 250px; position: fixed; right:0px; top: 0px; background: #fff; margin: 20px; padding: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 14px; border-radius: 5px; z-index: 99999; box-shadow: 0px 0px 3px rgba(0,0,0,1);}') reportBox = document.createElement('div') rbHeader = document.createElement('div') rbClose = document.createElement('div') rbClose.innerHTML = '&times;' rbClose.setAttribute 'id', 'ALP_RB_Close' rbSettings = document.createElement('div') reportBox.setAttribute 'id', 'ALP_ReportBox' rbHeader.innerHTML = 'Link Results' document.getElementsByTagName('body')[0].appendChild reportBox rpBox = document.getElementById('ALP_ReportBox') #//////// a = undefined e = undefined h = undefined i = undefined j = undefined r = undefined rcss = undefined rid = undefined tblcss = undefined tdlcss = undefined tdrcss = undefined rid = 'ALT_VIEWER_PLUS' e = (t) -> document.getElementsByTagName t a = (o, a) -> att = o.getAttribute(a) if a == 'alt' and att == null return 'alt未設定' att if document.getElementById(rid) return i = e('img') if i.length <= 0 return r = document.createElement('div') rcss = 'padding:0px;position:fixed;top:0;right:0;border:solid #ccc 1px;z-index:999;max-height:100%;overflow: auto;' tblcss = ' style=\'border-collapse:collapse;background:hsla(0,0%,0%,.75);\'' tdlcss = ' style=\'padding:0 .5em 0 0;border-bottom:solid #fff 2px;text-align:right;\'' tdrcss = ' style=\'padding:0 0 0 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F0EA30;width:250px;\'' r.id = rid r.style.cssText = rcss h = '<style>\n@-webkit-keyframes anime1 {\n0% {opacity: .2;}\n100% {opacity: 1;}\n}\n.img_blink{-webkit-animation: anime1 0.5s ease 0s infinite alternate;}\n</style>' h += '<table' + tblcss + ' class="ATT_VIEWER_TABLE">' j = 0 #/ meta h += '<tr><td colspan="2" style="padding:1em 0 0 1em;border-bottom:solid #fff 2px;text-align:left;color:#fff;white-space:pre-wrap;max-width:500px;line-height:1;font-size: 12px;">' h += '<span class="ALT_VIEWER_CLOSE" style="background-color: hsla(0,100%,100%,1);color: #000;position: absolute;right: 0;top: 0;padding: 0.5em 1em;">Close✕</span>' matas = '' Array::forEach.apply document.querySelectorAll('title, meta, h1'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' inn = e.innerHTML out.replace inn, '<span style="color:#F0EA30;">' + inn + '</span>' attrs = e.attributes i = attrs.length - 1 while i >= 0 # h += attrs[i].name + "->" + attrs[i].value + '\n'; out = out.replace(new RegExp(attrs[i].name, 'g'), '<span style="color:#70BE47;">' + attrs[i].name + '</span>').replace(new RegExp(attrs[i].value, 'g'), '<span style="color:#F55A21;">' + attrs[i].value + '</span>') i-- matas += out + '\n' return ] meta_txt = matas h += meta_txt h += '</td></tr>' #/ meta while j < i.length h += if j % 252 == 0 then '<tr>' else '<tr>' h += '<td' + tdlcss + '><img style=\'max-width: 350px;vertical-align:bottom;\' src=' + a(i[j], 'src') + '></td><td' + tdrcss + '>' + a(i[j], 'alt') + '</td></tr>' j++ #/// title titles = '' Array::forEach.apply document.querySelectorAll('[title]'), [ (e, i, a) -> `var i` out = e.outerHTML.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '\n' attrs = e.attributes i = attrs.length - 1 while i >= 0 if attrs[i].name == 'title' title = attrs[i].value newout = out.replace('title', '<span style="color:#70BE47;">title</span>').replace(title, '<span style="color:#F55A21;">' + title + '</span>') h += '<tr><td' + tdlcss + ' style=\'max-width: 350px;vertical-align:top;\'><span style=\'max-width: 350px;display: inline-block;line-height:1;font-size: 12px;color: #fff;text-align: left;padding:.5em 0 0 .5em;overflow: hidden;\'>' + newout + '</span></td>' h += '<td class="ALT_VIEWER_TITLE" style="padding:1em 0 1em 1em;border-bottom:solid #fff 2px;text-align:left;background-color:hsla(0,0%,0%,.45);color:#F55A21;width:250px;overflow: hidden;vertical-align: top;">' + title + '</td></tr>' i-- titles += out + '\n' return ] # console.log(titles); #/// /title h += '</table>' e('body')[0].appendChild r r.innerHTML = h r.onclick = -> # this.parentNode.removeChild(this); return # 閉じる document.querySelector('.ALT_VIEWER_CLOSE').onclick = -> `var i` i = r.childNodes.length - 1 while i >= 0 r.removeChild r.childNodes[i] i-- return window.scrollTo 0, 0 # hoverした画像にボーダー Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'solid 3px #F82F66' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="border-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE img'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.src); filename_ex = event.target.src.match('.+/(.+?)([?#;].*)?$')[1] document.querySelector('[src$="' + filename_ex + '"]').style.border = 'none' # document.querySelector('[src$="'+filename_ex+'"]').style.boxSizing ="content-box"; document.querySelector('[src$="' + filename_ex + '"]').classList.remove 'img_blink' return ), false return ] # hoverした時のtitle Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseover', ((event) -> # console.log("mouseover", event.target.src); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'solid 3px #F82F66' document.querySelector('[title$="' + title + '"]').classList.add 'img_blink' return ), false return ] Array::forEach.apply document.querySelectorAll('.ATT_VIEWER_TABLE .ALT_VIEWER_TITLE'), [ (e, i, a) -> e.addEventListener 'mouseout', ((event) -> # console.log("mouseout", event.target.title); title = event.target.innerText document.querySelector('[title$="' + title + '"]').style.border = 'none' document.querySelector('[title$="' + title + '"]').classList.remove 'img_blink' return ), false return ] #//////// document.getElementById('ALP_RB_Close').onclick = -> removeDOMElement 'ALP_ReportBox' return # Remove the event listener in the event this is run again without reloading chrome.extension.onMessage.removeListener doStuff return ) pageLinks true
[ { "context": "###\nCopyright (C) 2013, Bill Burdick, Tiny Concepts: https://github.com/zot/Leisure\n\n(", "end": 36, "score": 0.9998490810394287, "start": 24, "tag": "NAME", "value": "Bill Burdick" }, { "context": ", Bill Burdick, Tiny Concepts: https://github.com/zot/Leisure\n\n(licensed with ZLIB license)\n\nThis softw", "end": 75, "score": 0.9993675947189331, "start": 72, "tag": "USERNAME", "value": "zot" } ]
METEOR-OLD/private/build/runtime.coffee
zot/Leisure
58
### Copyright (C) 2013, Bill Burdick, Tiny Concepts: https://github.com/zot/Leisure (licensed with ZLIB license) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ### { readFile, statFile, readDir, writeFile, defaultEnv, SimpyCons, simpyCons, resolve, lazy, nsLog, funcInfo, } = root = (module ? {}).exports = require '15-base' { define, nakedDefine, cons, Nil, head, tail, getType, getDataType, ast2Json, ensureLeisureClass, LeisureObject, mkProto, setType, setDataType, functionInfo, nameSub, } = require '16-ast' _ = (Leisure.require ? require) 'lodash.min' { Map, } = Immutable ? require '05-immutable' yaml = require 'yaml' { safeLoad, dump, } = Leisure.yaml rz = resolve lz = lazy lc = Leisure_call gensymCounter = 0 call = (args...)-> basicCall(args, defaultEnv, identity) callMonad = (args..., env, cont)-> basicCall(args, env, cont) basicCall = (args, env, cont)-> res = rz global["L_#{args[0]}"] for arg in args[1..] res = do (arg)-> res(lz arg) runMonad res, env, cont consFrom = (array, i)-> i = i || 0 if i < array.length then cons array[i], consFrom(array, i + 1) else rz L_nil ############ # LOGIC ############ identity = (x)-> x _identity = (x)-> rz x _unit = setType ((x)->rz x), 'unit' _true = setType ((a)->(b)->rz a), 'true' _false = setType ((a)->(b)->rz b), 'false' left = (x)-> setType ((lCase)->(rCase)-> rz(lCase)(lz x)), 'left' right = (x)-> setType ((lCase)->(rCase)-> rz(rCase)(lz x)), 'right' some = (x)-> setType ((someCase)->(noneCase)-> rz(someCase)(lz x)), 'some' none = setType ((someCase)->(noneCase)-> rz(noneCase)), 'none' define 'eq', (a)->(b)-> booleanFor rz(a) == rz(b) define '==', (a)->(b)-> booleanFor rz(a) == rz(b) booleanFor = (bool)-> if bool then rz L_true else rz L_false define 'hasType', (data)->(func)-> if typeof rz(func) == 'string' then booleanFor getType(rz(data)) == rz(func) else booleanFor getType(rz data) == getDataType(rz func) define 'getDataType', (func)-> if typeof rz(func) == 'string' then rz(func) else getDataType(rz(func)) define 'assert', (bool)->(msg)-> (expr)-> rz(bool)(expr)(-> throw new Error(rz msg)) define 'assertLog', (bool)->(msg)->(expr)-> rz(bool)(expr)(-> console.log new Error(rz msg).stack console.log "LOGGED ERROR -- RESUMING EXECUTION..." rz expr) define 'trace', (msg)-> console.log "STACKTRACE: ", new Error(rz msg).stack msg define 'jsTrue', (x)-> if rz(x) then _true else _false define 'error', (msg)-> throw new Error rz msg ############ # MATH ############ define '+', (x)->(y)->rz(x) + rz(y) define '-', (x)->(y)->rz(x) - rz(y) define '*', (x)->(y)->rz(x) * rz(y) define '/', (x)->(y)->rz(x) / rz(y) define '%', (x)->(y)->rz(x) % rz(y) define '<', (x)->(y)->booleanFor rz(x) < rz(y) define '<=', (x)->(y)->booleanFor rz(x) <= rz(y) define '>', (x)->(y)->booleanFor rz(x) > rz(y) define '>=', (x)->(y)->booleanFor rz(x) >= rz(y) define 'floor', (x)-> Math.floor(rz x) define 'ceil', (x)-> Math.ceil(rz x) define 'min', (x)->(y)-> Math.min rz(x), rz(y) define 'max', (x)->(y)-> Math.max rz(x), rz(y) define 'round', (x)-> Math.round(rz x) define 'abs', (x)-> Math.abs(rz x) define 'sqrt', (x)-> Math.sqrt(rz x) define 'acos', (x)-> Math.acos(rz x) define 'asin', (x)-> Math.asin(rz x) define 'atan', (x)-> Math.atan(rz x) define 'atan2', (x)->(y)-> Math.atan2(rz(x), rz(y)) define 'cos', (x)-> Math.cos(rz x) #define 'log', (x)-> Math.log(rz x) define 'sin', (x)-> Math.sin(rz x) define 'tan', (x)-> Math.tan(rz x) define 'rand', -> makeSyncMonad (env, cont)-> cont (Math.random()) define 'randInt', (low)->(high)->makeSyncMonad (env, cont)-> cont (Math.floor(rz(low) + Math.random() * rz(high))) define '^', (x)->(y)->Math.pow(rz(x), rz(y)) define 'number', (n)-> Number n ############ # STRINGS ############ define '_show', (data)-> if typeof rz(data) in ['string', 'number', 'boolean'] then JSON.stringify rz data else if getType(rz data) == 'err' then rz(L_errMsg)(data) else String rz data define 'strString', (data)-> String rz data define '_strAsc', (str)-> rz(str).charCodeAt(0) define '_strChr', (i)-> String.fromCharCode(rz i) define '_strAt', (str)->(index)-> rz(str)[strCoord(rz(str), rz(index))] define '_strStartsWith', (str)->(prefix)-> booleanFor rz(str).substring(0, rz(prefix).length) == rz(prefix) define '_strLen', (str)-> rz(str).length define '_strToLowerCase', (str)-> rz(str).toLowerCase() define '_strToUpperCase', (str)-> rz(str).toUpperCase() define '_strReplace', (str)->(pat)->(repl)-> rz(str).replace rz(pat), rz(repl) strCoord = (str, coord)-> if coord < 0 then str.length + coord else coord define '_strSubstring', (str)->(start)->(end)-> a = strCoord(rz(str), rz(start)) b = strCoord(rz(str), rz(end)) if b < a && rz(end) == 0 then b = rz(str).length rz(str).substring a, b define '_strSplit', (str)->(pat)-> consFrom rz(str).split if rz(pat) instanceof RegExp then rz(pat) else new RegExp rz(pat) define '_strCat', (list)-> _.map(rz(list).toArray(), (el)-> if typeof el == 'string' then el else rz(L_show)(lz el)).join('') define '_strAdd', (s1)->(s2)-> rz(s1) + rz(s2) define '_strMatch', (str)->(pat)-> m = rz(str).match (if rz(pat) instanceof RegExp then rz pat else new RegExp rz pat) if m groups = [] pos = 1 while m[pos] groups.push m[pos++] if typeof m.index != 'undefined' then consFrom [m[0], consFrom(groups), m.index, m.input] else consFrom [m[0], consFrom(groups)] else if L_nil then rz L_nil else Nil define '_strToList', (str)-> strToList rz str strToList = (str)-> if str == '' then Nil else cons str[0], strToList str.substring 1 define '_strFromList', (list)-> strFromList rz list strFromList = (list)-> if list instanceof Leisure_nil then '' else head(list) + strFromList(tail list) define '_regexp', (str)-> new RegExp rz str define '_regexpFlags', (str)->(flags)-> new RegExp rz(str), rz(flags) define '_jsonParse', (str)->(failCont)->(successCont)-> try p = JSON.parse rz str rz(successCont) lz p catch err rz(failCont) lz err define 'jsonStringify', (obj)->(failCont)->(successCont)-> try s = JSON.stringify rz obj rz(successCont) lz s catch err rz(failCont) lz err ############ # properties ############ define 'getProperties', (func)-> if rz(func)?.properties then rz(func).properties else rz L_nil define 'setProperty', (func)->(name)->(value)-> makeSyncMonad (env, cont)-> f = rz func f.properties = rz(L_aconsf)(name)(value)(lz f.properties ? rz(L_nil)) cont f.properties ############ # Diagnostics ############ define 'log', (str)->(res)-> console.log String rz str rz res define 'logStack', (str)->(res)-> console.log new Error(rz str).stack rz res # an identity function you can put a breakpoint on define 'breakpoint', (x)-> console.log 'Break point ', rz x rz x ############ # IO Monads ############ # Make a new function and hide func and binding in properties on it # making them inaccessible to pure Leisure code # so people won't accidentally fire off side effects makeMonad = (guts)-> m = -> throw new Error "ILLEGAL CALL TO MONAD FUNCTION!" m.__proto__ = Monad.prototype m.cmd = guts m.type = 'monad' m makeSyncMonad = (guts)-> m = makeMonad guts m.sync = true m nextMonad = (cont)-> cont replaceErr = (err, msg)-> err.message = msg err defaultEnv.write = (str)-> process.stdout.write(str) defaultEnv.err = (err)-> @write "ENV Error: #{err.stack ? err}" defaultEnv.prompt = ->throw new Error "Environment does not support prompting!" monadModeSync = false getMonadSyncMode = -> monadModeSync withSyncModeDo = (newMode, block)-> oldMode = monadModeSync monadModeSync = newMode try block() catch err console.log "ERR: #{err.stack ? err}" finally #if !monadModeSync && oldMode then console.log "REENABLING SYNC" #monadModeSync = oldMode runMonad = (monad, env, cont)-> env = env ? root.defaultEnv withSyncModeDo true, -> newRunMonad monad, env, cont, [] isMonad = (m)-> typeof m == 'function' && m.cmd? continueMonads = (contStack, env)-> (result)-> withSyncModeDo false, -> newRunMonad result, env, null, contStack asyncMonad = {toString: -> "<asyncMonadResult>"} warnAsync = false setWarnAsync = (state)-> warnAsync = state newRunMonad = (monad, env, cont, contStack)-> #if monad instanceof Monad2 # console.log 'MONAD 2' # return runMonad2 monad, env, cont, contStack if cont then contStack.push cont try while true #monad = L_asIO?()(lz monad) ? monad if monad instanceof Monad2 return runMonad2 monad, env, continueMonads(contStack, env), [] else if isMonad monad if monad.binding do (bnd = monad.binding)-> contStack.push (x)-> rz(bnd) lz x monad = rz monad.monad continue else if !monad.sync monadModeSync = false #console.log "turned off sync" if warnAsync then console.log "async monad" monad.cmd(env, continueMonads(contStack, env)) return asyncMonad result = monad.cmd(env, identity) else monadModeSync = true result = monad if !contStack.length then return result monad = contStack.pop() result catch err err = replaceErr err, "\nERROR RUNNING MONAD, MONAD: #{monad}, ENV: #{env}...\n#{err.message}" console.log err.stack ? err if env.errorHandlers.length then env.errorHandlers.pop() err callBind = (value, contStack)-> func = contStack.pop() val = lz value tmp = L_bind()(val)(lz func) if isMonad(tmp) && (tmp.monad == val || tmp.monad == value) console.log "peeling bind" func value else tmp #if isMonad(tmp) && tmp?.binding? then func value else tmp class Monad toString: -> "Monad: #{@cmd.toString()}" (global ? window).L_runMonads = (monadArray, env)-> #console.log "RUNNING MONADS" monadArray.reverse() newRunMonad 0, (env ? defaultEnv), null, monadArray monadArray #global.L_runMonads = (monadArray, env, cont)-> # nextMonad = (ind)-> # if ind >= monadArray.length then cont?() # else # runMonad2 monadArray[ind], env, -> # setTimeout (->nextMonad ind + 1), 1 # nextMonad 0 # monadArray ensureLeisureClass 'unit' class Leisure_unit extends LeisureObject toString: -> 'unit' _unit = mkProto Leisure_unit, setType ((_x)-> rz(_x)), 'unit' define 'define', (name)->(arity)->(src)->(def)-> #console.log "DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src) cont _unit define 'newDefine', (name)->(arity)->(src)->(def)-> #console.log "NEW DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src), null, null, true cont _unit #runMonads = (monads, i, arg)-> # if i < monads.length # console.log "running monad #{i}" # setTimeout (-> newRunMonad monads[i](arg), defaultEnv, ((x)-> runMonads monads, i + 1, x), []), 1 # #global.L_runMonads = (monadArray)-> # console.log "RUNNING #{monadArray.length} monads, ..." # runMonads monadArray, 0, 0 # monadArray runMonad2 = (monad, env, cont)-> if monad instanceof Monad2 then monad.cmd(env, cont) #else if isMonad monad then newRunMonad monad, env, cont, [] else if isMonad monad if monad.binding? runMonad2 rz(monad.monad), env, (x)-> runMonad2 rz(monad.binding)(lz x), env, cont else monad.cmd(env, cont) else cont monad class Monad2 extends Monad constructor: (@name, @cmd, @cmdToString)-> if typeof @name == 'function' @cmdToString = @cmd @cmd = name @name = null if !@cmdToString then @cmdToString = => (if name then "#{name}: " else '') + @cmd.toString() toString: -> "Monad2: #{@cmdToString()}" #define 'return', (v)-> new Monad2 ((env, cont)-> cont rz v), -> "return #{rz v}" define 'defer', (v)-> new Monad2 ((env, cont)-> setTimeout (->cont rz v), 1), -> "defer #{rz v}" define 'bind2', bind2 = (m)->(binding)-> newM = rz m if (newM instanceof Monad2) || (isMonad newM) new Monad2 'bind', ((env, cont)-> runMonad2 newM, env, (value)-> #runMonad2 rz(L_bind2)(lz value)(binding), env, cont), -> runMonad2 rz(binding)(lz value), env, cont), -> "bind (#{rz m})" else rz(binding) m newbind = false #newbind = true if newbind then define 'bind', bind2 else define 'bind', (m)->(binding)-> if isMonad rz m bindMonad = makeMonad (env, cont)-> bindMonad.monad = m bindMonad.binding = binding bindMonad else rz(binding) m values = {} # # Error handling # define 'protect', (value)-> makeMonad (env, cont)-> hnd = (err)-> console.log "PROTECTED ERROR: #{err.stack ? err}" cont left err.stack ? err env.errorHandlers.push hnd runMonad rz(value), env, ((result)-> #console.log "PROTECT CONTINUING WITH RESULT: #{result}" if env.errorHandlers.length if env.errorHandlers[env.errorHandlers.length - 1] == hnd then env.errorHandlers.pop() else if _.contains(env.errorHandlers, hnd) while env.errorHandlers[env.errorHandlers.length - 1] != hnd env.errorHandlers.pop() cont right result), [] # # ACTORS # # To create an actor: # actor name function # -- function takes one arg, to process messages # -- if function returns a monad, it executes the monad # # To send a message: # send name message # -- send message to the named actor # actors = {} define 'actor', (name)->(func)-> actors[name] = func func.env = values: {} func.env.__proto__ = defaultEnv define 'send', (name)->(msg)-> setTimeout (-> runMonad (rz(actors[name])(msg)), rz(actors[name]).env), 1 define 'hasValue', (name)-> makeSyncMonad (env, cont)-> cont booleanFor values[rz name]? define 'getValueOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(values[rz name] ? rz(defaultValue)) define 'getValue', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of values) then throw new Error "No value named '#{rz name}'" cont values[rz name] # New getValue for when the option monad is integrated with the parser #define 'getValue', (name)-> # makeSyncMonad (env, cont)-> # cont (if !(rz(name) of values) then none else some values[rz name]) define 'setValue', (name)->(value)-> makeSyncMonad (env, cont)-> values[rz name] = rz value cont _unit define 'deleteValue', (name)-> makeSyncMonad (env, cont)-> delete values[rz name] cont _unit setValue = (key, value)-> values[key] = value getValue = (key)-> values[key] define 'envHas', (name)-> makeSyncMonad (env, cont)-> cont booleanFor env.values[rz name]? define 'envGetOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(env.values[rz name] ? rz(defaultValue)) define 'envGet', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of env.values) then throw new Error "No value named '#{rz name}'" cont env.values[rz name] define 'envSet', (name)->(value)-> makeSyncMonad (env, cont)-> env.values[rz name] = rz(value) cont _unit define 'envDelete', (name)-> makeSyncMonad (env, cont)-> delete env.values[rz name] cont _unit setValue 'macros', Nil define 'defMacro', (name)->(def)-> makeSyncMonad (env, cont)-> values.macros = cons cons(rz(name), rz(def)), values.macros cont _unit define 'funcList', makeSyncMonad (env, cont)-> cont consFrom global.leisureFuncNames.toArray().sort() define 'funcs', makeSyncMonad (env, cont)-> console.log "Leisure functions:\n#{_(global.leisureFuncNames.toArray()).sort().join '\n'}" cont _unit define 'funcSrc', (func)-> if typeof rz(func) == 'function' info = functionInfo[rz(func).leisureName] if info?.src then some info.src else none define 'ast2Json', (ast)-> JSON.stringify ast2Json rz ast define 'override', (name)->(newFunc)-> makeSyncMonad (env, cont)-> n = "L_#{nameSub rz name}" oldDef = global[n] if !oldDef then throw new Error("No definition for #{rz name}") global[n] = -> rz(newFunc)(oldDef) cont _unit ####################### # IO ####################### # define 'trace', (msg)-> # makeSyncMonad (env, cont)-> # cont (root.E = new Error(msg)).stack define 'gensym', makeSyncMonad (env, cont)-> cont "G#{gensymCounter++}" define 'print', (msg)-> makeSyncMonad (env, cont)-> env.write env.presentValue rz msg cont _unit define 'print2', (msg)-> new Monad2 'print2', ((env, cont)-> env.write env.presentValue rz msg cont _unit), -> "print2 #{rz msg}" define 'write', (msg)-> new Monad2 'write', ((env, cont)-> env.write String(rz msg) cont _unit), -> "write #{rz msg}" define 'prompt2', (msg)-> new Monad2 ((env, cont)-> env.prompt(String(rz msg), (input)-> cont input)), -> "prompt2 #{rz msg}" define 'oldWrite', (msg)-> makeSyncMonad (env, cont)-> env.write String(rz msg) cont _unit define 'readFile', (name)-> makeMonad (env, cont)-> env.readFile rz(name), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'readDir', (dir)-> makeMonad (env, cont)-> env.readDir rz(dir), (err, files)-> cont (if err then left err.stack ? err else right files) define 'writeFile', (name)->(data)-> makeMonad (env, cont)-> env.writeFile rz(name), rz(data), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'statFile', (file)-> makeMonad (env, cont)-> env.statFile rz(file), (err, stats)-> cont (if err then left err.stack ? err else right stats) define 'prompt', (msg)-> makeMonad (env, cont)-> env.prompt(String(rz msg), (input)-> cont(input)) define 'rand', makeSyncMonad (env, cont)-> cont(Math.random()) define 'js', (str)-> makeSyncMonad (env, cont)-> try result = eval rz str cont right result catch err cont left err define 'delay', (timeout)-> new Monad2 (env, cont)-> setTimeout (-> cont _unit), rz(timeout) define 'currentTime', new Monad2 (env, cont)-> cont Date.now define 'once', makeSyncMonad (-> ran = false (env, cont)-> if !ran console.log "RUNNING" ran = true cont _unit else console.log "ALREADY RAN")() ################## # Function advice ################## # later advice overrides earlier advice define 'advise', (name)->(alt)->(arity)->(def)-> makeMonad (env, cont)-> info = functionInfo[rz name] if !info then info = functionInfo[rz name] = src: '' arity: -1 alts: {} altList: [] if !info.alts[rz alt] then info.altList.push rz alt info.alts[rz alt] = rz def alts = (info.alts[i] for i in info.altList) alts.reverse() newDef = curry rz(arity), (args)-> for alt in alts opt = alt for arg in args opt = opt arg if getType(opt) == 'some' then return opt(lz (x)->rz x)(lz _false) if info.mainDef res = rz info.mainDef for arg in args res = res arg return res throw new Error "No default definition for #{rz name}" nm = "L_#{nameSub rz name}" global[nm] = global.leisureFuncNames[nm] = newDef functionInfo[name].newArity = false cont def curry = (arity, func)-> -> lz (arg)-> lz (subcurry arity, func, null) arg subcurry = (arity, func, args)-> lz (arg)-> #console.log "Got arg # #{arity}: #{rz arg}" args = simpyCons arg, args if arity == 1 then func(args.toArray().reverse()) else subcurry arity - 1, func, args ####################### # Presentation ####################### presentationReplacements = '<': '&lt;' '>': '&gt;' '&': '&amp;' '\n': '\\n' '\\': '\\\\' escapePresentationHtml = (str)-> if typeof str == 'string' then str.replace /[<>&\n\\]/g, (c)-> presentationReplacements[c] else str presentationToHtmlReplacements = '&lt;': '<' '&gt;': '>' '&amp;': '&' '\\n': '\n' '\\\\': '\\' unescapePresentationHtml = (str)-> str.replace /&lt;|&gt;|&amp;|\\n|\\/g, (c)-> presentationToHtmlReplacements[c] define 'escapeHtml', (h)-> escapePresentationHtml rz(h) define 'unescapeHtml', (h)-> unescapePresentationHtml rz(h) ####################### # AMTs ####################### makeHamt = (hamt)-> hamt.leisureType = 'hamt' hamt hamt = makeHamt Map() hamt.leisureDataType = 'hamt' define 'hamt', hamt define 'hamtWith', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtSet', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtFetch', (key)->(hamt)-> rz(hamt).get rz(key) define 'hamtGet', (key)->(hamt)-> v = rz(hamt).get rz(key) if v != undefined then some v else none define 'hamtWithout', (key)->(hamt)-> makeHamt rz(hamt).remove rz(key) #define 'hamtOpts', (eq)->(hash)-> # #define 'hamtAssocOpts', (hamt)->(key)->(value)->(opts)-> amt.assoc(rz(hamt), rz(key), rz(value), rz(opts)) # #define 'hamtFetchOpts', (hamt)->(key)->(opts)-> amt.get(rz(hamt), rz(key), rz(opts)) # #define 'hamtGetOpts', (hamt)->(key)->(opts)-> # v = amt.get(rz(hamt), rz(key), rz(opts)) # if v != null then some v else none # #define 'hamtDissocOpts', (hamt)->(key)->(opts)-> amt.dissoc(rz(hamt), rz(key), rz(opts)) define 'hamtPairs', (hamt)-> nextHamtPair rz(hamt).entries() nextHamtPair = (entries)-> if entries.size == 0 then rz L_nil else f = entries.first() rz(L_acons)(f[0])(f[1])(-> nextHamtPair entries.rest) ################# # YAML and JSON ################# lacons = (k, v, list)-> rz(L_acons)(lz k)(lz v)(lz list) jsonConvert = (obj)-> if obj instanceof Array consFrom (jsonConvert i for i in obj) else if typeof obj == 'object' t = rz L_nil for k, v of obj t = lacons k, jsonConvert(v), t t else obj define 'fromJson', (obj)-> jsonConvert rz obj define 'parseYaml', (obj)-> safeLoad rz obj define 'toJsonArray', (list)-> list = rz list array = [] while !list.isNil() array.push list.head() list = list.tail() array define 'toJsonObject', (list)-> list = rz list obj = {} while !list.isNil() head = list.head() if !obj[head.head()]? then obj[head.head()] = head.tail() list = list.tail() obj define 'jsonToYaml', (json)-> try right dump rz json catch err left err.stack ####################### # Trampolines ####################### define 'trampolineCall', (func)-> ret = rz func while true if typeof ret == 'function' && ret.trampoline then ret = ret() else return ret define 'trampoline', (func)-> f = rz func arity = functionInfo[f.leisureName].arity trampCurry f, arity trampCurry = (func, arity)-> (arg)-> a = rz arg if arity > 1 then trampCurry (func ->a), arity - 1 else result = -> func ->a result.trampoline = true result ####################### # NAME SPACES ####################### define 'setNameSpace', (name)-> makeSyncMonad (env, cont)-> root.currentNameSpace = rz name newNameSpace = false if name newNameSpace = !LeisureNameSpaces[name] if newNameSpace then LeisureNameSpaces[name] = {} nsLog "SETTING NAME SPACE: #{name}" cont (if newNameSpace then _true else _false) define 'pushNameSpace', (newNameSpace)-> makeSyncMonad (env, cont)-> pushed = LeisureNameSpaces[newNameSpace] && ! (newNameSpace in root.nameSpacePath) if pushed then root.nameSpacePath.push newNameSpace cont (if pushed then _true else _false) define 'clearNameSpacePath', makeSyncMonad (env, cont)-> root.nameSpacePath = [] cont _unit define 'resetNameSpaceInfo', makeSyncMonad (enf, cont)-> old = [root.nameSpacePath, root.currentNameSpace] root.nameSpacePath = ['core'] root.currentNameSpace = null nsLog "SETTING NAME SPACE: null" cont old define 'setNameSpaceInfo', (info)-> makeSyncMonad (env, cont)-> #console.log "RESTORING NAME SPACE INFO: #{require('util').inspect rz info}" [root.nameSpacePath, root.currentNameSpace] = rz info nsLog "SETTING NAME SPACE: #{root.currentNameSpace}" cont _unit ####################### # Classes for Printing ####################### ensureLeisureClass 'token' Leisure_token.prototype.toString = -> "Token(#{JSON.stringify(tokenString(@))}, #{posString tokenPos(@)})" tokenString = (t)-> t(lz (txt)->(pos)-> rz txt) tokenPos = (t)-> t(lz (txt)->(pos)-> rz pos) ensureLeisureClass 'filepos' posString = (p)-> if p instanceof Leisure_filepos then p(lz (file)->(line)->(offset)-> "#{rz file}:#{rz line}.#{rz offset}") else p ensureLeisureClass 'parens' Leisure_parens.prototype.toString = -> "Parens(#{posString parensStart @}, #{posString parensEnd @}, #{parensContent @})" parensStart = (p)-> p(lz (s)->(e)->(l)-> rz s) parensEnd = (p)-> p(lz (s)->(e)->(l)-> rz e) parensContent = (p)-> p(lz (s)->(e)->(l)-> rz l) ensureLeisureClass 'true' Leisure_true.prototype.toString = -> "true" ensureLeisureClass 'false' Leisure_false.prototype.toString = -> "false" ensureLeisureClass 'left' Leisure_left.prototype.toString = -> "Left(#{@(lz _identity)(lz _identity)})" ensureLeisureClass 'right' Leisure_right.prototype.toString = -> "Right(#{@(lz _identity)(lz _identity)})" ####################### # LOADING ####################### requireFiles = (req, cont, verbose)-> if req.length if verbose then console.log "REQUIRING FILE: #{req[0]}" contStack = require req.shift() if Array.isArray(contStack) && contStack.length then contStack.unshift -> requireFiles req, cont, verbose else requireFiles req, cont, verbose else cont() ####################### # Func info ####################### define 'funcInfo', (f)-> funcInfo rz f define 'funcName', (f)-> if rz(f).leisureName then some rz(f).leisureName else none define 'trackCreation', (flag)-> makeSyncMonad (env, cont)-> root.trackCreation = rz(flag)(lz true)(lz false) cont _unit define 'trackVars', (flag)-> makeSyncMonad (env, cont)-> root.trackVars = rz(flag)(lz true)(lz false) cont _unit define 'getFunction', (name)-> f = rz global['L_' + (nameSub rz name)] if f then some f else none ####################### # Exports ####################### root.requireFiles = requireFiles root._true = _true root._false = _false root._unit = _unit root.stateValues = values root.runMonad = runMonad root.runMonad2 = runMonad2 root.newRunMonad = newRunMonad root.isMonad = isMonad root.Monad2 = Monad2 root.identity = identity root.setValue = setValue root.getValue = getValue root.makeMonad = makeMonad root.makeSyncMonad = makeSyncMonad root.replaceErr = replaceErr root.left = left root.right = right root.getMonadSyncMode = getMonadSyncMode root.asyncMonad = asyncMonad root.setWarnAsync = setWarnAsync root.call = call root.callMonad = callMonad root.basicCall = basicCall root.booleanFor = booleanFor root.newConsFrom = consFrom root.escapePresentationHtml = escapePresentationHtml root.unescapePresentationHtml = unescapePresentationHtml root.makeHamt = makeHamt root.jsonConvert = jsonConvert if window? window.runMonad = runMonad window.setType = setType window.setDataType = setDataType window.defaultEnv = defaultEnv window.identity = identity
75452
### Copyright (C) 2013, <NAME>, Tiny Concepts: https://github.com/zot/Leisure (licensed with ZLIB license) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ### { readFile, statFile, readDir, writeFile, defaultEnv, SimpyCons, simpyCons, resolve, lazy, nsLog, funcInfo, } = root = (module ? {}).exports = require '15-base' { define, nakedDefine, cons, Nil, head, tail, getType, getDataType, ast2Json, ensureLeisureClass, LeisureObject, mkProto, setType, setDataType, functionInfo, nameSub, } = require '16-ast' _ = (Leisure.require ? require) 'lodash.min' { Map, } = Immutable ? require '05-immutable' yaml = require 'yaml' { safeLoad, dump, } = Leisure.yaml rz = resolve lz = lazy lc = Leisure_call gensymCounter = 0 call = (args...)-> basicCall(args, defaultEnv, identity) callMonad = (args..., env, cont)-> basicCall(args, env, cont) basicCall = (args, env, cont)-> res = rz global["L_#{args[0]}"] for arg in args[1..] res = do (arg)-> res(lz arg) runMonad res, env, cont consFrom = (array, i)-> i = i || 0 if i < array.length then cons array[i], consFrom(array, i + 1) else rz L_nil ############ # LOGIC ############ identity = (x)-> x _identity = (x)-> rz x _unit = setType ((x)->rz x), 'unit' _true = setType ((a)->(b)->rz a), 'true' _false = setType ((a)->(b)->rz b), 'false' left = (x)-> setType ((lCase)->(rCase)-> rz(lCase)(lz x)), 'left' right = (x)-> setType ((lCase)->(rCase)-> rz(rCase)(lz x)), 'right' some = (x)-> setType ((someCase)->(noneCase)-> rz(someCase)(lz x)), 'some' none = setType ((someCase)->(noneCase)-> rz(noneCase)), 'none' define 'eq', (a)->(b)-> booleanFor rz(a) == rz(b) define '==', (a)->(b)-> booleanFor rz(a) == rz(b) booleanFor = (bool)-> if bool then rz L_true else rz L_false define 'hasType', (data)->(func)-> if typeof rz(func) == 'string' then booleanFor getType(rz(data)) == rz(func) else booleanFor getType(rz data) == getDataType(rz func) define 'getDataType', (func)-> if typeof rz(func) == 'string' then rz(func) else getDataType(rz(func)) define 'assert', (bool)->(msg)-> (expr)-> rz(bool)(expr)(-> throw new Error(rz msg)) define 'assertLog', (bool)->(msg)->(expr)-> rz(bool)(expr)(-> console.log new Error(rz msg).stack console.log "LOGGED ERROR -- RESUMING EXECUTION..." rz expr) define 'trace', (msg)-> console.log "STACKTRACE: ", new Error(rz msg).stack msg define 'jsTrue', (x)-> if rz(x) then _true else _false define 'error', (msg)-> throw new Error rz msg ############ # MATH ############ define '+', (x)->(y)->rz(x) + rz(y) define '-', (x)->(y)->rz(x) - rz(y) define '*', (x)->(y)->rz(x) * rz(y) define '/', (x)->(y)->rz(x) / rz(y) define '%', (x)->(y)->rz(x) % rz(y) define '<', (x)->(y)->booleanFor rz(x) < rz(y) define '<=', (x)->(y)->booleanFor rz(x) <= rz(y) define '>', (x)->(y)->booleanFor rz(x) > rz(y) define '>=', (x)->(y)->booleanFor rz(x) >= rz(y) define 'floor', (x)-> Math.floor(rz x) define 'ceil', (x)-> Math.ceil(rz x) define 'min', (x)->(y)-> Math.min rz(x), rz(y) define 'max', (x)->(y)-> Math.max rz(x), rz(y) define 'round', (x)-> Math.round(rz x) define 'abs', (x)-> Math.abs(rz x) define 'sqrt', (x)-> Math.sqrt(rz x) define 'acos', (x)-> Math.acos(rz x) define 'asin', (x)-> Math.asin(rz x) define 'atan', (x)-> Math.atan(rz x) define 'atan2', (x)->(y)-> Math.atan2(rz(x), rz(y)) define 'cos', (x)-> Math.cos(rz x) #define 'log', (x)-> Math.log(rz x) define 'sin', (x)-> Math.sin(rz x) define 'tan', (x)-> Math.tan(rz x) define 'rand', -> makeSyncMonad (env, cont)-> cont (Math.random()) define 'randInt', (low)->(high)->makeSyncMonad (env, cont)-> cont (Math.floor(rz(low) + Math.random() * rz(high))) define '^', (x)->(y)->Math.pow(rz(x), rz(y)) define 'number', (n)-> Number n ############ # STRINGS ############ define '_show', (data)-> if typeof rz(data) in ['string', 'number', 'boolean'] then JSON.stringify rz data else if getType(rz data) == 'err' then rz(L_errMsg)(data) else String rz data define 'strString', (data)-> String rz data define '_strAsc', (str)-> rz(str).charCodeAt(0) define '_strChr', (i)-> String.fromCharCode(rz i) define '_strAt', (str)->(index)-> rz(str)[strCoord(rz(str), rz(index))] define '_strStartsWith', (str)->(prefix)-> booleanFor rz(str).substring(0, rz(prefix).length) == rz(prefix) define '_strLen', (str)-> rz(str).length define '_strToLowerCase', (str)-> rz(str).toLowerCase() define '_strToUpperCase', (str)-> rz(str).toUpperCase() define '_strReplace', (str)->(pat)->(repl)-> rz(str).replace rz(pat), rz(repl) strCoord = (str, coord)-> if coord < 0 then str.length + coord else coord define '_strSubstring', (str)->(start)->(end)-> a = strCoord(rz(str), rz(start)) b = strCoord(rz(str), rz(end)) if b < a && rz(end) == 0 then b = rz(str).length rz(str).substring a, b define '_strSplit', (str)->(pat)-> consFrom rz(str).split if rz(pat) instanceof RegExp then rz(pat) else new RegExp rz(pat) define '_strCat', (list)-> _.map(rz(list).toArray(), (el)-> if typeof el == 'string' then el else rz(L_show)(lz el)).join('') define '_strAdd', (s1)->(s2)-> rz(s1) + rz(s2) define '_strMatch', (str)->(pat)-> m = rz(str).match (if rz(pat) instanceof RegExp then rz pat else new RegExp rz pat) if m groups = [] pos = 1 while m[pos] groups.push m[pos++] if typeof m.index != 'undefined' then consFrom [m[0], consFrom(groups), m.index, m.input] else consFrom [m[0], consFrom(groups)] else if L_nil then rz L_nil else Nil define '_strToList', (str)-> strToList rz str strToList = (str)-> if str == '' then Nil else cons str[0], strToList str.substring 1 define '_strFromList', (list)-> strFromList rz list strFromList = (list)-> if list instanceof Leisure_nil then '' else head(list) + strFromList(tail list) define '_regexp', (str)-> new RegExp rz str define '_regexpFlags', (str)->(flags)-> new RegExp rz(str), rz(flags) define '_jsonParse', (str)->(failCont)->(successCont)-> try p = JSON.parse rz str rz(successCont) lz p catch err rz(failCont) lz err define 'jsonStringify', (obj)->(failCont)->(successCont)-> try s = JSON.stringify rz obj rz(successCont) lz s catch err rz(failCont) lz err ############ # properties ############ define 'getProperties', (func)-> if rz(func)?.properties then rz(func).properties else rz L_nil define 'setProperty', (func)->(name)->(value)-> makeSyncMonad (env, cont)-> f = rz func f.properties = rz(L_aconsf)(name)(value)(lz f.properties ? rz(L_nil)) cont f.properties ############ # Diagnostics ############ define 'log', (str)->(res)-> console.log String rz str rz res define 'logStack', (str)->(res)-> console.log new Error(rz str).stack rz res # an identity function you can put a breakpoint on define 'breakpoint', (x)-> console.log 'Break point ', rz x rz x ############ # IO Monads ############ # Make a new function and hide func and binding in properties on it # making them inaccessible to pure Leisure code # so people won't accidentally fire off side effects makeMonad = (guts)-> m = -> throw new Error "ILLEGAL CALL TO MONAD FUNCTION!" m.__proto__ = Monad.prototype m.cmd = guts m.type = 'monad' m makeSyncMonad = (guts)-> m = makeMonad guts m.sync = true m nextMonad = (cont)-> cont replaceErr = (err, msg)-> err.message = msg err defaultEnv.write = (str)-> process.stdout.write(str) defaultEnv.err = (err)-> @write "ENV Error: #{err.stack ? err}" defaultEnv.prompt = ->throw new Error "Environment does not support prompting!" monadModeSync = false getMonadSyncMode = -> monadModeSync withSyncModeDo = (newMode, block)-> oldMode = monadModeSync monadModeSync = newMode try block() catch err console.log "ERR: #{err.stack ? err}" finally #if !monadModeSync && oldMode then console.log "REENABLING SYNC" #monadModeSync = oldMode runMonad = (monad, env, cont)-> env = env ? root.defaultEnv withSyncModeDo true, -> newRunMonad monad, env, cont, [] isMonad = (m)-> typeof m == 'function' && m.cmd? continueMonads = (contStack, env)-> (result)-> withSyncModeDo false, -> newRunMonad result, env, null, contStack asyncMonad = {toString: -> "<asyncMonadResult>"} warnAsync = false setWarnAsync = (state)-> warnAsync = state newRunMonad = (monad, env, cont, contStack)-> #if monad instanceof Monad2 # console.log 'MONAD 2' # return runMonad2 monad, env, cont, contStack if cont then contStack.push cont try while true #monad = L_asIO?()(lz monad) ? monad if monad instanceof Monad2 return runMonad2 monad, env, continueMonads(contStack, env), [] else if isMonad monad if monad.binding do (bnd = monad.binding)-> contStack.push (x)-> rz(bnd) lz x monad = rz monad.monad continue else if !monad.sync monadModeSync = false #console.log "turned off sync" if warnAsync then console.log "async monad" monad.cmd(env, continueMonads(contStack, env)) return asyncMonad result = monad.cmd(env, identity) else monadModeSync = true result = monad if !contStack.length then return result monad = contStack.pop() result catch err err = replaceErr err, "\nERROR RUNNING MONAD, MONAD: #{monad}, ENV: #{env}...\n#{err.message}" console.log err.stack ? err if env.errorHandlers.length then env.errorHandlers.pop() err callBind = (value, contStack)-> func = contStack.pop() val = lz value tmp = L_bind()(val)(lz func) if isMonad(tmp) && (tmp.monad == val || tmp.monad == value) console.log "peeling bind" func value else tmp #if isMonad(tmp) && tmp?.binding? then func value else tmp class Monad toString: -> "Monad: #{@cmd.toString()}" (global ? window).L_runMonads = (monadArray, env)-> #console.log "RUNNING MONADS" monadArray.reverse() newRunMonad 0, (env ? defaultEnv), null, monadArray monadArray #global.L_runMonads = (monadArray, env, cont)-> # nextMonad = (ind)-> # if ind >= monadArray.length then cont?() # else # runMonad2 monadArray[ind], env, -> # setTimeout (->nextMonad ind + 1), 1 # nextMonad 0 # monadArray ensureLeisureClass 'unit' class Leisure_unit extends LeisureObject toString: -> 'unit' _unit = mkProto Leisure_unit, setType ((_x)-> rz(_x)), 'unit' define 'define', (name)->(arity)->(src)->(def)-> #console.log "DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src) cont _unit define 'newDefine', (name)->(arity)->(src)->(def)-> #console.log "NEW DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src), null, null, true cont _unit #runMonads = (monads, i, arg)-> # if i < monads.length # console.log "running monad #{i}" # setTimeout (-> newRunMonad monads[i](arg), defaultEnv, ((x)-> runMonads monads, i + 1, x), []), 1 # #global.L_runMonads = (monadArray)-> # console.log "RUNNING #{monadArray.length} monads, ..." # runMonads monadArray, 0, 0 # monadArray runMonad2 = (monad, env, cont)-> if monad instanceof Monad2 then monad.cmd(env, cont) #else if isMonad monad then newRunMonad monad, env, cont, [] else if isMonad monad if monad.binding? runMonad2 rz(monad.monad), env, (x)-> runMonad2 rz(monad.binding)(lz x), env, cont else monad.cmd(env, cont) else cont monad class Monad2 extends Monad constructor: (@name, @cmd, @cmdToString)-> if typeof @name == 'function' @cmdToString = @cmd @cmd = name @name = null if !@cmdToString then @cmdToString = => (if name then "#{name}: " else '') + @cmd.toString() toString: -> "Monad2: #{@cmdToString()}" #define 'return', (v)-> new Monad2 ((env, cont)-> cont rz v), -> "return #{rz v}" define 'defer', (v)-> new Monad2 ((env, cont)-> setTimeout (->cont rz v), 1), -> "defer #{rz v}" define 'bind2', bind2 = (m)->(binding)-> newM = rz m if (newM instanceof Monad2) || (isMonad newM) new Monad2 'bind', ((env, cont)-> runMonad2 newM, env, (value)-> #runMonad2 rz(L_bind2)(lz value)(binding), env, cont), -> runMonad2 rz(binding)(lz value), env, cont), -> "bind (#{rz m})" else rz(binding) m newbind = false #newbind = true if newbind then define 'bind', bind2 else define 'bind', (m)->(binding)-> if isMonad rz m bindMonad = makeMonad (env, cont)-> bindMonad.monad = m bindMonad.binding = binding bindMonad else rz(binding) m values = {} # # Error handling # define 'protect', (value)-> makeMonad (env, cont)-> hnd = (err)-> console.log "PROTECTED ERROR: #{err.stack ? err}" cont left err.stack ? err env.errorHandlers.push hnd runMonad rz(value), env, ((result)-> #console.log "PROTECT CONTINUING WITH RESULT: #{result}" if env.errorHandlers.length if env.errorHandlers[env.errorHandlers.length - 1] == hnd then env.errorHandlers.pop() else if _.contains(env.errorHandlers, hnd) while env.errorHandlers[env.errorHandlers.length - 1] != hnd env.errorHandlers.pop() cont right result), [] # # ACTORS # # To create an actor: # actor name function # -- function takes one arg, to process messages # -- if function returns a monad, it executes the monad # # To send a message: # send name message # -- send message to the named actor # actors = {} define 'actor', (name)->(func)-> actors[name] = func func.env = values: {} func.env.__proto__ = defaultEnv define 'send', (name)->(msg)-> setTimeout (-> runMonad (rz(actors[name])(msg)), rz(actors[name]).env), 1 define 'hasValue', (name)-> makeSyncMonad (env, cont)-> cont booleanFor values[rz name]? define 'getValueOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(values[rz name] ? rz(defaultValue)) define 'getValue', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of values) then throw new Error "No value named '#{rz name}'" cont values[rz name] # New getValue for when the option monad is integrated with the parser #define 'getValue', (name)-> # makeSyncMonad (env, cont)-> # cont (if !(rz(name) of values) then none else some values[rz name]) define 'setValue', (name)->(value)-> makeSyncMonad (env, cont)-> values[rz name] = rz value cont _unit define 'deleteValue', (name)-> makeSyncMonad (env, cont)-> delete values[rz name] cont _unit setValue = (key, value)-> values[key] = value getValue = (key)-> values[key] define 'envHas', (name)-> makeSyncMonad (env, cont)-> cont booleanFor env.values[rz name]? define 'envGetOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(env.values[rz name] ? rz(defaultValue)) define 'envGet', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of env.values) then throw new Error "No value named '#{rz name}'" cont env.values[rz name] define 'envSet', (name)->(value)-> makeSyncMonad (env, cont)-> env.values[rz name] = rz(value) cont _unit define 'envDelete', (name)-> makeSyncMonad (env, cont)-> delete env.values[rz name] cont _unit setValue 'macros', Nil define 'defMacro', (name)->(def)-> makeSyncMonad (env, cont)-> values.macros = cons cons(rz(name), rz(def)), values.macros cont _unit define 'funcList', makeSyncMonad (env, cont)-> cont consFrom global.leisureFuncNames.toArray().sort() define 'funcs', makeSyncMonad (env, cont)-> console.log "Leisure functions:\n#{_(global.leisureFuncNames.toArray()).sort().join '\n'}" cont _unit define 'funcSrc', (func)-> if typeof rz(func) == 'function' info = functionInfo[rz(func).leisureName] if info?.src then some info.src else none define 'ast2Json', (ast)-> JSON.stringify ast2Json rz ast define 'override', (name)->(newFunc)-> makeSyncMonad (env, cont)-> n = "L_#{nameSub rz name}" oldDef = global[n] if !oldDef then throw new Error("No definition for #{rz name}") global[n] = -> rz(newFunc)(oldDef) cont _unit ####################### # IO ####################### # define 'trace', (msg)-> # makeSyncMonad (env, cont)-> # cont (root.E = new Error(msg)).stack define 'gensym', makeSyncMonad (env, cont)-> cont "G#{gensymCounter++}" define 'print', (msg)-> makeSyncMonad (env, cont)-> env.write env.presentValue rz msg cont _unit define 'print2', (msg)-> new Monad2 'print2', ((env, cont)-> env.write env.presentValue rz msg cont _unit), -> "print2 #{rz msg}" define 'write', (msg)-> new Monad2 'write', ((env, cont)-> env.write String(rz msg) cont _unit), -> "write #{rz msg}" define 'prompt2', (msg)-> new Monad2 ((env, cont)-> env.prompt(String(rz msg), (input)-> cont input)), -> "prompt2 #{rz msg}" define 'oldWrite', (msg)-> makeSyncMonad (env, cont)-> env.write String(rz msg) cont _unit define 'readFile', (name)-> makeMonad (env, cont)-> env.readFile rz(name), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'readDir', (dir)-> makeMonad (env, cont)-> env.readDir rz(dir), (err, files)-> cont (if err then left err.stack ? err else right files) define 'writeFile', (name)->(data)-> makeMonad (env, cont)-> env.writeFile rz(name), rz(data), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'statFile', (file)-> makeMonad (env, cont)-> env.statFile rz(file), (err, stats)-> cont (if err then left err.stack ? err else right stats) define 'prompt', (msg)-> makeMonad (env, cont)-> env.prompt(String(rz msg), (input)-> cont(input)) define 'rand', makeSyncMonad (env, cont)-> cont(Math.random()) define 'js', (str)-> makeSyncMonad (env, cont)-> try result = eval rz str cont right result catch err cont left err define 'delay', (timeout)-> new Monad2 (env, cont)-> setTimeout (-> cont _unit), rz(timeout) define 'currentTime', new Monad2 (env, cont)-> cont Date.now define 'once', makeSyncMonad (-> ran = false (env, cont)-> if !ran console.log "RUNNING" ran = true cont _unit else console.log "ALREADY RAN")() ################## # Function advice ################## # later advice overrides earlier advice define 'advise', (name)->(alt)->(arity)->(def)-> makeMonad (env, cont)-> info = functionInfo[rz name] if !info then info = functionInfo[rz name] = src: '' arity: -1 alts: {} altList: [] if !info.alts[rz alt] then info.altList.push rz alt info.alts[rz alt] = rz def alts = (info.alts[i] for i in info.altList) alts.reverse() newDef = curry rz(arity), (args)-> for alt in alts opt = alt for arg in args opt = opt arg if getType(opt) == 'some' then return opt(lz (x)->rz x)(lz _false) if info.mainDef res = rz info.mainDef for arg in args res = res arg return res throw new Error "No default definition for #{rz name}" nm = "L_#{nameSub rz name}" global[nm] = global.leisureFuncNames[nm] = newDef functionInfo[name].newArity = false cont def curry = (arity, func)-> -> lz (arg)-> lz (subcurry arity, func, null) arg subcurry = (arity, func, args)-> lz (arg)-> #console.log "Got arg # #{arity}: #{rz arg}" args = simpyCons arg, args if arity == 1 then func(args.toArray().reverse()) else subcurry arity - 1, func, args ####################### # Presentation ####################### presentationReplacements = '<': '&lt;' '>': '&gt;' '&': '&amp;' '\n': '\\n' '\\': '\\\\' escapePresentationHtml = (str)-> if typeof str == 'string' then str.replace /[<>&\n\\]/g, (c)-> presentationReplacements[c] else str presentationToHtmlReplacements = '&lt;': '<' '&gt;': '>' '&amp;': '&' '\\n': '\n' '\\\\': '\\' unescapePresentationHtml = (str)-> str.replace /&lt;|&gt;|&amp;|\\n|\\/g, (c)-> presentationToHtmlReplacements[c] define 'escapeHtml', (h)-> escapePresentationHtml rz(h) define 'unescapeHtml', (h)-> unescapePresentationHtml rz(h) ####################### # AMTs ####################### makeHamt = (hamt)-> hamt.leisureType = 'hamt' hamt hamt = makeHamt Map() hamt.leisureDataType = 'hamt' define 'hamt', hamt define 'hamtWith', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtSet', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtFetch', (key)->(hamt)-> rz(hamt).get rz(key) define 'hamtGet', (key)->(hamt)-> v = rz(hamt).get rz(key) if v != undefined then some v else none define 'hamtWithout', (key)->(hamt)-> makeHamt rz(hamt).remove rz(key) #define 'hamtOpts', (eq)->(hash)-> # #define 'hamtAssocOpts', (hamt)->(key)->(value)->(opts)-> amt.assoc(rz(hamt), rz(key), rz(value), rz(opts)) # #define 'hamtFetchOpts', (hamt)->(key)->(opts)-> amt.get(rz(hamt), rz(key), rz(opts)) # #define 'hamtGetOpts', (hamt)->(key)->(opts)-> # v = amt.get(rz(hamt), rz(key), rz(opts)) # if v != null then some v else none # #define 'hamtDissocOpts', (hamt)->(key)->(opts)-> amt.dissoc(rz(hamt), rz(key), rz(opts)) define 'hamtPairs', (hamt)-> nextHamtPair rz(hamt).entries() nextHamtPair = (entries)-> if entries.size == 0 then rz L_nil else f = entries.first() rz(L_acons)(f[0])(f[1])(-> nextHamtPair entries.rest) ################# # YAML and JSON ################# lacons = (k, v, list)-> rz(L_acons)(lz k)(lz v)(lz list) jsonConvert = (obj)-> if obj instanceof Array consFrom (jsonConvert i for i in obj) else if typeof obj == 'object' t = rz L_nil for k, v of obj t = lacons k, jsonConvert(v), t t else obj define 'fromJson', (obj)-> jsonConvert rz obj define 'parseYaml', (obj)-> safeLoad rz obj define 'toJsonArray', (list)-> list = rz list array = [] while !list.isNil() array.push list.head() list = list.tail() array define 'toJsonObject', (list)-> list = rz list obj = {} while !list.isNil() head = list.head() if !obj[head.head()]? then obj[head.head()] = head.tail() list = list.tail() obj define 'jsonToYaml', (json)-> try right dump rz json catch err left err.stack ####################### # Trampolines ####################### define 'trampolineCall', (func)-> ret = rz func while true if typeof ret == 'function' && ret.trampoline then ret = ret() else return ret define 'trampoline', (func)-> f = rz func arity = functionInfo[f.leisureName].arity trampCurry f, arity trampCurry = (func, arity)-> (arg)-> a = rz arg if arity > 1 then trampCurry (func ->a), arity - 1 else result = -> func ->a result.trampoline = true result ####################### # NAME SPACES ####################### define 'setNameSpace', (name)-> makeSyncMonad (env, cont)-> root.currentNameSpace = rz name newNameSpace = false if name newNameSpace = !LeisureNameSpaces[name] if newNameSpace then LeisureNameSpaces[name] = {} nsLog "SETTING NAME SPACE: #{name}" cont (if newNameSpace then _true else _false) define 'pushNameSpace', (newNameSpace)-> makeSyncMonad (env, cont)-> pushed = LeisureNameSpaces[newNameSpace] && ! (newNameSpace in root.nameSpacePath) if pushed then root.nameSpacePath.push newNameSpace cont (if pushed then _true else _false) define 'clearNameSpacePath', makeSyncMonad (env, cont)-> root.nameSpacePath = [] cont _unit define 'resetNameSpaceInfo', makeSyncMonad (enf, cont)-> old = [root.nameSpacePath, root.currentNameSpace] root.nameSpacePath = ['core'] root.currentNameSpace = null nsLog "SETTING NAME SPACE: null" cont old define 'setNameSpaceInfo', (info)-> makeSyncMonad (env, cont)-> #console.log "RESTORING NAME SPACE INFO: #{require('util').inspect rz info}" [root.nameSpacePath, root.currentNameSpace] = rz info nsLog "SETTING NAME SPACE: #{root.currentNameSpace}" cont _unit ####################### # Classes for Printing ####################### ensureLeisureClass 'token' Leisure_token.prototype.toString = -> "Token(#{JSON.stringify(tokenString(@))}, #{posString tokenPos(@)})" tokenString = (t)-> t(lz (txt)->(pos)-> rz txt) tokenPos = (t)-> t(lz (txt)->(pos)-> rz pos) ensureLeisureClass 'filepos' posString = (p)-> if p instanceof Leisure_filepos then p(lz (file)->(line)->(offset)-> "#{rz file}:#{rz line}.#{rz offset}") else p ensureLeisureClass 'parens' Leisure_parens.prototype.toString = -> "Parens(#{posString parensStart @}, #{posString parensEnd @}, #{parensContent @})" parensStart = (p)-> p(lz (s)->(e)->(l)-> rz s) parensEnd = (p)-> p(lz (s)->(e)->(l)-> rz e) parensContent = (p)-> p(lz (s)->(e)->(l)-> rz l) ensureLeisureClass 'true' Leisure_true.prototype.toString = -> "true" ensureLeisureClass 'false' Leisure_false.prototype.toString = -> "false" ensureLeisureClass 'left' Leisure_left.prototype.toString = -> "Left(#{@(lz _identity)(lz _identity)})" ensureLeisureClass 'right' Leisure_right.prototype.toString = -> "Right(#{@(lz _identity)(lz _identity)})" ####################### # LOADING ####################### requireFiles = (req, cont, verbose)-> if req.length if verbose then console.log "REQUIRING FILE: #{req[0]}" contStack = require req.shift() if Array.isArray(contStack) && contStack.length then contStack.unshift -> requireFiles req, cont, verbose else requireFiles req, cont, verbose else cont() ####################### # Func info ####################### define 'funcInfo', (f)-> funcInfo rz f define 'funcName', (f)-> if rz(f).leisureName then some rz(f).leisureName else none define 'trackCreation', (flag)-> makeSyncMonad (env, cont)-> root.trackCreation = rz(flag)(lz true)(lz false) cont _unit define 'trackVars', (flag)-> makeSyncMonad (env, cont)-> root.trackVars = rz(flag)(lz true)(lz false) cont _unit define 'getFunction', (name)-> f = rz global['L_' + (nameSub rz name)] if f then some f else none ####################### # Exports ####################### root.requireFiles = requireFiles root._true = _true root._false = _false root._unit = _unit root.stateValues = values root.runMonad = runMonad root.runMonad2 = runMonad2 root.newRunMonad = newRunMonad root.isMonad = isMonad root.Monad2 = Monad2 root.identity = identity root.setValue = setValue root.getValue = getValue root.makeMonad = makeMonad root.makeSyncMonad = makeSyncMonad root.replaceErr = replaceErr root.left = left root.right = right root.getMonadSyncMode = getMonadSyncMode root.asyncMonad = asyncMonad root.setWarnAsync = setWarnAsync root.call = call root.callMonad = callMonad root.basicCall = basicCall root.booleanFor = booleanFor root.newConsFrom = consFrom root.escapePresentationHtml = escapePresentationHtml root.unescapePresentationHtml = unescapePresentationHtml root.makeHamt = makeHamt root.jsonConvert = jsonConvert if window? window.runMonad = runMonad window.setType = setType window.setDataType = setDataType window.defaultEnv = defaultEnv window.identity = identity
true
### Copyright (C) 2013, PI:NAME:<NAME>END_PI, Tiny Concepts: https://github.com/zot/Leisure (licensed with ZLIB license) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ### { readFile, statFile, readDir, writeFile, defaultEnv, SimpyCons, simpyCons, resolve, lazy, nsLog, funcInfo, } = root = (module ? {}).exports = require '15-base' { define, nakedDefine, cons, Nil, head, tail, getType, getDataType, ast2Json, ensureLeisureClass, LeisureObject, mkProto, setType, setDataType, functionInfo, nameSub, } = require '16-ast' _ = (Leisure.require ? require) 'lodash.min' { Map, } = Immutable ? require '05-immutable' yaml = require 'yaml' { safeLoad, dump, } = Leisure.yaml rz = resolve lz = lazy lc = Leisure_call gensymCounter = 0 call = (args...)-> basicCall(args, defaultEnv, identity) callMonad = (args..., env, cont)-> basicCall(args, env, cont) basicCall = (args, env, cont)-> res = rz global["L_#{args[0]}"] for arg in args[1..] res = do (arg)-> res(lz arg) runMonad res, env, cont consFrom = (array, i)-> i = i || 0 if i < array.length then cons array[i], consFrom(array, i + 1) else rz L_nil ############ # LOGIC ############ identity = (x)-> x _identity = (x)-> rz x _unit = setType ((x)->rz x), 'unit' _true = setType ((a)->(b)->rz a), 'true' _false = setType ((a)->(b)->rz b), 'false' left = (x)-> setType ((lCase)->(rCase)-> rz(lCase)(lz x)), 'left' right = (x)-> setType ((lCase)->(rCase)-> rz(rCase)(lz x)), 'right' some = (x)-> setType ((someCase)->(noneCase)-> rz(someCase)(lz x)), 'some' none = setType ((someCase)->(noneCase)-> rz(noneCase)), 'none' define 'eq', (a)->(b)-> booleanFor rz(a) == rz(b) define '==', (a)->(b)-> booleanFor rz(a) == rz(b) booleanFor = (bool)-> if bool then rz L_true else rz L_false define 'hasType', (data)->(func)-> if typeof rz(func) == 'string' then booleanFor getType(rz(data)) == rz(func) else booleanFor getType(rz data) == getDataType(rz func) define 'getDataType', (func)-> if typeof rz(func) == 'string' then rz(func) else getDataType(rz(func)) define 'assert', (bool)->(msg)-> (expr)-> rz(bool)(expr)(-> throw new Error(rz msg)) define 'assertLog', (bool)->(msg)->(expr)-> rz(bool)(expr)(-> console.log new Error(rz msg).stack console.log "LOGGED ERROR -- RESUMING EXECUTION..." rz expr) define 'trace', (msg)-> console.log "STACKTRACE: ", new Error(rz msg).stack msg define 'jsTrue', (x)-> if rz(x) then _true else _false define 'error', (msg)-> throw new Error rz msg ############ # MATH ############ define '+', (x)->(y)->rz(x) + rz(y) define '-', (x)->(y)->rz(x) - rz(y) define '*', (x)->(y)->rz(x) * rz(y) define '/', (x)->(y)->rz(x) / rz(y) define '%', (x)->(y)->rz(x) % rz(y) define '<', (x)->(y)->booleanFor rz(x) < rz(y) define '<=', (x)->(y)->booleanFor rz(x) <= rz(y) define '>', (x)->(y)->booleanFor rz(x) > rz(y) define '>=', (x)->(y)->booleanFor rz(x) >= rz(y) define 'floor', (x)-> Math.floor(rz x) define 'ceil', (x)-> Math.ceil(rz x) define 'min', (x)->(y)-> Math.min rz(x), rz(y) define 'max', (x)->(y)-> Math.max rz(x), rz(y) define 'round', (x)-> Math.round(rz x) define 'abs', (x)-> Math.abs(rz x) define 'sqrt', (x)-> Math.sqrt(rz x) define 'acos', (x)-> Math.acos(rz x) define 'asin', (x)-> Math.asin(rz x) define 'atan', (x)-> Math.atan(rz x) define 'atan2', (x)->(y)-> Math.atan2(rz(x), rz(y)) define 'cos', (x)-> Math.cos(rz x) #define 'log', (x)-> Math.log(rz x) define 'sin', (x)-> Math.sin(rz x) define 'tan', (x)-> Math.tan(rz x) define 'rand', -> makeSyncMonad (env, cont)-> cont (Math.random()) define 'randInt', (low)->(high)->makeSyncMonad (env, cont)-> cont (Math.floor(rz(low) + Math.random() * rz(high))) define '^', (x)->(y)->Math.pow(rz(x), rz(y)) define 'number', (n)-> Number n ############ # STRINGS ############ define '_show', (data)-> if typeof rz(data) in ['string', 'number', 'boolean'] then JSON.stringify rz data else if getType(rz data) == 'err' then rz(L_errMsg)(data) else String rz data define 'strString', (data)-> String rz data define '_strAsc', (str)-> rz(str).charCodeAt(0) define '_strChr', (i)-> String.fromCharCode(rz i) define '_strAt', (str)->(index)-> rz(str)[strCoord(rz(str), rz(index))] define '_strStartsWith', (str)->(prefix)-> booleanFor rz(str).substring(0, rz(prefix).length) == rz(prefix) define '_strLen', (str)-> rz(str).length define '_strToLowerCase', (str)-> rz(str).toLowerCase() define '_strToUpperCase', (str)-> rz(str).toUpperCase() define '_strReplace', (str)->(pat)->(repl)-> rz(str).replace rz(pat), rz(repl) strCoord = (str, coord)-> if coord < 0 then str.length + coord else coord define '_strSubstring', (str)->(start)->(end)-> a = strCoord(rz(str), rz(start)) b = strCoord(rz(str), rz(end)) if b < a && rz(end) == 0 then b = rz(str).length rz(str).substring a, b define '_strSplit', (str)->(pat)-> consFrom rz(str).split if rz(pat) instanceof RegExp then rz(pat) else new RegExp rz(pat) define '_strCat', (list)-> _.map(rz(list).toArray(), (el)-> if typeof el == 'string' then el else rz(L_show)(lz el)).join('') define '_strAdd', (s1)->(s2)-> rz(s1) + rz(s2) define '_strMatch', (str)->(pat)-> m = rz(str).match (if rz(pat) instanceof RegExp then rz pat else new RegExp rz pat) if m groups = [] pos = 1 while m[pos] groups.push m[pos++] if typeof m.index != 'undefined' then consFrom [m[0], consFrom(groups), m.index, m.input] else consFrom [m[0], consFrom(groups)] else if L_nil then rz L_nil else Nil define '_strToList', (str)-> strToList rz str strToList = (str)-> if str == '' then Nil else cons str[0], strToList str.substring 1 define '_strFromList', (list)-> strFromList rz list strFromList = (list)-> if list instanceof Leisure_nil then '' else head(list) + strFromList(tail list) define '_regexp', (str)-> new RegExp rz str define '_regexpFlags', (str)->(flags)-> new RegExp rz(str), rz(flags) define '_jsonParse', (str)->(failCont)->(successCont)-> try p = JSON.parse rz str rz(successCont) lz p catch err rz(failCont) lz err define 'jsonStringify', (obj)->(failCont)->(successCont)-> try s = JSON.stringify rz obj rz(successCont) lz s catch err rz(failCont) lz err ############ # properties ############ define 'getProperties', (func)-> if rz(func)?.properties then rz(func).properties else rz L_nil define 'setProperty', (func)->(name)->(value)-> makeSyncMonad (env, cont)-> f = rz func f.properties = rz(L_aconsf)(name)(value)(lz f.properties ? rz(L_nil)) cont f.properties ############ # Diagnostics ############ define 'log', (str)->(res)-> console.log String rz str rz res define 'logStack', (str)->(res)-> console.log new Error(rz str).stack rz res # an identity function you can put a breakpoint on define 'breakpoint', (x)-> console.log 'Break point ', rz x rz x ############ # IO Monads ############ # Make a new function and hide func and binding in properties on it # making them inaccessible to pure Leisure code # so people won't accidentally fire off side effects makeMonad = (guts)-> m = -> throw new Error "ILLEGAL CALL TO MONAD FUNCTION!" m.__proto__ = Monad.prototype m.cmd = guts m.type = 'monad' m makeSyncMonad = (guts)-> m = makeMonad guts m.sync = true m nextMonad = (cont)-> cont replaceErr = (err, msg)-> err.message = msg err defaultEnv.write = (str)-> process.stdout.write(str) defaultEnv.err = (err)-> @write "ENV Error: #{err.stack ? err}" defaultEnv.prompt = ->throw new Error "Environment does not support prompting!" monadModeSync = false getMonadSyncMode = -> monadModeSync withSyncModeDo = (newMode, block)-> oldMode = monadModeSync monadModeSync = newMode try block() catch err console.log "ERR: #{err.stack ? err}" finally #if !monadModeSync && oldMode then console.log "REENABLING SYNC" #monadModeSync = oldMode runMonad = (monad, env, cont)-> env = env ? root.defaultEnv withSyncModeDo true, -> newRunMonad monad, env, cont, [] isMonad = (m)-> typeof m == 'function' && m.cmd? continueMonads = (contStack, env)-> (result)-> withSyncModeDo false, -> newRunMonad result, env, null, contStack asyncMonad = {toString: -> "<asyncMonadResult>"} warnAsync = false setWarnAsync = (state)-> warnAsync = state newRunMonad = (monad, env, cont, contStack)-> #if monad instanceof Monad2 # console.log 'MONAD 2' # return runMonad2 monad, env, cont, contStack if cont then contStack.push cont try while true #monad = L_asIO?()(lz monad) ? monad if monad instanceof Monad2 return runMonad2 monad, env, continueMonads(contStack, env), [] else if isMonad monad if monad.binding do (bnd = monad.binding)-> contStack.push (x)-> rz(bnd) lz x monad = rz monad.monad continue else if !monad.sync monadModeSync = false #console.log "turned off sync" if warnAsync then console.log "async monad" monad.cmd(env, continueMonads(contStack, env)) return asyncMonad result = monad.cmd(env, identity) else monadModeSync = true result = monad if !contStack.length then return result monad = contStack.pop() result catch err err = replaceErr err, "\nERROR RUNNING MONAD, MONAD: #{monad}, ENV: #{env}...\n#{err.message}" console.log err.stack ? err if env.errorHandlers.length then env.errorHandlers.pop() err callBind = (value, contStack)-> func = contStack.pop() val = lz value tmp = L_bind()(val)(lz func) if isMonad(tmp) && (tmp.monad == val || tmp.monad == value) console.log "peeling bind" func value else tmp #if isMonad(tmp) && tmp?.binding? then func value else tmp class Monad toString: -> "Monad: #{@cmd.toString()}" (global ? window).L_runMonads = (monadArray, env)-> #console.log "RUNNING MONADS" monadArray.reverse() newRunMonad 0, (env ? defaultEnv), null, monadArray monadArray #global.L_runMonads = (monadArray, env, cont)-> # nextMonad = (ind)-> # if ind >= monadArray.length then cont?() # else # runMonad2 monadArray[ind], env, -> # setTimeout (->nextMonad ind + 1), 1 # nextMonad 0 # monadArray ensureLeisureClass 'unit' class Leisure_unit extends LeisureObject toString: -> 'unit' _unit = mkProto Leisure_unit, setType ((_x)-> rz(_x)), 'unit' define 'define', (name)->(arity)->(src)->(def)-> #console.log "DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src) cont _unit define 'newDefine', (name)->(arity)->(src)->(def)-> #console.log "NEW DEFINE: #{name}" makeSyncMonad (env, cont)-> nakedDefine rz(name), def, rz(arity), rz(src), null, null, true cont _unit #runMonads = (monads, i, arg)-> # if i < monads.length # console.log "running monad #{i}" # setTimeout (-> newRunMonad monads[i](arg), defaultEnv, ((x)-> runMonads monads, i + 1, x), []), 1 # #global.L_runMonads = (monadArray)-> # console.log "RUNNING #{monadArray.length} monads, ..." # runMonads monadArray, 0, 0 # monadArray runMonad2 = (monad, env, cont)-> if monad instanceof Monad2 then monad.cmd(env, cont) #else if isMonad monad then newRunMonad monad, env, cont, [] else if isMonad monad if monad.binding? runMonad2 rz(monad.monad), env, (x)-> runMonad2 rz(monad.binding)(lz x), env, cont else monad.cmd(env, cont) else cont monad class Monad2 extends Monad constructor: (@name, @cmd, @cmdToString)-> if typeof @name == 'function' @cmdToString = @cmd @cmd = name @name = null if !@cmdToString then @cmdToString = => (if name then "#{name}: " else '') + @cmd.toString() toString: -> "Monad2: #{@cmdToString()}" #define 'return', (v)-> new Monad2 ((env, cont)-> cont rz v), -> "return #{rz v}" define 'defer', (v)-> new Monad2 ((env, cont)-> setTimeout (->cont rz v), 1), -> "defer #{rz v}" define 'bind2', bind2 = (m)->(binding)-> newM = rz m if (newM instanceof Monad2) || (isMonad newM) new Monad2 'bind', ((env, cont)-> runMonad2 newM, env, (value)-> #runMonad2 rz(L_bind2)(lz value)(binding), env, cont), -> runMonad2 rz(binding)(lz value), env, cont), -> "bind (#{rz m})" else rz(binding) m newbind = false #newbind = true if newbind then define 'bind', bind2 else define 'bind', (m)->(binding)-> if isMonad rz m bindMonad = makeMonad (env, cont)-> bindMonad.monad = m bindMonad.binding = binding bindMonad else rz(binding) m values = {} # # Error handling # define 'protect', (value)-> makeMonad (env, cont)-> hnd = (err)-> console.log "PROTECTED ERROR: #{err.stack ? err}" cont left err.stack ? err env.errorHandlers.push hnd runMonad rz(value), env, ((result)-> #console.log "PROTECT CONTINUING WITH RESULT: #{result}" if env.errorHandlers.length if env.errorHandlers[env.errorHandlers.length - 1] == hnd then env.errorHandlers.pop() else if _.contains(env.errorHandlers, hnd) while env.errorHandlers[env.errorHandlers.length - 1] != hnd env.errorHandlers.pop() cont right result), [] # # ACTORS # # To create an actor: # actor name function # -- function takes one arg, to process messages # -- if function returns a monad, it executes the monad # # To send a message: # send name message # -- send message to the named actor # actors = {} define 'actor', (name)->(func)-> actors[name] = func func.env = values: {} func.env.__proto__ = defaultEnv define 'send', (name)->(msg)-> setTimeout (-> runMonad (rz(actors[name])(msg)), rz(actors[name]).env), 1 define 'hasValue', (name)-> makeSyncMonad (env, cont)-> cont booleanFor values[rz name]? define 'getValueOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(values[rz name] ? rz(defaultValue)) define 'getValue', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of values) then throw new Error "No value named '#{rz name}'" cont values[rz name] # New getValue for when the option monad is integrated with the parser #define 'getValue', (name)-> # makeSyncMonad (env, cont)-> # cont (if !(rz(name) of values) then none else some values[rz name]) define 'setValue', (name)->(value)-> makeSyncMonad (env, cont)-> values[rz name] = rz value cont _unit define 'deleteValue', (name)-> makeSyncMonad (env, cont)-> delete values[rz name] cont _unit setValue = (key, value)-> values[key] = value getValue = (key)-> values[key] define 'envHas', (name)-> makeSyncMonad (env, cont)-> cont booleanFor env.values[rz name]? define 'envGetOr', (name)->(defaultValue)-> makeSyncMonad (env, cont)-> cont(env.values[rz name] ? rz(defaultValue)) define 'envGet', (name)-> makeSyncMonad (env, cont)-> if !(rz(name) of env.values) then throw new Error "No value named '#{rz name}'" cont env.values[rz name] define 'envSet', (name)->(value)-> makeSyncMonad (env, cont)-> env.values[rz name] = rz(value) cont _unit define 'envDelete', (name)-> makeSyncMonad (env, cont)-> delete env.values[rz name] cont _unit setValue 'macros', Nil define 'defMacro', (name)->(def)-> makeSyncMonad (env, cont)-> values.macros = cons cons(rz(name), rz(def)), values.macros cont _unit define 'funcList', makeSyncMonad (env, cont)-> cont consFrom global.leisureFuncNames.toArray().sort() define 'funcs', makeSyncMonad (env, cont)-> console.log "Leisure functions:\n#{_(global.leisureFuncNames.toArray()).sort().join '\n'}" cont _unit define 'funcSrc', (func)-> if typeof rz(func) == 'function' info = functionInfo[rz(func).leisureName] if info?.src then some info.src else none define 'ast2Json', (ast)-> JSON.stringify ast2Json rz ast define 'override', (name)->(newFunc)-> makeSyncMonad (env, cont)-> n = "L_#{nameSub rz name}" oldDef = global[n] if !oldDef then throw new Error("No definition for #{rz name}") global[n] = -> rz(newFunc)(oldDef) cont _unit ####################### # IO ####################### # define 'trace', (msg)-> # makeSyncMonad (env, cont)-> # cont (root.E = new Error(msg)).stack define 'gensym', makeSyncMonad (env, cont)-> cont "G#{gensymCounter++}" define 'print', (msg)-> makeSyncMonad (env, cont)-> env.write env.presentValue rz msg cont _unit define 'print2', (msg)-> new Monad2 'print2', ((env, cont)-> env.write env.presentValue rz msg cont _unit), -> "print2 #{rz msg}" define 'write', (msg)-> new Monad2 'write', ((env, cont)-> env.write String(rz msg) cont _unit), -> "write #{rz msg}" define 'prompt2', (msg)-> new Monad2 ((env, cont)-> env.prompt(String(rz msg), (input)-> cont input)), -> "prompt2 #{rz msg}" define 'oldWrite', (msg)-> makeSyncMonad (env, cont)-> env.write String(rz msg) cont _unit define 'readFile', (name)-> makeMonad (env, cont)-> env.readFile rz(name), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'readDir', (dir)-> makeMonad (env, cont)-> env.readDir rz(dir), (err, files)-> cont (if err then left err.stack ? err else right files) define 'writeFile', (name)->(data)-> makeMonad (env, cont)-> env.writeFile rz(name), rz(data), (err, contents)-> cont (if err then left err.stack ? err else right contents) define 'statFile', (file)-> makeMonad (env, cont)-> env.statFile rz(file), (err, stats)-> cont (if err then left err.stack ? err else right stats) define 'prompt', (msg)-> makeMonad (env, cont)-> env.prompt(String(rz msg), (input)-> cont(input)) define 'rand', makeSyncMonad (env, cont)-> cont(Math.random()) define 'js', (str)-> makeSyncMonad (env, cont)-> try result = eval rz str cont right result catch err cont left err define 'delay', (timeout)-> new Monad2 (env, cont)-> setTimeout (-> cont _unit), rz(timeout) define 'currentTime', new Monad2 (env, cont)-> cont Date.now define 'once', makeSyncMonad (-> ran = false (env, cont)-> if !ran console.log "RUNNING" ran = true cont _unit else console.log "ALREADY RAN")() ################## # Function advice ################## # later advice overrides earlier advice define 'advise', (name)->(alt)->(arity)->(def)-> makeMonad (env, cont)-> info = functionInfo[rz name] if !info then info = functionInfo[rz name] = src: '' arity: -1 alts: {} altList: [] if !info.alts[rz alt] then info.altList.push rz alt info.alts[rz alt] = rz def alts = (info.alts[i] for i in info.altList) alts.reverse() newDef = curry rz(arity), (args)-> for alt in alts opt = alt for arg in args opt = opt arg if getType(opt) == 'some' then return opt(lz (x)->rz x)(lz _false) if info.mainDef res = rz info.mainDef for arg in args res = res arg return res throw new Error "No default definition for #{rz name}" nm = "L_#{nameSub rz name}" global[nm] = global.leisureFuncNames[nm] = newDef functionInfo[name].newArity = false cont def curry = (arity, func)-> -> lz (arg)-> lz (subcurry arity, func, null) arg subcurry = (arity, func, args)-> lz (arg)-> #console.log "Got arg # #{arity}: #{rz arg}" args = simpyCons arg, args if arity == 1 then func(args.toArray().reverse()) else subcurry arity - 1, func, args ####################### # Presentation ####################### presentationReplacements = '<': '&lt;' '>': '&gt;' '&': '&amp;' '\n': '\\n' '\\': '\\\\' escapePresentationHtml = (str)-> if typeof str == 'string' then str.replace /[<>&\n\\]/g, (c)-> presentationReplacements[c] else str presentationToHtmlReplacements = '&lt;': '<' '&gt;': '>' '&amp;': '&' '\\n': '\n' '\\\\': '\\' unescapePresentationHtml = (str)-> str.replace /&lt;|&gt;|&amp;|\\n|\\/g, (c)-> presentationToHtmlReplacements[c] define 'escapeHtml', (h)-> escapePresentationHtml rz(h) define 'unescapeHtml', (h)-> unescapePresentationHtml rz(h) ####################### # AMTs ####################### makeHamt = (hamt)-> hamt.leisureType = 'hamt' hamt hamt = makeHamt Map() hamt.leisureDataType = 'hamt' define 'hamt', hamt define 'hamtWith', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtSet', (key)->(value)->(hamt)-> makeHamt rz(hamt).set rz(key), rz(value) define 'hamtFetch', (key)->(hamt)-> rz(hamt).get rz(key) define 'hamtGet', (key)->(hamt)-> v = rz(hamt).get rz(key) if v != undefined then some v else none define 'hamtWithout', (key)->(hamt)-> makeHamt rz(hamt).remove rz(key) #define 'hamtOpts', (eq)->(hash)-> # #define 'hamtAssocOpts', (hamt)->(key)->(value)->(opts)-> amt.assoc(rz(hamt), rz(key), rz(value), rz(opts)) # #define 'hamtFetchOpts', (hamt)->(key)->(opts)-> amt.get(rz(hamt), rz(key), rz(opts)) # #define 'hamtGetOpts', (hamt)->(key)->(opts)-> # v = amt.get(rz(hamt), rz(key), rz(opts)) # if v != null then some v else none # #define 'hamtDissocOpts', (hamt)->(key)->(opts)-> amt.dissoc(rz(hamt), rz(key), rz(opts)) define 'hamtPairs', (hamt)-> nextHamtPair rz(hamt).entries() nextHamtPair = (entries)-> if entries.size == 0 then rz L_nil else f = entries.first() rz(L_acons)(f[0])(f[1])(-> nextHamtPair entries.rest) ################# # YAML and JSON ################# lacons = (k, v, list)-> rz(L_acons)(lz k)(lz v)(lz list) jsonConvert = (obj)-> if obj instanceof Array consFrom (jsonConvert i for i in obj) else if typeof obj == 'object' t = rz L_nil for k, v of obj t = lacons k, jsonConvert(v), t t else obj define 'fromJson', (obj)-> jsonConvert rz obj define 'parseYaml', (obj)-> safeLoad rz obj define 'toJsonArray', (list)-> list = rz list array = [] while !list.isNil() array.push list.head() list = list.tail() array define 'toJsonObject', (list)-> list = rz list obj = {} while !list.isNil() head = list.head() if !obj[head.head()]? then obj[head.head()] = head.tail() list = list.tail() obj define 'jsonToYaml', (json)-> try right dump rz json catch err left err.stack ####################### # Trampolines ####################### define 'trampolineCall', (func)-> ret = rz func while true if typeof ret == 'function' && ret.trampoline then ret = ret() else return ret define 'trampoline', (func)-> f = rz func arity = functionInfo[f.leisureName].arity trampCurry f, arity trampCurry = (func, arity)-> (arg)-> a = rz arg if arity > 1 then trampCurry (func ->a), arity - 1 else result = -> func ->a result.trampoline = true result ####################### # NAME SPACES ####################### define 'setNameSpace', (name)-> makeSyncMonad (env, cont)-> root.currentNameSpace = rz name newNameSpace = false if name newNameSpace = !LeisureNameSpaces[name] if newNameSpace then LeisureNameSpaces[name] = {} nsLog "SETTING NAME SPACE: #{name}" cont (if newNameSpace then _true else _false) define 'pushNameSpace', (newNameSpace)-> makeSyncMonad (env, cont)-> pushed = LeisureNameSpaces[newNameSpace] && ! (newNameSpace in root.nameSpacePath) if pushed then root.nameSpacePath.push newNameSpace cont (if pushed then _true else _false) define 'clearNameSpacePath', makeSyncMonad (env, cont)-> root.nameSpacePath = [] cont _unit define 'resetNameSpaceInfo', makeSyncMonad (enf, cont)-> old = [root.nameSpacePath, root.currentNameSpace] root.nameSpacePath = ['core'] root.currentNameSpace = null nsLog "SETTING NAME SPACE: null" cont old define 'setNameSpaceInfo', (info)-> makeSyncMonad (env, cont)-> #console.log "RESTORING NAME SPACE INFO: #{require('util').inspect rz info}" [root.nameSpacePath, root.currentNameSpace] = rz info nsLog "SETTING NAME SPACE: #{root.currentNameSpace}" cont _unit ####################### # Classes for Printing ####################### ensureLeisureClass 'token' Leisure_token.prototype.toString = -> "Token(#{JSON.stringify(tokenString(@))}, #{posString tokenPos(@)})" tokenString = (t)-> t(lz (txt)->(pos)-> rz txt) tokenPos = (t)-> t(lz (txt)->(pos)-> rz pos) ensureLeisureClass 'filepos' posString = (p)-> if p instanceof Leisure_filepos then p(lz (file)->(line)->(offset)-> "#{rz file}:#{rz line}.#{rz offset}") else p ensureLeisureClass 'parens' Leisure_parens.prototype.toString = -> "Parens(#{posString parensStart @}, #{posString parensEnd @}, #{parensContent @})" parensStart = (p)-> p(lz (s)->(e)->(l)-> rz s) parensEnd = (p)-> p(lz (s)->(e)->(l)-> rz e) parensContent = (p)-> p(lz (s)->(e)->(l)-> rz l) ensureLeisureClass 'true' Leisure_true.prototype.toString = -> "true" ensureLeisureClass 'false' Leisure_false.prototype.toString = -> "false" ensureLeisureClass 'left' Leisure_left.prototype.toString = -> "Left(#{@(lz _identity)(lz _identity)})" ensureLeisureClass 'right' Leisure_right.prototype.toString = -> "Right(#{@(lz _identity)(lz _identity)})" ####################### # LOADING ####################### requireFiles = (req, cont, verbose)-> if req.length if verbose then console.log "REQUIRING FILE: #{req[0]}" contStack = require req.shift() if Array.isArray(contStack) && contStack.length then contStack.unshift -> requireFiles req, cont, verbose else requireFiles req, cont, verbose else cont() ####################### # Func info ####################### define 'funcInfo', (f)-> funcInfo rz f define 'funcName', (f)-> if rz(f).leisureName then some rz(f).leisureName else none define 'trackCreation', (flag)-> makeSyncMonad (env, cont)-> root.trackCreation = rz(flag)(lz true)(lz false) cont _unit define 'trackVars', (flag)-> makeSyncMonad (env, cont)-> root.trackVars = rz(flag)(lz true)(lz false) cont _unit define 'getFunction', (name)-> f = rz global['L_' + (nameSub rz name)] if f then some f else none ####################### # Exports ####################### root.requireFiles = requireFiles root._true = _true root._false = _false root._unit = _unit root.stateValues = values root.runMonad = runMonad root.runMonad2 = runMonad2 root.newRunMonad = newRunMonad root.isMonad = isMonad root.Monad2 = Monad2 root.identity = identity root.setValue = setValue root.getValue = getValue root.makeMonad = makeMonad root.makeSyncMonad = makeSyncMonad root.replaceErr = replaceErr root.left = left root.right = right root.getMonadSyncMode = getMonadSyncMode root.asyncMonad = asyncMonad root.setWarnAsync = setWarnAsync root.call = call root.callMonad = callMonad root.basicCall = basicCall root.booleanFor = booleanFor root.newConsFrom = consFrom root.escapePresentationHtml = escapePresentationHtml root.unescapePresentationHtml = unescapePresentationHtml root.makeHamt = makeHamt root.jsonConvert = jsonConvert if window? window.runMonad = runMonad window.setType = setType window.setDataType = setDataType window.defaultEnv = defaultEnv window.identity = identity
[ { "context": "e: 'string'\n\n product = new @Product({name: 'apple'})\n expect(product.update({select: 'name'}))", "end": 3512, "score": 0.7404853105545044, "start": 3507, "tag": "NAME", "value": "apple" }, { "context": ".get('/api/products')\n .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum\n\n ", "end": 5584, "score": 0.5533093810081482, "start": 5581, "tag": "NAME", "value": "app" }, { "context": "ype: 'just-in-time'})\n .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum\n\n exp", "end": 6335, "score": 0.8153996467590332, "start": 6329, "tag": "NAME", "value": "apples" }, { "context": "alid enum\n\n expect(@Product.save({}, {name: 'apples', type: 'just-in-time'})).to.be.rejectedWith 'Res", "end": 6421, "score": 0.7816430330276489, "start": 6415, "tag": "NAME", "value": "apples" }, { "context": "serverUrl)\n .post('/api/products', {name: 'apples', type: 'just-in-time'})\n .reply(201, {nam", "end": 7070, "score": 0.8118352890014648, "start": 7064, "tag": "NAME", "value": "apples" }, { "context": "ype: 'just-in-time'})\n .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum\n\n pro", "end": 7130, "score": 0.7755659222602844, "start": 7124, "tag": "NAME", "value": "apples" }, { "context": "nvalid enum\n\n product = new @Product({name: 'apples', type: 'just-in-time'})\n expect(product.sav", "end": 7214, "score": 0.8787842988967896, "start": 7208, "tag": "NAME", "value": "apples" } ]
test/validation.test.coffee
goodeggs/resource-client
1
chai = require 'chai' chai.use require 'chai-as-promised' expect = chai.expect nock = require 'nock' request = require 'request' resourceClient = require '..' Promise = require 'bluebird' serverUrl = 'http://resource-client.com' describe 'resource-client validation', -> describe 'validating urlParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'get', method: 'GET' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.get({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'get\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.update({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' product = new @Product({_id: '123abc'}) expect(product.update()).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' describe 'validating queryParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({isActive: true})).to.be.rejectedWith 'Query validation failed for action \'query\': Missing required property: foodhubSlug' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' expect(@Product.update({select: 'name'}, {name: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' product = new @Product({name: 'apple'}) expect(product.update({select: 'name'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' describe 'validating requestBodySchema', -> it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] expect(@Product.save({}, {type: 'just-in-time'})).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] product = new @Product({type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' describe 'validating responseBodySchema', -> it 'validates for GET class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true responseBodySchema: type: 'array' items: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .get('/api/products') .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum expect(@Product.query()).to.be.rejectedWith 'Response body validation failed for action \'query\': Invalid type: object (expected array)' it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: 'apples', type: 'just-in-time'}) .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum expect(@Product.save({}, {name: 'apples', type: 'just-in-time'})).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: 'apples', type: 'just-in-time'}) .reply(201, {name: 'apples', type: 'consignment'}) # invalid enum product = new @Product({name: 'apples', type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' describe 'banUnknownProperties', -> it 'does banUnknownProperties for all actions if true on resource config', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" banUnknownProperties: true @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'query\': Unknown property (not in schema) at /search' it 'does not banUnknownProperties if not configured', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' api = nock(serverUrl) .get('/api/products?foodhubSlug=sfbay&isActive=true&search=apple') .reply(201, {name: 'apples', type: 'consignment'}) expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.fulfilled
180688
chai = require 'chai' chai.use require 'chai-as-promised' expect = chai.expect nock = require 'nock' request = require 'request' resourceClient = require '..' Promise = require 'bluebird' serverUrl = 'http://resource-client.com' describe 'resource-client validation', -> describe 'validating urlParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'get', method: 'GET' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.get({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'get\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.update({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' product = new @Product({_id: '123abc'}) expect(product.update()).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' describe 'validating queryParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({isActive: true})).to.be.rejectedWith 'Query validation failed for action \'query\': Missing required property: foodhubSlug' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' expect(@Product.update({select: 'name'}, {name: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' product = new @Product({name: '<NAME>'}) expect(product.update({select: 'name'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' describe 'validating requestBodySchema', -> it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] expect(@Product.save({}, {type: 'just-in-time'})).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] product = new @Product({type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' describe 'validating responseBodySchema', -> it 'validates for GET class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true responseBodySchema: type: 'array' items: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .get('/api/products') .reply(201, {name: '<NAME>les', type: 'consignment'}) # invalid enum expect(@Product.query()).to.be.rejectedWith 'Response body validation failed for action \'query\': Invalid type: object (expected array)' it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: 'apples', type: 'just-in-time'}) .reply(201, {name: '<NAME>', type: 'consignment'}) # invalid enum expect(@Product.save({}, {name: '<NAME>', type: 'just-in-time'})).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: '<NAME>', type: 'just-in-time'}) .reply(201, {name: '<NAME>', type: 'consignment'}) # invalid enum product = new @Product({name: '<NAME>', type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' describe 'banUnknownProperties', -> it 'does banUnknownProperties for all actions if true on resource config', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" banUnknownProperties: true @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'query\': Unknown property (not in schema) at /search' it 'does not banUnknownProperties if not configured', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' api = nock(serverUrl) .get('/api/products?foodhubSlug=sfbay&isActive=true&search=apple') .reply(201, {name: 'apples', type: 'consignment'}) expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.fulfilled
true
chai = require 'chai' chai.use require 'chai-as-promised' expect = chai.expect nock = require 'nock' request = require 'request' resourceClient = require '..' Promise = require 'bluebird' serverUrl = 'http://resource-client.com' describe 'resource-client validation', -> describe 'validating urlParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'get', method: 'GET' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.get({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'get\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' expect(@Product.update({_id: '123abc'})).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' params: _id: '@_id' urlParamsSchema: type: 'object' required: ['_id'] properties: _id: type: 'string' format: 'objectid' product = new @Product({_id: '123abc'}) expect(product.update()).to.be.rejectedWith 'Url params validation failed for action \'update\': Format validation failed (objectid expected) at /_id' describe 'validating queryParamsSchema', -> it 'validates for GET', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({isActive: true})).to.be.rejectedWith 'Query validation failed for action \'query\': Missing required property: foodhubSlug' it 'validates for POST/PUT/DELETE class method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' expect(@Product.update({select: 'name'}, {name: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' it 'validates for POST/PUT/DELETE instance method', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'update', method: 'PUT' queryParamsSchema: type: 'object' required: ['$select'] properties: $select: type: 'string' product = new @Product({name: 'PI:NAME:<NAME>END_PI'}) expect(product.update({select: 'name'})).to.be.rejectedWith 'Query validation failed for action \'update\': Missing required property: $select' describe 'validating requestBodySchema', -> it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] expect(@Product.save({}, {type: 'just-in-time'})).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' requestBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale', 'consignment'] product = new @Product({type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Request body validation failed for action \'save\': Missing required property: name' describe 'validating responseBodySchema', -> it 'validates for GET class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true responseBodySchema: type: 'array' items: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .get('/api/products') .reply(201, {name: 'PI:NAME:<NAME>END_PIles', type: 'consignment'}) # invalid enum expect(@Product.query()).to.be.rejectedWith 'Response body validation failed for action \'query\': Invalid type: object (expected array)' it 'validates for PUT/POST/DELETE class methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: 'apples', type: 'just-in-time'}) .reply(201, {name: 'PI:NAME:<NAME>END_PI', type: 'consignment'}) # invalid enum expect(@Product.save({}, {name: 'PI:NAME:<NAME>END_PI', type: 'just-in-time'})).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' it 'validates for PUT/POST/DELETE instance methods', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'save', method: 'POST' responseBodySchema: type: 'object' required: ['name'] properties: name: type: 'string' type: type: 'string' enum: ['just-in-time', 'wholesale'] api = nock(serverUrl) .post('/api/products', {name: 'PI:NAME:<NAME>END_PI', type: 'just-in-time'}) .reply(201, {name: 'PI:NAME:<NAME>END_PI', type: 'consignment'}) # invalid enum product = new @Product({name: 'PI:NAME:<NAME>END_PI', type: 'just-in-time'}) expect(product.save()).to.be.rejectedWith 'Response body validation failed for action \'save\': No enum match for: "consignment" at /type' describe 'banUnknownProperties', -> it 'does banUnknownProperties for all actions if true on resource config', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" banUnknownProperties: true @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.rejectedWith 'Query validation failed for action \'query\': Unknown property (not in schema) at /search' it 'does not banUnknownProperties if not configured', -> @Product = resourceClient url: "#{serverUrl}/api/products/:_id" @Product.action 'query', method: 'GET' isArray: true queryParamsSchema: type: 'object' required: ['foodhubSlug'] properties: foodhubSlug: type: 'string' isActive: type: 'boolean' api = nock(serverUrl) .get('/api/products?foodhubSlug=sfbay&isActive=true&search=apple') .reply(201, {name: 'apples', type: 'consignment'}) expect(@Product.query({foodhubSlug: 'sfbay', isActive: true, search: 'apple'})).to.be.fulfilled
[ { "context": "###\n @author (at)taikiken / http://inazumatv.com\n Copyright (c) 2", "end": 17, "score": 0.9131895899772644, "start": 15, "tag": "USERNAME", "value": "at" }, { "context": "###\n @author (at)taikiken / http://inazumatv.com\n Copyright (c) 2011-2015 ", "end": 26, "score": 0.8144872784614563, "start": 18, "tag": "NAME", "value": "taikiken" } ]
tasks/babels.coffee
taikiken/kizami.js
0
### @author (at)taikiken / http://inazumatv.com Copyright (c) 2011-2015 inazumatv.com Licensed under the Apache License, Version 2.0 (the "License"); https://www.apache.org/licenses/LICENSE-2.0 ### ### Babels + Webpack ### setting = require '../setting' # gulp / module gulp = setting.gulp # load-plugins $ = setting.$ # node module $$ = setting.$$ # run-sequence runSequence = $$.runSequence # webpack webpack = $$.webpack wpk = setting.wpk # prefix #AUTO_PREFIX_BROWSERS = setting.AUTO_PREFIX_BROWSERS # replace patterns patterns = setting.patterns # directory dir = setting.dir babels = dir.babels # -------------------------------------------- # task # -------------------------------------------- files = [ babels.src + '/**/*.{js,jsx}' '!' + babels.src + '/**/_*.{js,jsx}' ] # DEVELOP # eslint gulp.task 'babels:eslint', -> return gulp.src files .pipe $.eslint useEslintrc: true .pipe $.eslint.format() .pipe $.eslint.failAfterError() # babel 2015 gulp.task 'babels:babel', -> return gulp.src files .pipe $.babel presets: [ 'es2015', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel ***' # babel 2016 gulp.task 'babels:babel:2016', -> return gulp.src files .pipe $.babel presets: [ 'es2016', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel:2016 ***' # BUILD # -------------------------------------------- # task / webpack # -------------------------------------------- # DEVELOP gulp.task 'babels:webpack:dev', ( cb ) -> conf = Object.create wpk conf.plugins = [ new webpack.optimize.DedupePlugin() ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return # -------------------------------------------- ### DEVELOP SEQUENCE ### gulp.task 'babels:dev', (cb) -> runSequence( 'babels:eslint' 'babels:babel' 'babels:webpack:dev' cb ) return # BUILD gulp.task 'babels:webpack:build', (cb) -> conf = Object.create wpk ugly = compress: warnings: true # output: # comments: false conf.plugins = [ new webpack.optimize.DedupePlugin() new webpack.optimize.UglifyJsPlugin ugly ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs conf.output.filename = 'moku.min.js'; # $.util.log 'ugly', ugly webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return ### BUILD SEQUENCE ### gulp.task 'babels:build', ['babels:dev'], (cb) -> runSequence( 'babels:babel' 'babels:webpack:build' cb ) return
213798
### @author (at)<NAME> / http://inazumatv.com Copyright (c) 2011-2015 inazumatv.com Licensed under the Apache License, Version 2.0 (the "License"); https://www.apache.org/licenses/LICENSE-2.0 ### ### Babels + Webpack ### setting = require '../setting' # gulp / module gulp = setting.gulp # load-plugins $ = setting.$ # node module $$ = setting.$$ # run-sequence runSequence = $$.runSequence # webpack webpack = $$.webpack wpk = setting.wpk # prefix #AUTO_PREFIX_BROWSERS = setting.AUTO_PREFIX_BROWSERS # replace patterns patterns = setting.patterns # directory dir = setting.dir babels = dir.babels # -------------------------------------------- # task # -------------------------------------------- files = [ babels.src + '/**/*.{js,jsx}' '!' + babels.src + '/**/_*.{js,jsx}' ] # DEVELOP # eslint gulp.task 'babels:eslint', -> return gulp.src files .pipe $.eslint useEslintrc: true .pipe $.eslint.format() .pipe $.eslint.failAfterError() # babel 2015 gulp.task 'babels:babel', -> return gulp.src files .pipe $.babel presets: [ 'es2015', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel ***' # babel 2016 gulp.task 'babels:babel:2016', -> return gulp.src files .pipe $.babel presets: [ 'es2016', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel:2016 ***' # BUILD # -------------------------------------------- # task / webpack # -------------------------------------------- # DEVELOP gulp.task 'babels:webpack:dev', ( cb ) -> conf = Object.create wpk conf.plugins = [ new webpack.optimize.DedupePlugin() ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return # -------------------------------------------- ### DEVELOP SEQUENCE ### gulp.task 'babels:dev', (cb) -> runSequence( 'babels:eslint' 'babels:babel' 'babels:webpack:dev' cb ) return # BUILD gulp.task 'babels:webpack:build', (cb) -> conf = Object.create wpk ugly = compress: warnings: true # output: # comments: false conf.plugins = [ new webpack.optimize.DedupePlugin() new webpack.optimize.UglifyJsPlugin ugly ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs conf.output.filename = 'moku.min.js'; # $.util.log 'ugly', ugly webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return ### BUILD SEQUENCE ### gulp.task 'babels:build', ['babels:dev'], (cb) -> runSequence( 'babels:babel' 'babels:webpack:build' cb ) return
true
### @author (at)PI:NAME:<NAME>END_PI / http://inazumatv.com Copyright (c) 2011-2015 inazumatv.com Licensed under the Apache License, Version 2.0 (the "License"); https://www.apache.org/licenses/LICENSE-2.0 ### ### Babels + Webpack ### setting = require '../setting' # gulp / module gulp = setting.gulp # load-plugins $ = setting.$ # node module $$ = setting.$$ # run-sequence runSequence = $$.runSequence # webpack webpack = $$.webpack wpk = setting.wpk # prefix #AUTO_PREFIX_BROWSERS = setting.AUTO_PREFIX_BROWSERS # replace patterns patterns = setting.patterns # directory dir = setting.dir babels = dir.babels # -------------------------------------------- # task # -------------------------------------------- files = [ babels.src + '/**/*.{js,jsx}' '!' + babels.src + '/**/_*.{js,jsx}' ] # DEVELOP # eslint gulp.task 'babels:eslint', -> return gulp.src files .pipe $.eslint useEslintrc: true .pipe $.eslint.format() .pipe $.eslint.failAfterError() # babel 2015 gulp.task 'babels:babel', -> return gulp.src files .pipe $.babel presets: [ 'es2015', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel ***' # babel 2016 gulp.task 'babels:babel:2016', -> return gulp.src files .pipe $.babel presets: [ 'es2016', 'react', 'stage-0' ], plugins: ['transform-runtime'] .pipe $.replaceTask patterns: patterns .pipe gulp.dest babels.compile .pipe $.size title: '*** babels:babel:2016 ***' # BUILD # -------------------------------------------- # task / webpack # -------------------------------------------- # DEVELOP gulp.task 'babels:webpack:dev', ( cb ) -> conf = Object.create wpk conf.plugins = [ new webpack.optimize.DedupePlugin() ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return # -------------------------------------------- ### DEVELOP SEQUENCE ### gulp.task 'babels:dev', (cb) -> runSequence( 'babels:eslint' 'babels:babel' 'babels:webpack:dev' cb ) return # BUILD gulp.task 'babels:webpack:build', (cb) -> conf = Object.create wpk ugly = compress: warnings: true # output: # comments: false conf.plugins = [ new webpack.optimize.DedupePlugin() new webpack.optimize.UglifyJsPlugin ugly ] conf.entry = conf.entry + '/babels/compile/moku.js' # output conf.output.path = dir.dist.libs conf.output.filename = 'moku.min.js'; # $.util.log 'ugly', ugly webpack conf, ( err, stats ) -> if ( err ) throw new $.util.PluginError( 'webpack', err ) $.util.log '[webpack]', stats.toString colors: true, progress: true cb() return ### BUILD SEQUENCE ### gulp.task 'babels:build', ['babels:dev'], (cb) -> runSequence( 'babels:babel' 'babels:webpack:build' cb ) return
[ { "context": "# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public Li", "end": 43, "score": 0.9999138712882996, "start": 29, "tag": "EMAIL", "value": "contact@ppy.sh" } ]
resources/assets/coffee/react/changelog-index.coffee
osu-katakuna/osu-katakuna-web
5
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. import { Main } from './changelog-index/main' reactTurbolinks.registerPersistent 'changelog-index', Main, true, (el) -> container: el updateStreams: osu.parseJson('json-update-streams') data: osu.parseJson('json-index')
38153
# Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. import { Main } from './changelog-index/main' reactTurbolinks.registerPersistent 'changelog-index', Main, true, (el) -> container: el updateStreams: osu.parseJson('json-update-streams') data: osu.parseJson('json-index')
true
# Copyright (c) ppy Pty Ltd <PI:EMAIL:<EMAIL>END_PI>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. import { Main } from './changelog-index/main' reactTurbolinks.registerPersistent 'changelog-index', Main, true, (el) -> container: el updateStreams: osu.parseJson('json-update-streams') data: osu.parseJson('json-index')
[ { "context": " ### extends [NPM:MPBasic](https://cdn.rawgit.com/mpneuried/mpbaisc/master/_docs/index.coffee.html)\n#\n# ### E", "end": 78, "score": 0.9997347593307495, "start": 69, "tag": "USERNAME", "value": "mpneuried" }, { "context": "s\n\tdefaults: =>\n\t\t@extend super,\n\t\t\tkeyUserlist: \"users_with_messages\"\n\t\t\tkeyMsgsPrefix: \"msgs\"\n\n\t\t\tmaxBufferReadCount:", "end": 450, "score": 0.8513121604919434, "start": 431, "tag": "KEY", "value": "users_with_messages" } ]
_src/lib/mailbuffer.coffee
mpneuried/redis-notifications
30
## # RNMailBuffer # ### extends [NPM:MPBasic](https://cdn.rawgit.com/mpneuried/mpbaisc/master/_docs/index.coffee.html) # # ### Exports: *Class* # # Main Module to init the notifications to redis # # **npm modules** moment = require( "moment-timezone" ) # [utils](./utils.coffee.html) utils = require( "./utils" ) class RNMailBuffer extends require( "mpbasic" )() # ## defaults defaults: => @extend super, keyUserlist: "users_with_messages" keyMsgsPrefix: "msgs" maxBufferReadCount: 100 # **options.prefix** *String* A general redis prefix prefix: "notifications" ### ## constructor ### constructor: ( @main, options )-> @ready = false super @write = @_waitUntil( @_write ) @listUsers = @_waitUntil( @_listUsers ) @main.on "ready", @_start return _start: => @redis = @main.getRedis() @ready = true @emit "ready" return _write: ( data, cb )=> @_getRedisTime ( err, sec, ms )=> if err cb( err ) return data.created = sec _ud = data.userdata rM = [] rM.push( [ "ZADD", @_getKey( @config.keyUserlist ), @_calcSendAt( ms, _ud.sendInterval, _ud.timezone ), _ud.id ] ) rM.push( [ "LPUSH", @_getKey( @config.keyMsgsPrefix, _ud.id ), JSON.stringify( data )] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return return _listUsers: ( cb )=> @_calcCheckTime ( err, ts )=> if err cb( err ) return @debug "_listUsers:ts", ts @redis.zrangebyscore( @_getKey( @config.keyUserlist ), 0, ts, "LIMIT", 0, @config.maxBufferReadCount, cb ) return return userMsgs: ( uid, cb )=> @redis.lrange @_getKey( @config.keyMsgsPrefix, uid ), 0, -1, ( err, msgs )-> if err cb( err ) return try # concat the messages simulate a array and do a single parse cb( null, JSON.parse( "[" + msgs.join( "," ) + "]" ) ) catch _err cb( _err ) return return removeUser: ( args..., cb )=> [ uid, count ] = args if not count? _range = [ -1, 0 ] else _range = [ 0, ( ( count + 1 ) * -1 ) ] rM = [] rM.push( [ "ZREM", @_getKey( @config.keyUserlist ), uid ] ) if not count? or count > 0 # only relevent if count is undefined or gt 0 rM.push( [ "LTRIM", @_getKey( @config.keyMsgsPrefix, uid ), _range[ 0 ], _range[ 1 ] ] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return _calcCheckTime: ( cb )=> @_getRedisTime ( err, sec, ms )-> if err cb( err ) return _n = moment(ms) _last10Min = ( Math.floor( _n.minute()/10 ) * 10 ) _n.minutes( _last10Min ).seconds( 1 ).milliseconds( 0 ) cb( null, _n.valueOf() ) return return _calcSendAt: ( now, interval, timezone="CET" )-> type = interval[0] # handle daily if type is "d" time = interval[1..] _m = moment( now ).tz( timezone ) _next = moment( _m ).hour( parseInt( time[..1], 10 ) ).minute( parseInt( time[2..], 10 ) ).seconds(0).milliseconds(0) if _next <= _m _next.add( 1, "d" ) # DEBUGGING _next.add( -1, "d" ) return _next.valueOf() ### ## _getKey `redisconnector._getKey( id, name )` Samll helper to prefix and get a redis key. @param { String } name the key name @param { String } id The key @return { String } Return The generated key @api public ### _getKey: ( name, id )=> _key = @main.getRedisNamespace() or "" if name? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{name}" if id? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{id}" return _key _getRedisTime: ( cb )=> @redis.time ( err, time )-> if err cb( err ) return [ s, ns ] = time ns = utils.lpad( ns, 6, "0" )[0..5] ms = Math.round( (parseInt( s + ns , 10 ) / 1000 ) ) cb( null, parseInt( s, 10 ), ms ) return return #export this class module.exports = RNMailBuffer
194064
## # RNMailBuffer # ### extends [NPM:MPBasic](https://cdn.rawgit.com/mpneuried/mpbaisc/master/_docs/index.coffee.html) # # ### Exports: *Class* # # Main Module to init the notifications to redis # # **npm modules** moment = require( "moment-timezone" ) # [utils](./utils.coffee.html) utils = require( "./utils" ) class RNMailBuffer extends require( "mpbasic" )() # ## defaults defaults: => @extend super, keyUserlist: "<KEY>" keyMsgsPrefix: "msgs" maxBufferReadCount: 100 # **options.prefix** *String* A general redis prefix prefix: "notifications" ### ## constructor ### constructor: ( @main, options )-> @ready = false super @write = @_waitUntil( @_write ) @listUsers = @_waitUntil( @_listUsers ) @main.on "ready", @_start return _start: => @redis = @main.getRedis() @ready = true @emit "ready" return _write: ( data, cb )=> @_getRedisTime ( err, sec, ms )=> if err cb( err ) return data.created = sec _ud = data.userdata rM = [] rM.push( [ "ZADD", @_getKey( @config.keyUserlist ), @_calcSendAt( ms, _ud.sendInterval, _ud.timezone ), _ud.id ] ) rM.push( [ "LPUSH", @_getKey( @config.keyMsgsPrefix, _ud.id ), JSON.stringify( data )] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return return _listUsers: ( cb )=> @_calcCheckTime ( err, ts )=> if err cb( err ) return @debug "_listUsers:ts", ts @redis.zrangebyscore( @_getKey( @config.keyUserlist ), 0, ts, "LIMIT", 0, @config.maxBufferReadCount, cb ) return return userMsgs: ( uid, cb )=> @redis.lrange @_getKey( @config.keyMsgsPrefix, uid ), 0, -1, ( err, msgs )-> if err cb( err ) return try # concat the messages simulate a array and do a single parse cb( null, JSON.parse( "[" + msgs.join( "," ) + "]" ) ) catch _err cb( _err ) return return removeUser: ( args..., cb )=> [ uid, count ] = args if not count? _range = [ -1, 0 ] else _range = [ 0, ( ( count + 1 ) * -1 ) ] rM = [] rM.push( [ "ZREM", @_getKey( @config.keyUserlist ), uid ] ) if not count? or count > 0 # only relevent if count is undefined or gt 0 rM.push( [ "LTRIM", @_getKey( @config.keyMsgsPrefix, uid ), _range[ 0 ], _range[ 1 ] ] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return _calcCheckTime: ( cb )=> @_getRedisTime ( err, sec, ms )-> if err cb( err ) return _n = moment(ms) _last10Min = ( Math.floor( _n.minute()/10 ) * 10 ) _n.minutes( _last10Min ).seconds( 1 ).milliseconds( 0 ) cb( null, _n.valueOf() ) return return _calcSendAt: ( now, interval, timezone="CET" )-> type = interval[0] # handle daily if type is "d" time = interval[1..] _m = moment( now ).tz( timezone ) _next = moment( _m ).hour( parseInt( time[..1], 10 ) ).minute( parseInt( time[2..], 10 ) ).seconds(0).milliseconds(0) if _next <= _m _next.add( 1, "d" ) # DEBUGGING _next.add( -1, "d" ) return _next.valueOf() ### ## _getKey `redisconnector._getKey( id, name )` Samll helper to prefix and get a redis key. @param { String } name the key name @param { String } id The key @return { String } Return The generated key @api public ### _getKey: ( name, id )=> _key = @main.getRedisNamespace() or "" if name? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{name}" if id? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{id}" return _key _getRedisTime: ( cb )=> @redis.time ( err, time )-> if err cb( err ) return [ s, ns ] = time ns = utils.lpad( ns, 6, "0" )[0..5] ms = Math.round( (parseInt( s + ns , 10 ) / 1000 ) ) cb( null, parseInt( s, 10 ), ms ) return return #export this class module.exports = RNMailBuffer
true
## # RNMailBuffer # ### extends [NPM:MPBasic](https://cdn.rawgit.com/mpneuried/mpbaisc/master/_docs/index.coffee.html) # # ### Exports: *Class* # # Main Module to init the notifications to redis # # **npm modules** moment = require( "moment-timezone" ) # [utils](./utils.coffee.html) utils = require( "./utils" ) class RNMailBuffer extends require( "mpbasic" )() # ## defaults defaults: => @extend super, keyUserlist: "PI:KEY:<KEY>END_PI" keyMsgsPrefix: "msgs" maxBufferReadCount: 100 # **options.prefix** *String* A general redis prefix prefix: "notifications" ### ## constructor ### constructor: ( @main, options )-> @ready = false super @write = @_waitUntil( @_write ) @listUsers = @_waitUntil( @_listUsers ) @main.on "ready", @_start return _start: => @redis = @main.getRedis() @ready = true @emit "ready" return _write: ( data, cb )=> @_getRedisTime ( err, sec, ms )=> if err cb( err ) return data.created = sec _ud = data.userdata rM = [] rM.push( [ "ZADD", @_getKey( @config.keyUserlist ), @_calcSendAt( ms, _ud.sendInterval, _ud.timezone ), _ud.id ] ) rM.push( [ "LPUSH", @_getKey( @config.keyMsgsPrefix, _ud.id ), JSON.stringify( data )] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return return _listUsers: ( cb )=> @_calcCheckTime ( err, ts )=> if err cb( err ) return @debug "_listUsers:ts", ts @redis.zrangebyscore( @_getKey( @config.keyUserlist ), 0, ts, "LIMIT", 0, @config.maxBufferReadCount, cb ) return return userMsgs: ( uid, cb )=> @redis.lrange @_getKey( @config.keyMsgsPrefix, uid ), 0, -1, ( err, msgs )-> if err cb( err ) return try # concat the messages simulate a array and do a single parse cb( null, JSON.parse( "[" + msgs.join( "," ) + "]" ) ) catch _err cb( _err ) return return removeUser: ( args..., cb )=> [ uid, count ] = args if not count? _range = [ -1, 0 ] else _range = [ 0, ( ( count + 1 ) * -1 ) ] rM = [] rM.push( [ "ZREM", @_getKey( @config.keyUserlist ), uid ] ) if not count? or count > 0 # only relevent if count is undefined or gt 0 rM.push( [ "LTRIM", @_getKey( @config.keyMsgsPrefix, uid ), _range[ 0 ], _range[ 1 ] ] ) @redis.multi( rM ).exec ( err, results )-> if err cb( err ) return cb() return return _calcCheckTime: ( cb )=> @_getRedisTime ( err, sec, ms )-> if err cb( err ) return _n = moment(ms) _last10Min = ( Math.floor( _n.minute()/10 ) * 10 ) _n.minutes( _last10Min ).seconds( 1 ).milliseconds( 0 ) cb( null, _n.valueOf() ) return return _calcSendAt: ( now, interval, timezone="CET" )-> type = interval[0] # handle daily if type is "d" time = interval[1..] _m = moment( now ).tz( timezone ) _next = moment( _m ).hour( parseInt( time[..1], 10 ) ).minute( parseInt( time[2..], 10 ) ).seconds(0).milliseconds(0) if _next <= _m _next.add( 1, "d" ) # DEBUGGING _next.add( -1, "d" ) return _next.valueOf() ### ## _getKey `redisconnector._getKey( id, name )` Samll helper to prefix and get a redis key. @param { String } name the key name @param { String } id The key @return { String } Return The generated key @api public ### _getKey: ( name, id )=> _key = @main.getRedisNamespace() or "" if name? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{name}" if id? if _key[ _key.length-1 ] isnt ":" _key += ":" _key += "#{id}" return _key _getRedisTime: ( cb )=> @redis.time ( err, time )-> if err cb( err ) return [ s, ns ] = time ns = utils.lpad( ns, 6, "0" )[0..5] ms = Math.round( (parseInt( s + ns , 10 ) / 1000 ) ) cb( null, parseInt( s, 10 ), ms ) return return #export this class module.exports = RNMailBuffer
[ { "context": "er.login = prenom[0] + nom\n $scope.user.email = \"#{prenom}.#{nom}@ens-lyon.fr\"\n\n $scope.$watch \"user.prenom\", calculLoginAndMa", "end": 758, "score": 0.9701039791107178, "start": 729, "tag": "EMAIL", "value": "\"#{prenom}.#{nom}@ens-lyon.fr" } ]
app/scripts/controllers/LoggedRfCreateUserCtrl.coffee
dreimert/foyer
2
angular = require 'angular' angular.module "ardoise.controllers" .controller "LoggedRfCreateUserCtrl", ($scope, $http) -> $scope.departements = [ "Informatique" "Mathématiques" "Biologie" "Geologie" "Physique" "Chimie" "Arts" "Langues, littératures et civilisation étrangères" "Lettres" "Sciences humaines" "Sciences sociales" "Autre" ] date = new Date() $scope.user = promo: if date.getMonth() >= 8 then date.getFullYear() else date.getFullYear() - 1 calculLoginAndMail = -> prenom = ($scope.user.prenom or "").toLowerCase() nom = ($scope.user.nom or "").toLowerCase() if prenom[0]? $scope.user.login = prenom[0] + nom $scope.user.email = "#{prenom}.#{nom}@ens-lyon.fr" $scope.$watch "user.prenom", calculLoginAndMail $scope.$watch "user.nom", calculLoginAndMail $scope.onFormSubmit = -> console.log "user", $scope.user
157392
angular = require 'angular' angular.module "ardoise.controllers" .controller "LoggedRfCreateUserCtrl", ($scope, $http) -> $scope.departements = [ "Informatique" "Mathématiques" "Biologie" "Geologie" "Physique" "Chimie" "Arts" "Langues, littératures et civilisation étrangères" "Lettres" "Sciences humaines" "Sciences sociales" "Autre" ] date = new Date() $scope.user = promo: if date.getMonth() >= 8 then date.getFullYear() else date.getFullYear() - 1 calculLoginAndMail = -> prenom = ($scope.user.prenom or "").toLowerCase() nom = ($scope.user.nom or "").toLowerCase() if prenom[0]? $scope.user.login = prenom[0] + nom $scope.user.email = <EMAIL>" $scope.$watch "user.prenom", calculLoginAndMail $scope.$watch "user.nom", calculLoginAndMail $scope.onFormSubmit = -> console.log "user", $scope.user
true
angular = require 'angular' angular.module "ardoise.controllers" .controller "LoggedRfCreateUserCtrl", ($scope, $http) -> $scope.departements = [ "Informatique" "Mathématiques" "Biologie" "Geologie" "Physique" "Chimie" "Arts" "Langues, littératures et civilisation étrangères" "Lettres" "Sciences humaines" "Sciences sociales" "Autre" ] date = new Date() $scope.user = promo: if date.getMonth() >= 8 then date.getFullYear() else date.getFullYear() - 1 calculLoginAndMail = -> prenom = ($scope.user.prenom or "").toLowerCase() nom = ($scope.user.nom or "").toLowerCase() if prenom[0]? $scope.user.login = prenom[0] + nom $scope.user.email = PI:EMAIL:<EMAIL>END_PI" $scope.$watch "user.prenom", calculLoginAndMail $scope.$watch "user.nom", calculLoginAndMail $scope.onFormSubmit = -> console.log "user", $scope.user
[ { "context": " and imbedded uppercased word\nMY_DOG = \" My dog, Tommy, is a really smart dog. \"\n\n\ndescribe \"weakly", "end": 149, "score": 0.9995082020759583, "start": 144, "tag": "NAME", "value": "Tommy" } ]
test/weaklyEqual.coffee
littlebee/bumble-strings
0
BStr = require('../src/bumble-strings') debugger # test value with extra spaces everywhere and imbedded uppercased word MY_DOG = " My dog, Tommy, is a really smart dog. " describe "weaklyEqual()", -> it "should weakly equal itself", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG) it "should weakly equal itself lower cased", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG.toLowerCase()) it "should weakly equal itself trimmed", -> assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG)), "trimmed" assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).toLowerCase()), "trimmed and lowercased" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(1)), "itself with 1 leading space removed" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(0, -1)), "itself with 1 trailing space removed" it "should not weakly equal part of itself", -> assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -1)), "trimmed and length -1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -2)), "trimmed and length -2" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(1)), "trimmed and start + 1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(2)), "trimmed and start + 2" it "should not weakly equal something completely different", -> assert !BStr.weaklyEqual(MY_DOG, "SOMEthing completely different!") it "should not weakly equal any of array without matches", -> assert !BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", "SOMEthing completely different!"]) it "should weakly equal if any of array with a single match", -> assert BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", MY_DOG.toLowerCase(), "SOMEthing completely different!"])
83124
BStr = require('../src/bumble-strings') debugger # test value with extra spaces everywhere and imbedded uppercased word MY_DOG = " My dog, <NAME>, is a really smart dog. " describe "weaklyEqual()", -> it "should weakly equal itself", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG) it "should weakly equal itself lower cased", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG.toLowerCase()) it "should weakly equal itself trimmed", -> assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG)), "trimmed" assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).toLowerCase()), "trimmed and lowercased" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(1)), "itself with 1 leading space removed" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(0, -1)), "itself with 1 trailing space removed" it "should not weakly equal part of itself", -> assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -1)), "trimmed and length -1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -2)), "trimmed and length -2" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(1)), "trimmed and start + 1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(2)), "trimmed and start + 2" it "should not weakly equal something completely different", -> assert !BStr.weaklyEqual(MY_DOG, "SOMEthing completely different!") it "should not weakly equal any of array without matches", -> assert !BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", "SOMEthing completely different!"]) it "should weakly equal if any of array with a single match", -> assert BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", MY_DOG.toLowerCase(), "SOMEthing completely different!"])
true
BStr = require('../src/bumble-strings') debugger # test value with extra spaces everywhere and imbedded uppercased word MY_DOG = " My dog, PI:NAME:<NAME>END_PI, is a really smart dog. " describe "weaklyEqual()", -> it "should weakly equal itself", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG) it "should weakly equal itself lower cased", -> assert BStr.weaklyEqual(MY_DOG, MY_DOG.toLowerCase()) it "should weakly equal itself trimmed", -> assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG)), "trimmed" assert BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).toLowerCase()), "trimmed and lowercased" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(1)), "itself with 1 leading space removed" assert BStr.weaklyEqual(MY_DOG, MY_DOG.slice(0, -1)), "itself with 1 trailing space removed" it "should not weakly equal part of itself", -> assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -1)), "trimmed and length -1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(0, -2)), "trimmed and length -2" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(1)), "trimmed and start + 1" assert !BStr.weaklyEqual(MY_DOG, BStr.trim(MY_DOG).slice(2)), "trimmed and start + 2" it "should not weakly equal something completely different", -> assert !BStr.weaklyEqual(MY_DOG, "SOMEthing completely different!") it "should not weakly equal any of array without matches", -> assert !BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", "SOMEthing completely different!"]) it "should weakly equal if any of array with a single match", -> assert BStr.weaklyEqual(MY_DOG, ["gibberish", "garbage", MY_DOG.toLowerCase(), "SOMEthing completely different!"])
[ { "context": "# Copyright (c) Konode. All rights reserved.\n# This source code is su", "end": 19, "score": 0.6103572845458984, "start": 16, "tag": "NAME", "value": "Kon" }, { "context": "thor: progEvent.get('author')\n\t\t\t\t\t\t\t\t\tclientName: clientName\n\t\t\t\t\t\t\t\t\tprograms: programNames.toJS().join(\", \")", "end": 5970, "score": 0.9043488502502441, "start": 5960, "tag": "NAME", "value": "clientName" } ]
src/exportManagerTab.coffee
LogicalOutcomes/KoNote
1
# Copyright (c) Konode. All rights reserved. # This source code is subject to the terms of the Mozilla Public License, v. 2.0 # that can be found in the LICENSE file or at: http://mozilla.org/MPL/2.0 # Tab layer for exporting data to CSV/etc Async = require 'async' Imm = require 'immutable' Fs = require 'graceful-fs' Path = require 'path' Moment = require 'moment' Config = require './config' Persist = require './persist' Term = require './term' {TimestampFormat} = require './persist/utils' load = (win) -> $ = win.jQuery Bootbox = win.bootbox React = win.React R = React.DOM CrashHandler = require('./crashHandler').load(win) Spinner = require('./spinner').load(win) {FaIcon, renderName, showWhen} = require('./utils').load(win) ExportManagerTab = React.createFactory React.createClass displayName: 'ExportManagerTab' mixins: [React.addons.PureRenderMixin] getInitialState: -> return { progress: 0 message: null isLoading: null exportProgress: { percent: null message: null } } render: -> return R.div({className: 'exportManagerTab'}, R.div({className: 'header'}, R.h1({}, "Export Data") ) R.div({className: 'main'}, Spinner { isVisible: @state.isLoading isOverlay: true message: @state.exportProgress.message percent: @state.exportProgress.percent } # Hidden input for handling file saving R.input({ ref: 'nwsaveas' className: 'hidden' type: 'file' }) R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-metrics" extension: 'csv' runExport: @_saveMetrics } }, "Export #{Term 'Metric'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-events" extension: 'csv' runExport: @_saveEvents } }, "Export #{Term 'Event'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-backup" extension: 'bak' runExport: @_saveBackup } }, "Backup All Data") ) ) _prettySize: (bytes) -> if bytes / 1024 > 1024 return (bytes/1024/1024).toFixed(2) + "MB" return (bytes/1024).toFixed(0) + "KB" _updateProgress: (percent, message) -> if not percent and not message percent = message = null @setState { isLoading: true exportProgress: { percent message: message or @state.exportProgress.message } } _export: ({defaultName, extension, runExport}) -> timestamp = Moment().format('YYYY-MM-DD') # Configures hidden file inputs with custom attributes, and clicks it $nwsaveasInput = $(@refs.nwsaveas) $nwsaveasInput .off() .val('') .attr('nwsaveas', "#{defaultName}-#{timestamp}") .attr('accept', ".#{extension}") .on('change', (event) => runExport event.target.value) .click() _saveEvents: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false # Map over client files # console.log "clientfileheaders: ", @props.clientFileHeaders.toArray() if @props.clientFileHeaders.size is 0 Bootbox.alert { title: "No #{Term 'Events'} to Export" message: "You must create at least one client file with events before they can be exported!" } else @_updateProgress 0, "Saving #{Term 'Events'} to CSV..." # console.log "progress should be 0" # console.log "size of clients array: ", @props.clientFileHeaders.size progressIterator = 0 Async.map @props.clientFileHeaders.toArray(), (clientFile, cb) => progEventsHeaders = null progEvents = null progEventsList = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null progressIterator = progressIterator + 1 # console.log "checking clientFile with name: ", clientName, progressIterator currentProgress = (progressIterator/@props.clientFileHeaders.size) * 90 @_updateProgress currentProgress Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # get event headers (cb) => ActiveSession.persist.progEvents.list clientFileId, (err, results) -> if err cb err return progEventsHeaders = results cb() # read each event (cb) => Async.map progEventsHeaders.toArray(), (progEvent, cb) -> ActiveSession.persist.progEvents.readLatestRevisions clientFileId, progEvent.get('id'), 1, cb , (err, results) -> if err cb err return progEvents = Imm.List(results).map (revision) -> revision.last() cb() # csv format: id, timestamp, username, title, description, start time, end time (cb) => progEvents = progEvents .filter (progEvent) -> progEvent.get('status') isnt "cancelled" .map (progEvent) -> return { id: progEvent.get('id') timestamp: Moment(progEvent.get('timestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') author: progEvent.get('author') clientName: clientName programs: programNames.toJS().join(", ") title: progEvent.get('title') description: progEvent.get('description') startDate: Moment(progEvent.get('startTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') endDate: Moment(progEvent.get('endTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') } cb() ], (err) => if err cb err return # console.log "Done iterating over client", clientName cb(null, progEvents) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return progEvents = Imm.List(results).flatten() # TODO: Move to series csv = Stringify progEvents.toJS() @_updateProgress(100) # destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => @setState {isLoading: false} if err # TODO: Account for write errors without hard-crash CrashHandler.handle err return if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Events exported to: #{path}" } # isConfirmClosed = true _saveMetrics: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false metrics = null count = 0 total = @props.clientFileHeaders.size @_updateProgress 1, "Exporting #{Term 'Metrics'} to CSV..." # Map over client files Async.mapSeries @props.clientFileHeaders.toArray(), (clientFile, cb) => @_updateProgress Math.floor((count / total) * 100) metricsResult = Imm.List() metricDefinitionHeaders = null metricDefinitions = null progNoteHeaders = null progNotes = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') metricsList = null clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # List metric definition headers (cb) => ActiveSession.persist.metrics.list (err, results) -> if err cb err return metricDefinitionHeaders = results cb() # Retrieve all metric definitions (cb) => Async.map metricDefinitionHeaders.toArray(), (metricHeader, cb) -> ActiveSession.persist.metrics.readLatestRevisions metricHeader.get('id'), 1, cb , (err, results) -> if err cb err return metricDefinitions = Imm.List(results).map (revision) -> revision.last() cb() # List progNote headers (cb) => ActiveSession.persist.progNotes.list clientFileId, (err, results) -> if err cb err return progNoteHeaders = results cb() # Retrieve progNotes (cb) => Async.map progNoteHeaders.toArray(), (progNoteHeader, cb) -> ActiveSession.persist.progNotes.readLatestRevisions clientFileId, progNoteHeader.get('id'), 1, cb , (err, results) -> if err cb err return progNotes = Imm.List(results).map (revision) -> revision.last() cb() # Filter out full list of metrics (cb) => fullProgNotes = progNotes.filter (progNote) => progNote.get('type') is "full" and progNote.get('status') isnt "cancelled" Async.map fullProgNotes.toArray(), (progNote, cb) => progNoteMetrics = progNote.get('units').flatMap (unit) => unitType = unit.get('type') switch unitType when 'basic' metrics = unit.get('metrics') when 'plan' metrics = unit.get('sections').flatMap (section) -> section.get('targets').flatMap (target) -> target.get('metrics') else cb new Error "Unknown unit type: #{unitType}" return metrics progNoteTimestamp = progNote.get('backdate') or progNote.get('timestamp') # Apply timestamp with custom format timestamp = Moment(progNoteTimestamp, TimestampFormat) .format('YYYY-MM-DD HH:mm:ss') # Model output format of metric object progNoteMetrics = progNoteMetrics.flatMap (metric) -> if metric.get('value') is null or metric.get('value') is '' # No output for blank metric values return Imm.List() progNoteMetricCsv = Imm.OrderedMap({ timestamp authorUsername: progNote.get('author') clientFileId clientName: clientName metricId: metric.get('id') programs: programNames.toJS().join(", ") metricName: metric.get('name') metricDefinition: metric.get('definition') metricValue: metric.get('value') }) return Imm.List([progNoteMetricCsv]) # console.info "progNoteMetrics " + JSON.stringify progNoteMetrics.toJS() cb null, progNoteMetrics , (err, results) -> if err cb err return metricsList = Imm.List(results).flatten(true) # console.info "all prognote metrics " + JSON.stringify metricsList.toJS() cb() ], (err) => if err cb err return # console.log "Done iterating over client: ", clientName count++ cb(null, metricsList) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return metricsList = Imm.List(results).flatten(true) # console.log "Final Metrics result: " + JSON.stringify metricsList.toJS() csv = Stringify metricsList.toJS() @_updateProgress 100 # Destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => if err CrashHandler.handle err return # console.info "Destination Path:", path @setState {isLoading: false} if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Metrics exported to: #{path}" } isConfirmClosed = true _saveBackup: (savepath) -> Archiver = require 'archiver' totalFiles = 0 @setState { isLoading: true exportProgress: {message: "Preparing to archive... "} } walkSync = (dir) => files = Fs.readdirSync(dir) files.forEach (file) -> if Fs.statSync(Path.join(dir, file)).isDirectory() totalFiles++ walkSync(Path.join(dir, file)) else totalFiles++ return Async.series [ (cb) => unless savepath.length > 1 err = new Error('nopath') cb err return walkSync(Config.backend.dataDirectory) cb() (cb) => unless totalFiles > 0 err = new Error('nofiles') cb err return cb() (cb) => output = Fs.createWriteStream(savepath) .on 'close', => clearInterval(progressCheck) @setState {isLoading: false} Bootbox.alert { title: "Backup Complete (#{@_prettySize output.bytesWritten})!" message: "Saved to: #{savepath}" } cb() archive = Archiver('zip', {store:true}) .on 'error', (err) => archive.abort() cb err return archive.pipe(output) archive.directory(Config.backend.dataDirectory, '') archive.finalize() progressCheck = setInterval => @setState { exportProgress: {message: "Writing #{@_prettySize(archive.pointer())} to #{Path.basename(savepath)}..." } } , 200 ], (err) => if err @setState {isLoading: false} Bootbox.alert { title: "Data Backup Failed" message: """ Unable to create archive. Please check your network connection and try again. If the problem persists, contact #{Config.productName} support with the following error: \"#{err}\". """ } console.error err return return ExportManagerTab module.exports = {load}
151688
# Copyright (c) <NAME>ode. All rights reserved. # This source code is subject to the terms of the Mozilla Public License, v. 2.0 # that can be found in the LICENSE file or at: http://mozilla.org/MPL/2.0 # Tab layer for exporting data to CSV/etc Async = require 'async' Imm = require 'immutable' Fs = require 'graceful-fs' Path = require 'path' Moment = require 'moment' Config = require './config' Persist = require './persist' Term = require './term' {TimestampFormat} = require './persist/utils' load = (win) -> $ = win.jQuery Bootbox = win.bootbox React = win.React R = React.DOM CrashHandler = require('./crashHandler').load(win) Spinner = require('./spinner').load(win) {FaIcon, renderName, showWhen} = require('./utils').load(win) ExportManagerTab = React.createFactory React.createClass displayName: 'ExportManagerTab' mixins: [React.addons.PureRenderMixin] getInitialState: -> return { progress: 0 message: null isLoading: null exportProgress: { percent: null message: null } } render: -> return R.div({className: 'exportManagerTab'}, R.div({className: 'header'}, R.h1({}, "Export Data") ) R.div({className: 'main'}, Spinner { isVisible: @state.isLoading isOverlay: true message: @state.exportProgress.message percent: @state.exportProgress.percent } # Hidden input for handling file saving R.input({ ref: 'nwsaveas' className: 'hidden' type: 'file' }) R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-metrics" extension: 'csv' runExport: @_saveMetrics } }, "Export #{Term 'Metric'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-events" extension: 'csv' runExport: @_saveEvents } }, "Export #{Term 'Event'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-backup" extension: 'bak' runExport: @_saveBackup } }, "Backup All Data") ) ) _prettySize: (bytes) -> if bytes / 1024 > 1024 return (bytes/1024/1024).toFixed(2) + "MB" return (bytes/1024).toFixed(0) + "KB" _updateProgress: (percent, message) -> if not percent and not message percent = message = null @setState { isLoading: true exportProgress: { percent message: message or @state.exportProgress.message } } _export: ({defaultName, extension, runExport}) -> timestamp = Moment().format('YYYY-MM-DD') # Configures hidden file inputs with custom attributes, and clicks it $nwsaveasInput = $(@refs.nwsaveas) $nwsaveasInput .off() .val('') .attr('nwsaveas', "#{defaultName}-#{timestamp}") .attr('accept', ".#{extension}") .on('change', (event) => runExport event.target.value) .click() _saveEvents: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false # Map over client files # console.log "clientfileheaders: ", @props.clientFileHeaders.toArray() if @props.clientFileHeaders.size is 0 Bootbox.alert { title: "No #{Term 'Events'} to Export" message: "You must create at least one client file with events before they can be exported!" } else @_updateProgress 0, "Saving #{Term 'Events'} to CSV..." # console.log "progress should be 0" # console.log "size of clients array: ", @props.clientFileHeaders.size progressIterator = 0 Async.map @props.clientFileHeaders.toArray(), (clientFile, cb) => progEventsHeaders = null progEvents = null progEventsList = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null progressIterator = progressIterator + 1 # console.log "checking clientFile with name: ", clientName, progressIterator currentProgress = (progressIterator/@props.clientFileHeaders.size) * 90 @_updateProgress currentProgress Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # get event headers (cb) => ActiveSession.persist.progEvents.list clientFileId, (err, results) -> if err cb err return progEventsHeaders = results cb() # read each event (cb) => Async.map progEventsHeaders.toArray(), (progEvent, cb) -> ActiveSession.persist.progEvents.readLatestRevisions clientFileId, progEvent.get('id'), 1, cb , (err, results) -> if err cb err return progEvents = Imm.List(results).map (revision) -> revision.last() cb() # csv format: id, timestamp, username, title, description, start time, end time (cb) => progEvents = progEvents .filter (progEvent) -> progEvent.get('status') isnt "cancelled" .map (progEvent) -> return { id: progEvent.get('id') timestamp: Moment(progEvent.get('timestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') author: progEvent.get('author') clientName: <NAME> programs: programNames.toJS().join(", ") title: progEvent.get('title') description: progEvent.get('description') startDate: Moment(progEvent.get('startTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') endDate: Moment(progEvent.get('endTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') } cb() ], (err) => if err cb err return # console.log "Done iterating over client", clientName cb(null, progEvents) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return progEvents = Imm.List(results).flatten() # TODO: Move to series csv = Stringify progEvents.toJS() @_updateProgress(100) # destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => @setState {isLoading: false} if err # TODO: Account for write errors without hard-crash CrashHandler.handle err return if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Events exported to: #{path}" } # isConfirmClosed = true _saveMetrics: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false metrics = null count = 0 total = @props.clientFileHeaders.size @_updateProgress 1, "Exporting #{Term 'Metrics'} to CSV..." # Map over client files Async.mapSeries @props.clientFileHeaders.toArray(), (clientFile, cb) => @_updateProgress Math.floor((count / total) * 100) metricsResult = Imm.List() metricDefinitionHeaders = null metricDefinitions = null progNoteHeaders = null progNotes = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') metricsList = null clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # List metric definition headers (cb) => ActiveSession.persist.metrics.list (err, results) -> if err cb err return metricDefinitionHeaders = results cb() # Retrieve all metric definitions (cb) => Async.map metricDefinitionHeaders.toArray(), (metricHeader, cb) -> ActiveSession.persist.metrics.readLatestRevisions metricHeader.get('id'), 1, cb , (err, results) -> if err cb err return metricDefinitions = Imm.List(results).map (revision) -> revision.last() cb() # List progNote headers (cb) => ActiveSession.persist.progNotes.list clientFileId, (err, results) -> if err cb err return progNoteHeaders = results cb() # Retrieve progNotes (cb) => Async.map progNoteHeaders.toArray(), (progNoteHeader, cb) -> ActiveSession.persist.progNotes.readLatestRevisions clientFileId, progNoteHeader.get('id'), 1, cb , (err, results) -> if err cb err return progNotes = Imm.List(results).map (revision) -> revision.last() cb() # Filter out full list of metrics (cb) => fullProgNotes = progNotes.filter (progNote) => progNote.get('type') is "full" and progNote.get('status') isnt "cancelled" Async.map fullProgNotes.toArray(), (progNote, cb) => progNoteMetrics = progNote.get('units').flatMap (unit) => unitType = unit.get('type') switch unitType when 'basic' metrics = unit.get('metrics') when 'plan' metrics = unit.get('sections').flatMap (section) -> section.get('targets').flatMap (target) -> target.get('metrics') else cb new Error "Unknown unit type: #{unitType}" return metrics progNoteTimestamp = progNote.get('backdate') or progNote.get('timestamp') # Apply timestamp with custom format timestamp = Moment(progNoteTimestamp, TimestampFormat) .format('YYYY-MM-DD HH:mm:ss') # Model output format of metric object progNoteMetrics = progNoteMetrics.flatMap (metric) -> if metric.get('value') is null or metric.get('value') is '' # No output for blank metric values return Imm.List() progNoteMetricCsv = Imm.OrderedMap({ timestamp authorUsername: progNote.get('author') clientFileId clientName: clientName metricId: metric.get('id') programs: programNames.toJS().join(", ") metricName: metric.get('name') metricDefinition: metric.get('definition') metricValue: metric.get('value') }) return Imm.List([progNoteMetricCsv]) # console.info "progNoteMetrics " + JSON.stringify progNoteMetrics.toJS() cb null, progNoteMetrics , (err, results) -> if err cb err return metricsList = Imm.List(results).flatten(true) # console.info "all prognote metrics " + JSON.stringify metricsList.toJS() cb() ], (err) => if err cb err return # console.log "Done iterating over client: ", clientName count++ cb(null, metricsList) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return metricsList = Imm.List(results).flatten(true) # console.log "Final Metrics result: " + JSON.stringify metricsList.toJS() csv = Stringify metricsList.toJS() @_updateProgress 100 # Destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => if err CrashHandler.handle err return # console.info "Destination Path:", path @setState {isLoading: false} if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Metrics exported to: #{path}" } isConfirmClosed = true _saveBackup: (savepath) -> Archiver = require 'archiver' totalFiles = 0 @setState { isLoading: true exportProgress: {message: "Preparing to archive... "} } walkSync = (dir) => files = Fs.readdirSync(dir) files.forEach (file) -> if Fs.statSync(Path.join(dir, file)).isDirectory() totalFiles++ walkSync(Path.join(dir, file)) else totalFiles++ return Async.series [ (cb) => unless savepath.length > 1 err = new Error('nopath') cb err return walkSync(Config.backend.dataDirectory) cb() (cb) => unless totalFiles > 0 err = new Error('nofiles') cb err return cb() (cb) => output = Fs.createWriteStream(savepath) .on 'close', => clearInterval(progressCheck) @setState {isLoading: false} Bootbox.alert { title: "Backup Complete (#{@_prettySize output.bytesWritten})!" message: "Saved to: #{savepath}" } cb() archive = Archiver('zip', {store:true}) .on 'error', (err) => archive.abort() cb err return archive.pipe(output) archive.directory(Config.backend.dataDirectory, '') archive.finalize() progressCheck = setInterval => @setState { exportProgress: {message: "Writing #{@_prettySize(archive.pointer())} to #{Path.basename(savepath)}..." } } , 200 ], (err) => if err @setState {isLoading: false} Bootbox.alert { title: "Data Backup Failed" message: """ Unable to create archive. Please check your network connection and try again. If the problem persists, contact #{Config.productName} support with the following error: \"#{err}\". """ } console.error err return return ExportManagerTab module.exports = {load}
true
# Copyright (c) PI:NAME:<NAME>END_PIode. All rights reserved. # This source code is subject to the terms of the Mozilla Public License, v. 2.0 # that can be found in the LICENSE file or at: http://mozilla.org/MPL/2.0 # Tab layer for exporting data to CSV/etc Async = require 'async' Imm = require 'immutable' Fs = require 'graceful-fs' Path = require 'path' Moment = require 'moment' Config = require './config' Persist = require './persist' Term = require './term' {TimestampFormat} = require './persist/utils' load = (win) -> $ = win.jQuery Bootbox = win.bootbox React = win.React R = React.DOM CrashHandler = require('./crashHandler').load(win) Spinner = require('./spinner').load(win) {FaIcon, renderName, showWhen} = require('./utils').load(win) ExportManagerTab = React.createFactory React.createClass displayName: 'ExportManagerTab' mixins: [React.addons.PureRenderMixin] getInitialState: -> return { progress: 0 message: null isLoading: null exportProgress: { percent: null message: null } } render: -> return R.div({className: 'exportManagerTab'}, R.div({className: 'header'}, R.h1({}, "Export Data") ) R.div({className: 'main'}, Spinner { isVisible: @state.isLoading isOverlay: true message: @state.exportProgress.message percent: @state.exportProgress.percent } # Hidden input for handling file saving R.input({ ref: 'nwsaveas' className: 'hidden' type: 'file' }) R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-metrics" extension: 'csv' runExport: @_saveMetrics } }, "Export #{Term 'Metric'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-events" extension: 'csv' runExport: @_saveEvents } }, "Export #{Term 'Event'} Data to CSV") R.button({ className: 'btn btn-default btn-lg' onClick: @_export.bind null, { defaultName: "konote-backup" extension: 'bak' runExport: @_saveBackup } }, "Backup All Data") ) ) _prettySize: (bytes) -> if bytes / 1024 > 1024 return (bytes/1024/1024).toFixed(2) + "MB" return (bytes/1024).toFixed(0) + "KB" _updateProgress: (percent, message) -> if not percent and not message percent = message = null @setState { isLoading: true exportProgress: { percent message: message or @state.exportProgress.message } } _export: ({defaultName, extension, runExport}) -> timestamp = Moment().format('YYYY-MM-DD') # Configures hidden file inputs with custom attributes, and clicks it $nwsaveasInput = $(@refs.nwsaveas) $nwsaveasInput .off() .val('') .attr('nwsaveas', "#{defaultName}-#{timestamp}") .attr('accept', ".#{extension}") .on('change', (event) => runExport event.target.value) .click() _saveEvents: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false # Map over client files # console.log "clientfileheaders: ", @props.clientFileHeaders.toArray() if @props.clientFileHeaders.size is 0 Bootbox.alert { title: "No #{Term 'Events'} to Export" message: "You must create at least one client file with events before they can be exported!" } else @_updateProgress 0, "Saving #{Term 'Events'} to CSV..." # console.log "progress should be 0" # console.log "size of clients array: ", @props.clientFileHeaders.size progressIterator = 0 Async.map @props.clientFileHeaders.toArray(), (clientFile, cb) => progEventsHeaders = null progEvents = null progEventsList = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null progressIterator = progressIterator + 1 # console.log "checking clientFile with name: ", clientName, progressIterator currentProgress = (progressIterator/@props.clientFileHeaders.size) * 90 @_updateProgress currentProgress Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # get event headers (cb) => ActiveSession.persist.progEvents.list clientFileId, (err, results) -> if err cb err return progEventsHeaders = results cb() # read each event (cb) => Async.map progEventsHeaders.toArray(), (progEvent, cb) -> ActiveSession.persist.progEvents.readLatestRevisions clientFileId, progEvent.get('id'), 1, cb , (err, results) -> if err cb err return progEvents = Imm.List(results).map (revision) -> revision.last() cb() # csv format: id, timestamp, username, title, description, start time, end time (cb) => progEvents = progEvents .filter (progEvent) -> progEvent.get('status') isnt "cancelled" .map (progEvent) -> return { id: progEvent.get('id') timestamp: Moment(progEvent.get('timestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') author: progEvent.get('author') clientName: PI:NAME:<NAME>END_PI programs: programNames.toJS().join(", ") title: progEvent.get('title') description: progEvent.get('description') startDate: Moment(progEvent.get('startTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') endDate: Moment(progEvent.get('endTimestamp'), TimestampFormat).format('YYYY-MM-DD HH:mm:ss') } cb() ], (err) => if err cb err return # console.log "Done iterating over client", clientName cb(null, progEvents) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return progEvents = Imm.List(results).flatten() # TODO: Move to series csv = Stringify progEvents.toJS() @_updateProgress(100) # destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => @setState {isLoading: false} if err # TODO: Account for write errors without hard-crash CrashHandler.handle err return if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Events exported to: #{path}" } # isConfirmClosed = true _saveMetrics: (path) -> Stringify = require 'csv-stringify/lib/sync' isConfirmClosed = false metrics = null count = 0 total = @props.clientFileHeaders.size @_updateProgress 1, "Exporting #{Term 'Metrics'} to CSV..." # Map over client files Async.mapSeries @props.clientFileHeaders.toArray(), (clientFile, cb) => @_updateProgress Math.floor((count / total) * 100) metricsResult = Imm.List() metricDefinitionHeaders = null metricDefinitions = null progNoteHeaders = null progNotes = null clientFileId = clientFile.get('id') clientName = renderName clientFile.get('clientName') metricsList = null clientFileProgramLinkIds = null programHeaders = null programs = @props.programsById.valueSeq().toList() programNames = null csv = null Async.series [ # get clientfile program links (cb) => clientFileProgramLinkIds = @props.clientFileProgramLinks .filter (link) -> link.get('clientFileId') is clientFileId and link.get('status') is "enrolled" .map (link) -> link.get('programId') # console.log "link IDs: ", clientFileProgramLinkIds.toJS() cb() (cb) => programNames = programs .filter (program) -> clientFileProgramLinkIds.contains program.get('id') .map (program) -> program.get('name') # console.log "program names: ", programNames.toJS() cb() # List metric definition headers (cb) => ActiveSession.persist.metrics.list (err, results) -> if err cb err return metricDefinitionHeaders = results cb() # Retrieve all metric definitions (cb) => Async.map metricDefinitionHeaders.toArray(), (metricHeader, cb) -> ActiveSession.persist.metrics.readLatestRevisions metricHeader.get('id'), 1, cb , (err, results) -> if err cb err return metricDefinitions = Imm.List(results).map (revision) -> revision.last() cb() # List progNote headers (cb) => ActiveSession.persist.progNotes.list clientFileId, (err, results) -> if err cb err return progNoteHeaders = results cb() # Retrieve progNotes (cb) => Async.map progNoteHeaders.toArray(), (progNoteHeader, cb) -> ActiveSession.persist.progNotes.readLatestRevisions clientFileId, progNoteHeader.get('id'), 1, cb , (err, results) -> if err cb err return progNotes = Imm.List(results).map (revision) -> revision.last() cb() # Filter out full list of metrics (cb) => fullProgNotes = progNotes.filter (progNote) => progNote.get('type') is "full" and progNote.get('status') isnt "cancelled" Async.map fullProgNotes.toArray(), (progNote, cb) => progNoteMetrics = progNote.get('units').flatMap (unit) => unitType = unit.get('type') switch unitType when 'basic' metrics = unit.get('metrics') when 'plan' metrics = unit.get('sections').flatMap (section) -> section.get('targets').flatMap (target) -> target.get('metrics') else cb new Error "Unknown unit type: #{unitType}" return metrics progNoteTimestamp = progNote.get('backdate') or progNote.get('timestamp') # Apply timestamp with custom format timestamp = Moment(progNoteTimestamp, TimestampFormat) .format('YYYY-MM-DD HH:mm:ss') # Model output format of metric object progNoteMetrics = progNoteMetrics.flatMap (metric) -> if metric.get('value') is null or metric.get('value') is '' # No output for blank metric values return Imm.List() progNoteMetricCsv = Imm.OrderedMap({ timestamp authorUsername: progNote.get('author') clientFileId clientName: clientName metricId: metric.get('id') programs: programNames.toJS().join(", ") metricName: metric.get('name') metricDefinition: metric.get('definition') metricValue: metric.get('value') }) return Imm.List([progNoteMetricCsv]) # console.info "progNoteMetrics " + JSON.stringify progNoteMetrics.toJS() cb null, progNoteMetrics , (err, results) -> if err cb err return metricsList = Imm.List(results).flatten(true) # console.info "all prognote metrics " + JSON.stringify metricsList.toJS() cb() ], (err) => if err cb err return # console.log "Done iterating over client: ", clientName count++ cb(null, metricsList) , (err, results) => if err if err instanceof Persist.IOError Bootbox.alert "Please check your network connection and try again." return CrashHandler.handle err return metricsList = Imm.List(results).flatten(true) # console.log "Final Metrics result: " + JSON.stringify metricsList.toJS() csv = Stringify metricsList.toJS() @_updateProgress 100 # Destination path must exist in order to save if path.length > 1 Fs.writeFile path, '\ufeff' + csv, {encoding:'utf8'}, (err) => if err CrashHandler.handle err return # console.info "Destination Path:", path @setState {isLoading: false} if isConfirmClosed isnt true Bootbox.alert { title: "Save Successful" message: "Metrics exported to: #{path}" } isConfirmClosed = true _saveBackup: (savepath) -> Archiver = require 'archiver' totalFiles = 0 @setState { isLoading: true exportProgress: {message: "Preparing to archive... "} } walkSync = (dir) => files = Fs.readdirSync(dir) files.forEach (file) -> if Fs.statSync(Path.join(dir, file)).isDirectory() totalFiles++ walkSync(Path.join(dir, file)) else totalFiles++ return Async.series [ (cb) => unless savepath.length > 1 err = new Error('nopath') cb err return walkSync(Config.backend.dataDirectory) cb() (cb) => unless totalFiles > 0 err = new Error('nofiles') cb err return cb() (cb) => output = Fs.createWriteStream(savepath) .on 'close', => clearInterval(progressCheck) @setState {isLoading: false} Bootbox.alert { title: "Backup Complete (#{@_prettySize output.bytesWritten})!" message: "Saved to: #{savepath}" } cb() archive = Archiver('zip', {store:true}) .on 'error', (err) => archive.abort() cb err return archive.pipe(output) archive.directory(Config.backend.dataDirectory, '') archive.finalize() progressCheck = setInterval => @setState { exportProgress: {message: "Writing #{@_prettySize(archive.pointer())} to #{Path.basename(savepath)}..." } } , 200 ], (err) => if err @setState {isLoading: false} Bootbox.alert { title: "Data Backup Failed" message: """ Unable to create archive. Please check your network connection and try again. If the problem persists, contact #{Config.productName} support with the following error: \"#{err}\". """ } console.error err return return ExportManagerTab module.exports = {load}
[ { "context": "56).toString('hex').match(/.{1,128}/g)\n key = \"#{path.join(\"/\")}.png\"\n\n unless blob.length\n error(\"No imag", "end": 1835, "score": 0.9057011008262634, "start": 1813, "tag": "KEY", "value": "\"#{path.join(\"/\")}.png" }, { "context": "56).toString('hex').match(/.{1,128}/g)\n key = \"#{path.join(\"/\")}.png\"\n unless blob.length\n error(\"No image ", "end": 2787, "score": 0.9922590255737305, "start": 2764, "tag": "KEY", "value": "\"#{path.join(\"/\")}.png\"" } ]
lib/bot.coffee
Global19/looker-slackbot
5
Botkit = require('botkit') getUrls = require('get-urls') AWS = require('aws-sdk') AzureStorage = require('azure-storage') crypto = require('crypto') _ = require('underscore') SlackUtils = require('./slack_utils') LookerClient = require('./looker_client') ReplyContext = require('./reply_context') CLIQueryRunner = require('./repliers/cli_query_runner') LookFinder = require('./repliers/look_finder') DashboardQueryRunner = require('./repliers/dashboard_query_runner') QueryRunner = require('./repliers/query_runner') LookQueryRunner = require('./repliers/look_query_runner') versionChecker = require('./version_checker') ScheduleReceiver = require('./schedule_receiver') DataActionReceiver = require('./data_action_receiver') if process.env.DEV == "true" # Allow communicating with Lookers running on localhost with self-signed certificates process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 enableQueryCli = process.env.LOOKER_EXPERIMENTAL_QUERY_CLI == "true" customCommands = {} lookerConfig = if process.env.LOOKERS console.log("Using Looker information specified in LOOKERS environment variable.") JSON.parse(process.env.LOOKERS) else console.log("Using Looker information specified in individual environment variables.") [{ url: process.env.LOOKER_URL apiBaseUrl: process.env.LOOKER_API_BASE_URL clientId: process.env.LOOKER_API_3_CLIENT_ID clientSecret: process.env.LOOKER_API_3_CLIENT_SECRET customCommandSpaceId: process.env.LOOKER_CUSTOM_COMMAND_SPACE_ID webhookToken: process.env.LOOKER_WEBHOOK_TOKEN }] lookers = lookerConfig.map((looker) -> # Amazon S3 if process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = "#{path.join("/")}.png" unless blob.length error("No image data returned.", "S3 Error") return region = process.env.SLACKBOT_S3_BUCKET_REGION domain = if region && region != "us-east-1" "s3-#{process.env.SLACKBOT_S3_BUCKET_REGION}.amazonaws.com" else "s3.amazonaws.com" params = Bucket: process.env.SLACKBOT_S3_BUCKET Key: key Body: blob ACL: 'public-read' ContentType: "image/png" s3 = new AWS.S3( endpoint: new AWS.Endpoint(domain) ) s3.putObject params, (err, data) -> if err error(err, "S3 Error") else success("https://#{domain}/#{params.Bucket}/#{key}") # Azure if process.env.AZURE_STORAGE_ACCOUNT && process.env.AZURE_STORAGE_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = "#{path.join("/")}.png" unless blob.length error("No image data returned.", "Azure Error") return container = process.env.SLACKBOT_AZURE_CONTAINER options = ContentType: "image/png" wasb = new AzureStorage.createBlobService() wasb.createBlockBlobFromText container, key, blob, options, (err, result, response) -> if err error(err, "Azure Error") else storageAccount = process.env.AZURE_STORAGE_ACCOUNT success("https://#{storageAccount}.blob.core.windows.net/#{container}/#{key}") looker.refreshCommands = -> return unless looker.customCommandSpaceId console.log "Refreshing custom commands for #{looker.url}..." addCommandsForSpace = (space, category) -> for partialDashboard in space.dashboards looker.client.get("dashboards/#{partialDashboard.id}", (dashboard) -> command = name: dashboard.title.toLowerCase().trim() description: dashboard.description dashboard: dashboard looker: looker category: category command.hidden = category.toLowerCase().indexOf("[hidden]") != -1 || command.name.indexOf("[hidden]") != -1 command.helptext = "" dashboard_filters = dashboard.dashboard_filters || dashboard.filters if dashboard_filters?.length > 0 command.helptext = "<#{dashboard_filters[0].title.toLowerCase()}>" customCommands[command.name] = command console.log) looker.client.get("spaces/#{looker.customCommandSpaceId}", (space) -> addCommandsForSpace(space, "Shortcuts") looker.client.get("spaces/#{looker.customCommandSpaceId}/children", (children) -> for child in children addCommandsForSpace(child, child.name) console.log) console.log) looker.client = new LookerClient( baseUrl: looker.apiBaseUrl clientId: looker.clientId clientSecret: looker.clientSecret afterConnect: looker.refreshCommands ) looker ) refreshCommands = -> for looker in lookers looker.refreshCommands() newVersion = null checkVersion = -> versionChecker((version) -> newVersion = version ) checkVersion() # Update access tokens every half hour setInterval(-> for looker in lookers looker.client.fetchAccessToken() , 30 * 60 * 1000) # Check for new versions every day setInterval(-> checkVersion() , 24 * 60 * 60 * 1000) controller = Botkit.slackbot( debug: process.env.DEBUG_MODE == "true" ) defaultBot = controller.spawn({ token: process.env.SLACK_API_KEY, retry: 10, }).startRTM() defaultBot.api.team.info {}, (err, response) -> if err console.error(err) if response controller.saveTeam(response.team, -> console.log "Saved the team information..." ) else throw new Error("Could not connect to the Slack API.") controller.setupWebserver process.env.PORT || 3333, (err, expressWebserver) -> controller.createWebhookEndpoints(expressWebserver) ScheduleReceiver.listen(expressWebserver, defaultBot, lookers) DataActionReceiver.listen(expressWebserver, defaultBot, lookers) controller.on 'rtm_reconnect_failed', -> throw new Error("Failed to reconnect to the Slack RTM API.") controller.on 'ambient', (bot, message) -> checkMessage(bot, message) QUERY_REGEX = '(query|q|column|bar|line|pie|scatter|map)( )?(\\w+)? (.+)' FIND_REGEX = 'find (dashboard|look )? ?(.+)' controller.on "slash_command", (bot, message) -> if process.env.SLACK_SLASH_COMMAND_TOKEN && message.token && process.env.SLACK_SLASH_COMMAND_TOKEN == message.token processCommand(bot, message) else bot.replyPrivate(message, "This bot cannot accept slash commands until `SLACK_SLASH_COMMAND_TOKEN` is configured.") controller.on "direct_mention", (bot, message) -> message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message) controller.on "direct_message", (bot, message) -> if message.text.indexOf("/") != 0 message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message, true) processCommand = (bot, message, isDM = false) -> message.text = message.text.split('“').join('"') message.text = message.text.split('”').join('"') context = new ReplyContext(defaultBot, bot, message) if match = message.text.match(new RegExp(QUERY_REGEX)) && enableQueryCli message.match = match runCLI(context, message) else if match = message.text.match(new RegExp(FIND_REGEX)) message.match = match find(context, message) else shortCommands = _.sortBy(_.values(customCommands), (c) -> -c.name.length) matchedCommand = shortCommands.filter((c) -> message.text.toLowerCase().indexOf(c.name) == 0)?[0] if matchedCommand dashboard = matchedCommand.dashboard query = message.text[matchedCommand.name.length..].trim() message.text.toLowerCase().indexOf(matchedCommand.name) context.looker = matchedCommand.looker filters = {} dashboard_filters = dashboard.dashboard_filters || dashboard.filters for filter in dashboard_filters filters[filter.name] = query runner = new DashboardQueryRunner(context, matchedCommand.dashboard, filters) runner.start() else helpAttachments = [] groups = _.groupBy(customCommands, 'category') for groupName, groupCommmands of groups groupText = "" for command in _.sortBy(_.values(groupCommmands), "name") unless command.hidden groupText += "• *<#{command.looker.url}/dashboards/#{command.dashboard.id}|#{command.name}>* #{command.helptext}" if command.description groupText += " — _#{command.description}_" groupText += "\n" if groupText helpAttachments.push( title: groupName text: groupText color: "#64518A" mrkdwn_in: ["text"] ) defaultText = """ • *find* <look search term> — _Shows the top five Looks matching the search._ """ if enableQueryCli defaultText += "• *q* <model_name>/<view_name>/<field>[<filter>] — _Runs a custom query._\n" helpAttachments.push( title: "Built-in Commands" text: defaultText color: "#64518A" mrkdwn_in: ["text"] ) spaces = lookers.filter((l) -> l.customCommandSpaceId ).map((l) -> "<#{l.url}/spaces/#{l.customCommandSpaceId}|this space>" ).join(" or ") if spaces helpAttachments.push( text: "\n_To add your own commands, add a dashboard to #{spaces}._" mrkdwn_in: ["text"] ) if newVersion helpAttachments.push( text: "\n\n:scream: *<#{newVersion.html_url}|The Looker Slack integration is out of date! Version #{newVersion.tag_name} is now available.>* :scream:" color: "warning" mrkdwn_in: ["text"] ) if isDM && message.text.toLowerCase() != "help" context.replyPrivate(":crying_cat_face: I couldn't understand that command. You can use `help` to see the list of possible commands.") else context.replyPrivate({attachments: helpAttachments}) refreshCommands() if context.isSlashCommand() && !context.hasRepliedPrivately # Return 200 immediately for slash commands bot.res.setHeader 'Content-Type', 'application/json' bot.res.send JSON.stringify({response_type: "in_channel"}) runCLI = (context, message) -> [txt, type, ignore, lookerName, query] = message.match context.looker = if lookerName lookers.filter((l) -> l.url.indexOf(lookerName) != -1)[0] || lookers[0] else lookers[0] type = "data" if type == "q" || type == "query" runner = new CLIQueryRunner(context, query, type) runner.start() find = (context, message) -> [__, type, query] = message.match firstWord = query.split(" ")[0] foundLooker = lookers.filter((l) -> l.url.indexOf(firstWord) != -1)[0] if foundLooker words = query.split(" ") words.shift() query = words.join(" ") context.looker = foundLooker || lookers[0] runner = new LookFinder(context, type, query) runner.start() checkMessage = (bot, message) -> return if !message.text || message.subtype == "bot_message" return unless process.env.LOOKER_SLACKBOT_EXPAND_URLS == "true" # URL Expansion for url in getUrls(message.text).map((url) -> url.replace("%3E", "")) for looker in lookers # Starts with Looker base URL? if url.lastIndexOf(looker.url, 0) == 0 context = new ReplyContext(defaultBot, bot, message) context.looker = looker annotateLook(context, url, message, looker) annotateShareUrl(context, url, message, looker) annotateLook = (context, url, sourceMessage, looker) -> if matches = url.match(/\/looks\/([0-9]+)$/) console.log "Expanding Look URL #{url}" runner = new LookQueryRunner(context, matches[1]) runner.start() annotateShareUrl = (context, url, sourceMessage, looker) -> if matches = url.match(/\/x\/([A-Za-z0-9]+)$/) console.log "Expanding Share URL #{url}" runner = new QueryRunner(context, matches[1]) runner.start()
68992
Botkit = require('botkit') getUrls = require('get-urls') AWS = require('aws-sdk') AzureStorage = require('azure-storage') crypto = require('crypto') _ = require('underscore') SlackUtils = require('./slack_utils') LookerClient = require('./looker_client') ReplyContext = require('./reply_context') CLIQueryRunner = require('./repliers/cli_query_runner') LookFinder = require('./repliers/look_finder') DashboardQueryRunner = require('./repliers/dashboard_query_runner') QueryRunner = require('./repliers/query_runner') LookQueryRunner = require('./repliers/look_query_runner') versionChecker = require('./version_checker') ScheduleReceiver = require('./schedule_receiver') DataActionReceiver = require('./data_action_receiver') if process.env.DEV == "true" # Allow communicating with Lookers running on localhost with self-signed certificates process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 enableQueryCli = process.env.LOOKER_EXPERIMENTAL_QUERY_CLI == "true" customCommands = {} lookerConfig = if process.env.LOOKERS console.log("Using Looker information specified in LOOKERS environment variable.") JSON.parse(process.env.LOOKERS) else console.log("Using Looker information specified in individual environment variables.") [{ url: process.env.LOOKER_URL apiBaseUrl: process.env.LOOKER_API_BASE_URL clientId: process.env.LOOKER_API_3_CLIENT_ID clientSecret: process.env.LOOKER_API_3_CLIENT_SECRET customCommandSpaceId: process.env.LOOKER_CUSTOM_COMMAND_SPACE_ID webhookToken: process.env.LOOKER_WEBHOOK_TOKEN }] lookers = lookerConfig.map((looker) -> # Amazon S3 if process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = <KEY>" unless blob.length error("No image data returned.", "S3 Error") return region = process.env.SLACKBOT_S3_BUCKET_REGION domain = if region && region != "us-east-1" "s3-#{process.env.SLACKBOT_S3_BUCKET_REGION}.amazonaws.com" else "s3.amazonaws.com" params = Bucket: process.env.SLACKBOT_S3_BUCKET Key: key Body: blob ACL: 'public-read' ContentType: "image/png" s3 = new AWS.S3( endpoint: new AWS.Endpoint(domain) ) s3.putObject params, (err, data) -> if err error(err, "S3 Error") else success("https://#{domain}/#{params.Bucket}/#{key}") # Azure if process.env.AZURE_STORAGE_ACCOUNT && process.env.AZURE_STORAGE_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = <KEY> unless blob.length error("No image data returned.", "Azure Error") return container = process.env.SLACKBOT_AZURE_CONTAINER options = ContentType: "image/png" wasb = new AzureStorage.createBlobService() wasb.createBlockBlobFromText container, key, blob, options, (err, result, response) -> if err error(err, "Azure Error") else storageAccount = process.env.AZURE_STORAGE_ACCOUNT success("https://#{storageAccount}.blob.core.windows.net/#{container}/#{key}") looker.refreshCommands = -> return unless looker.customCommandSpaceId console.log "Refreshing custom commands for #{looker.url}..." addCommandsForSpace = (space, category) -> for partialDashboard in space.dashboards looker.client.get("dashboards/#{partialDashboard.id}", (dashboard) -> command = name: dashboard.title.toLowerCase().trim() description: dashboard.description dashboard: dashboard looker: looker category: category command.hidden = category.toLowerCase().indexOf("[hidden]") != -1 || command.name.indexOf("[hidden]") != -1 command.helptext = "" dashboard_filters = dashboard.dashboard_filters || dashboard.filters if dashboard_filters?.length > 0 command.helptext = "<#{dashboard_filters[0].title.toLowerCase()}>" customCommands[command.name] = command console.log) looker.client.get("spaces/#{looker.customCommandSpaceId}", (space) -> addCommandsForSpace(space, "Shortcuts") looker.client.get("spaces/#{looker.customCommandSpaceId}/children", (children) -> for child in children addCommandsForSpace(child, child.name) console.log) console.log) looker.client = new LookerClient( baseUrl: looker.apiBaseUrl clientId: looker.clientId clientSecret: looker.clientSecret afterConnect: looker.refreshCommands ) looker ) refreshCommands = -> for looker in lookers looker.refreshCommands() newVersion = null checkVersion = -> versionChecker((version) -> newVersion = version ) checkVersion() # Update access tokens every half hour setInterval(-> for looker in lookers looker.client.fetchAccessToken() , 30 * 60 * 1000) # Check for new versions every day setInterval(-> checkVersion() , 24 * 60 * 60 * 1000) controller = Botkit.slackbot( debug: process.env.DEBUG_MODE == "true" ) defaultBot = controller.spawn({ token: process.env.SLACK_API_KEY, retry: 10, }).startRTM() defaultBot.api.team.info {}, (err, response) -> if err console.error(err) if response controller.saveTeam(response.team, -> console.log "Saved the team information..." ) else throw new Error("Could not connect to the Slack API.") controller.setupWebserver process.env.PORT || 3333, (err, expressWebserver) -> controller.createWebhookEndpoints(expressWebserver) ScheduleReceiver.listen(expressWebserver, defaultBot, lookers) DataActionReceiver.listen(expressWebserver, defaultBot, lookers) controller.on 'rtm_reconnect_failed', -> throw new Error("Failed to reconnect to the Slack RTM API.") controller.on 'ambient', (bot, message) -> checkMessage(bot, message) QUERY_REGEX = '(query|q|column|bar|line|pie|scatter|map)( )?(\\w+)? (.+)' FIND_REGEX = 'find (dashboard|look )? ?(.+)' controller.on "slash_command", (bot, message) -> if process.env.SLACK_SLASH_COMMAND_TOKEN && message.token && process.env.SLACK_SLASH_COMMAND_TOKEN == message.token processCommand(bot, message) else bot.replyPrivate(message, "This bot cannot accept slash commands until `SLACK_SLASH_COMMAND_TOKEN` is configured.") controller.on "direct_mention", (bot, message) -> message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message) controller.on "direct_message", (bot, message) -> if message.text.indexOf("/") != 0 message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message, true) processCommand = (bot, message, isDM = false) -> message.text = message.text.split('“').join('"') message.text = message.text.split('”').join('"') context = new ReplyContext(defaultBot, bot, message) if match = message.text.match(new RegExp(QUERY_REGEX)) && enableQueryCli message.match = match runCLI(context, message) else if match = message.text.match(new RegExp(FIND_REGEX)) message.match = match find(context, message) else shortCommands = _.sortBy(_.values(customCommands), (c) -> -c.name.length) matchedCommand = shortCommands.filter((c) -> message.text.toLowerCase().indexOf(c.name) == 0)?[0] if matchedCommand dashboard = matchedCommand.dashboard query = message.text[matchedCommand.name.length..].trim() message.text.toLowerCase().indexOf(matchedCommand.name) context.looker = matchedCommand.looker filters = {} dashboard_filters = dashboard.dashboard_filters || dashboard.filters for filter in dashboard_filters filters[filter.name] = query runner = new DashboardQueryRunner(context, matchedCommand.dashboard, filters) runner.start() else helpAttachments = [] groups = _.groupBy(customCommands, 'category') for groupName, groupCommmands of groups groupText = "" for command in _.sortBy(_.values(groupCommmands), "name") unless command.hidden groupText += "• *<#{command.looker.url}/dashboards/#{command.dashboard.id}|#{command.name}>* #{command.helptext}" if command.description groupText += " — _#{command.description}_" groupText += "\n" if groupText helpAttachments.push( title: groupName text: groupText color: "#64518A" mrkdwn_in: ["text"] ) defaultText = """ • *find* <look search term> — _Shows the top five Looks matching the search._ """ if enableQueryCli defaultText += "• *q* <model_name>/<view_name>/<field>[<filter>] — _Runs a custom query._\n" helpAttachments.push( title: "Built-in Commands" text: defaultText color: "#64518A" mrkdwn_in: ["text"] ) spaces = lookers.filter((l) -> l.customCommandSpaceId ).map((l) -> "<#{l.url}/spaces/#{l.customCommandSpaceId}|this space>" ).join(" or ") if spaces helpAttachments.push( text: "\n_To add your own commands, add a dashboard to #{spaces}._" mrkdwn_in: ["text"] ) if newVersion helpAttachments.push( text: "\n\n:scream: *<#{newVersion.html_url}|The Looker Slack integration is out of date! Version #{newVersion.tag_name} is now available.>* :scream:" color: "warning" mrkdwn_in: ["text"] ) if isDM && message.text.toLowerCase() != "help" context.replyPrivate(":crying_cat_face: I couldn't understand that command. You can use `help` to see the list of possible commands.") else context.replyPrivate({attachments: helpAttachments}) refreshCommands() if context.isSlashCommand() && !context.hasRepliedPrivately # Return 200 immediately for slash commands bot.res.setHeader 'Content-Type', 'application/json' bot.res.send JSON.stringify({response_type: "in_channel"}) runCLI = (context, message) -> [txt, type, ignore, lookerName, query] = message.match context.looker = if lookerName lookers.filter((l) -> l.url.indexOf(lookerName) != -1)[0] || lookers[0] else lookers[0] type = "data" if type == "q" || type == "query" runner = new CLIQueryRunner(context, query, type) runner.start() find = (context, message) -> [__, type, query] = message.match firstWord = query.split(" ")[0] foundLooker = lookers.filter((l) -> l.url.indexOf(firstWord) != -1)[0] if foundLooker words = query.split(" ") words.shift() query = words.join(" ") context.looker = foundLooker || lookers[0] runner = new LookFinder(context, type, query) runner.start() checkMessage = (bot, message) -> return if !message.text || message.subtype == "bot_message" return unless process.env.LOOKER_SLACKBOT_EXPAND_URLS == "true" # URL Expansion for url in getUrls(message.text).map((url) -> url.replace("%3E", "")) for looker in lookers # Starts with Looker base URL? if url.lastIndexOf(looker.url, 0) == 0 context = new ReplyContext(defaultBot, bot, message) context.looker = looker annotateLook(context, url, message, looker) annotateShareUrl(context, url, message, looker) annotateLook = (context, url, sourceMessage, looker) -> if matches = url.match(/\/looks\/([0-9]+)$/) console.log "Expanding Look URL #{url}" runner = new LookQueryRunner(context, matches[1]) runner.start() annotateShareUrl = (context, url, sourceMessage, looker) -> if matches = url.match(/\/x\/([A-Za-z0-9]+)$/) console.log "Expanding Share URL #{url}" runner = new QueryRunner(context, matches[1]) runner.start()
true
Botkit = require('botkit') getUrls = require('get-urls') AWS = require('aws-sdk') AzureStorage = require('azure-storage') crypto = require('crypto') _ = require('underscore') SlackUtils = require('./slack_utils') LookerClient = require('./looker_client') ReplyContext = require('./reply_context') CLIQueryRunner = require('./repliers/cli_query_runner') LookFinder = require('./repliers/look_finder') DashboardQueryRunner = require('./repliers/dashboard_query_runner') QueryRunner = require('./repliers/query_runner') LookQueryRunner = require('./repliers/look_query_runner') versionChecker = require('./version_checker') ScheduleReceiver = require('./schedule_receiver') DataActionReceiver = require('./data_action_receiver') if process.env.DEV == "true" # Allow communicating with Lookers running on localhost with self-signed certificates process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 enableQueryCli = process.env.LOOKER_EXPERIMENTAL_QUERY_CLI == "true" customCommands = {} lookerConfig = if process.env.LOOKERS console.log("Using Looker information specified in LOOKERS environment variable.") JSON.parse(process.env.LOOKERS) else console.log("Using Looker information specified in individual environment variables.") [{ url: process.env.LOOKER_URL apiBaseUrl: process.env.LOOKER_API_BASE_URL clientId: process.env.LOOKER_API_3_CLIENT_ID clientSecret: process.env.LOOKER_API_3_CLIENT_SECRET customCommandSpaceId: process.env.LOOKER_CUSTOM_COMMAND_SPACE_ID webhookToken: process.env.LOOKER_WEBHOOK_TOKEN }] lookers = lookerConfig.map((looker) -> # Amazon S3 if process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = PI:KEY:<KEY>END_PI" unless blob.length error("No image data returned.", "S3 Error") return region = process.env.SLACKBOT_S3_BUCKET_REGION domain = if region && region != "us-east-1" "s3-#{process.env.SLACKBOT_S3_BUCKET_REGION}.amazonaws.com" else "s3.amazonaws.com" params = Bucket: process.env.SLACKBOT_S3_BUCKET Key: key Body: blob ACL: 'public-read' ContentType: "image/png" s3 = new AWS.S3( endpoint: new AWS.Endpoint(domain) ) s3.putObject params, (err, data) -> if err error(err, "S3 Error") else success("https://#{domain}/#{params.Bucket}/#{key}") # Azure if process.env.AZURE_STORAGE_ACCOUNT && process.env.AZURE_STORAGE_ACCESS_KEY looker.storeBlob = (blob, success, error) -> path = crypto.randomBytes(256).toString('hex').match(/.{1,128}/g) key = PI:KEY:<KEY>END_PI unless blob.length error("No image data returned.", "Azure Error") return container = process.env.SLACKBOT_AZURE_CONTAINER options = ContentType: "image/png" wasb = new AzureStorage.createBlobService() wasb.createBlockBlobFromText container, key, blob, options, (err, result, response) -> if err error(err, "Azure Error") else storageAccount = process.env.AZURE_STORAGE_ACCOUNT success("https://#{storageAccount}.blob.core.windows.net/#{container}/#{key}") looker.refreshCommands = -> return unless looker.customCommandSpaceId console.log "Refreshing custom commands for #{looker.url}..." addCommandsForSpace = (space, category) -> for partialDashboard in space.dashboards looker.client.get("dashboards/#{partialDashboard.id}", (dashboard) -> command = name: dashboard.title.toLowerCase().trim() description: dashboard.description dashboard: dashboard looker: looker category: category command.hidden = category.toLowerCase().indexOf("[hidden]") != -1 || command.name.indexOf("[hidden]") != -1 command.helptext = "" dashboard_filters = dashboard.dashboard_filters || dashboard.filters if dashboard_filters?.length > 0 command.helptext = "<#{dashboard_filters[0].title.toLowerCase()}>" customCommands[command.name] = command console.log) looker.client.get("spaces/#{looker.customCommandSpaceId}", (space) -> addCommandsForSpace(space, "Shortcuts") looker.client.get("spaces/#{looker.customCommandSpaceId}/children", (children) -> for child in children addCommandsForSpace(child, child.name) console.log) console.log) looker.client = new LookerClient( baseUrl: looker.apiBaseUrl clientId: looker.clientId clientSecret: looker.clientSecret afterConnect: looker.refreshCommands ) looker ) refreshCommands = -> for looker in lookers looker.refreshCommands() newVersion = null checkVersion = -> versionChecker((version) -> newVersion = version ) checkVersion() # Update access tokens every half hour setInterval(-> for looker in lookers looker.client.fetchAccessToken() , 30 * 60 * 1000) # Check for new versions every day setInterval(-> checkVersion() , 24 * 60 * 60 * 1000) controller = Botkit.slackbot( debug: process.env.DEBUG_MODE == "true" ) defaultBot = controller.spawn({ token: process.env.SLACK_API_KEY, retry: 10, }).startRTM() defaultBot.api.team.info {}, (err, response) -> if err console.error(err) if response controller.saveTeam(response.team, -> console.log "Saved the team information..." ) else throw new Error("Could not connect to the Slack API.") controller.setupWebserver process.env.PORT || 3333, (err, expressWebserver) -> controller.createWebhookEndpoints(expressWebserver) ScheduleReceiver.listen(expressWebserver, defaultBot, lookers) DataActionReceiver.listen(expressWebserver, defaultBot, lookers) controller.on 'rtm_reconnect_failed', -> throw new Error("Failed to reconnect to the Slack RTM API.") controller.on 'ambient', (bot, message) -> checkMessage(bot, message) QUERY_REGEX = '(query|q|column|bar|line|pie|scatter|map)( )?(\\w+)? (.+)' FIND_REGEX = 'find (dashboard|look )? ?(.+)' controller.on "slash_command", (bot, message) -> if process.env.SLACK_SLASH_COMMAND_TOKEN && message.token && process.env.SLACK_SLASH_COMMAND_TOKEN == message.token processCommand(bot, message) else bot.replyPrivate(message, "This bot cannot accept slash commands until `SLACK_SLASH_COMMAND_TOKEN` is configured.") controller.on "direct_mention", (bot, message) -> message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message) controller.on "direct_message", (bot, message) -> if message.text.indexOf("/") != 0 message.text = SlackUtils.stripMessageText(message.text) processCommand(bot, message, true) processCommand = (bot, message, isDM = false) -> message.text = message.text.split('“').join('"') message.text = message.text.split('”').join('"') context = new ReplyContext(defaultBot, bot, message) if match = message.text.match(new RegExp(QUERY_REGEX)) && enableQueryCli message.match = match runCLI(context, message) else if match = message.text.match(new RegExp(FIND_REGEX)) message.match = match find(context, message) else shortCommands = _.sortBy(_.values(customCommands), (c) -> -c.name.length) matchedCommand = shortCommands.filter((c) -> message.text.toLowerCase().indexOf(c.name) == 0)?[0] if matchedCommand dashboard = matchedCommand.dashboard query = message.text[matchedCommand.name.length..].trim() message.text.toLowerCase().indexOf(matchedCommand.name) context.looker = matchedCommand.looker filters = {} dashboard_filters = dashboard.dashboard_filters || dashboard.filters for filter in dashboard_filters filters[filter.name] = query runner = new DashboardQueryRunner(context, matchedCommand.dashboard, filters) runner.start() else helpAttachments = [] groups = _.groupBy(customCommands, 'category') for groupName, groupCommmands of groups groupText = "" for command in _.sortBy(_.values(groupCommmands), "name") unless command.hidden groupText += "• *<#{command.looker.url}/dashboards/#{command.dashboard.id}|#{command.name}>* #{command.helptext}" if command.description groupText += " — _#{command.description}_" groupText += "\n" if groupText helpAttachments.push( title: groupName text: groupText color: "#64518A" mrkdwn_in: ["text"] ) defaultText = """ • *find* <look search term> — _Shows the top five Looks matching the search._ """ if enableQueryCli defaultText += "• *q* <model_name>/<view_name>/<field>[<filter>] — _Runs a custom query._\n" helpAttachments.push( title: "Built-in Commands" text: defaultText color: "#64518A" mrkdwn_in: ["text"] ) spaces = lookers.filter((l) -> l.customCommandSpaceId ).map((l) -> "<#{l.url}/spaces/#{l.customCommandSpaceId}|this space>" ).join(" or ") if spaces helpAttachments.push( text: "\n_To add your own commands, add a dashboard to #{spaces}._" mrkdwn_in: ["text"] ) if newVersion helpAttachments.push( text: "\n\n:scream: *<#{newVersion.html_url}|The Looker Slack integration is out of date! Version #{newVersion.tag_name} is now available.>* :scream:" color: "warning" mrkdwn_in: ["text"] ) if isDM && message.text.toLowerCase() != "help" context.replyPrivate(":crying_cat_face: I couldn't understand that command. You can use `help` to see the list of possible commands.") else context.replyPrivate({attachments: helpAttachments}) refreshCommands() if context.isSlashCommand() && !context.hasRepliedPrivately # Return 200 immediately for slash commands bot.res.setHeader 'Content-Type', 'application/json' bot.res.send JSON.stringify({response_type: "in_channel"}) runCLI = (context, message) -> [txt, type, ignore, lookerName, query] = message.match context.looker = if lookerName lookers.filter((l) -> l.url.indexOf(lookerName) != -1)[0] || lookers[0] else lookers[0] type = "data" if type == "q" || type == "query" runner = new CLIQueryRunner(context, query, type) runner.start() find = (context, message) -> [__, type, query] = message.match firstWord = query.split(" ")[0] foundLooker = lookers.filter((l) -> l.url.indexOf(firstWord) != -1)[0] if foundLooker words = query.split(" ") words.shift() query = words.join(" ") context.looker = foundLooker || lookers[0] runner = new LookFinder(context, type, query) runner.start() checkMessage = (bot, message) -> return if !message.text || message.subtype == "bot_message" return unless process.env.LOOKER_SLACKBOT_EXPAND_URLS == "true" # URL Expansion for url in getUrls(message.text).map((url) -> url.replace("%3E", "")) for looker in lookers # Starts with Looker base URL? if url.lastIndexOf(looker.url, 0) == 0 context = new ReplyContext(defaultBot, bot, message) context.looker = looker annotateLook(context, url, message, looker) annotateShareUrl(context, url, message, looker) annotateLook = (context, url, sourceMessage, looker) -> if matches = url.match(/\/looks\/([0-9]+)$/) console.log "Expanding Look URL #{url}" runner = new LookQueryRunner(context, matches[1]) runner.start() annotateShareUrl = (context, url, sourceMessage, looker) -> if matches = url.match(/\/x\/([A-Za-z0-9]+)$/) console.log "Expanding Share URL #{url}" runner = new QueryRunner(context, matches[1]) runner.start()
[ { "context": "###\n@author sewerganger <wanghan9423@outlook.com>\n@copyright random\n@vers", "end": 23, "score": 0.9975939989089966, "start": 12, "tag": "USERNAME", "value": "sewerganger" }, { "context": "###\n@author sewerganger <wanghan9423@outlook.com>\n@copyright random\n@version 0.01\n@license MIT\n@de", "end": 48, "score": 0.9999195337295532, "start": 25, "tag": "EMAIL", "value": "wanghan9423@outlook.com" } ]
src/app.coffee
sewerlabour/ggit-gitgui-tool-master
0
### @author sewerganger <wanghan9423@outlook.com> @copyright random @version 0.01 @license MIT @description build a git gui tool on broswer ### express = require 'express' { setStaticPath, setPostData, setOpenIndex } = require './config/config' app = express() setStaticPath app setPostData app setOpenIndex app module.exports = app
224182
### @author sewerganger <<EMAIL>> @copyright random @version 0.01 @license MIT @description build a git gui tool on broswer ### express = require 'express' { setStaticPath, setPostData, setOpenIndex } = require './config/config' app = express() setStaticPath app setPostData app setOpenIndex app module.exports = app
true
### @author sewerganger <PI:EMAIL:<EMAIL>END_PI> @copyright random @version 0.01 @license MIT @description build a git gui tool on broswer ### express = require 'express' { setStaticPath, setPostData, setOpenIndex } = require './config/config' app = express() setStaticPath app setPostData app setOpenIndex app module.exports = app
[ { "context": " filePath: mp3\n host: \"127.0.0.1\"\n port: sa_info.source_port\n ", "end": 1127, "score": 0.9997307658195496, "start": 1118, "tag": "IP_ADDRESS", "value": "127.0.0.1" }, { "context": " sa_info.source_port\n password: sa_info.source_password\n stream: sa_info.st", "end": 1204, "score": 0.6304687857627869, "start": 1197, "tag": "PASSWORD", "value": "sa_info" }, { "context": "meout 4000\n listener = new StreamListener \"127.0.0.1\", sa_info.port, sa_info.stream_key\n\n liste", "end": 1616, "score": 0.9997235536575317, "start": 1607, "tag": "IP_ADDRESS", "value": "127.0.0.1" } ]
test/standalone.coffee
VandeurenGlenn/StreamMachine
0
StandaloneHelper = require "./helpers/standalone" StreamListener = $src "util/stream_listener" IcecastSource = $src "util/icecast_source" mp3 = $file "mp3/mp3-44100-128-s.mp3" debug = require("debug")("sm:tests:standalone") request = require "request" describe "Standalone Mode", -> sa_info = null standalone = null before (done) -> StandaloneHelper.startStandalone 'mp3', (err,info) -> throw err if err sa_info = info standalone = info.standalone done() it "should map slave stream sources to master streams", (done) -> standalone.master.once_configured -> expect(standalone.master.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams[sa_info.stream_key].source).to.eql standalone.master.streams[sa_info.stream_key] done() it "should accept a source", (done) -> source = new IcecastSource format: "mp3" filePath: mp3 host: "127.0.0.1" port: sa_info.source_port password: sa_info.source_password stream: sa_info.stream_key source.start (err) -> throw err if err status = standalone.master.streams[sa_info.stream_key].status() expect(status.source.sources).to.have.length 1 done() it "should accept a listener and feed it data", (done) -> this.timeout 4000 listener = new StreamListener "127.0.0.1", sa_info.port, sa_info.stream_key listener.connect (err) => throw err if err listener.once "bytes", -> listener.disconnect() done() it "should accept an API call to /streams", (done) -> request.get url:"#{sa_info.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql sa_info.stream_key done()
53371
StandaloneHelper = require "./helpers/standalone" StreamListener = $src "util/stream_listener" IcecastSource = $src "util/icecast_source" mp3 = $file "mp3/mp3-44100-128-s.mp3" debug = require("debug")("sm:tests:standalone") request = require "request" describe "Standalone Mode", -> sa_info = null standalone = null before (done) -> StandaloneHelper.startStandalone 'mp3', (err,info) -> throw err if err sa_info = info standalone = info.standalone done() it "should map slave stream sources to master streams", (done) -> standalone.master.once_configured -> expect(standalone.master.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams[sa_info.stream_key].source).to.eql standalone.master.streams[sa_info.stream_key] done() it "should accept a source", (done) -> source = new IcecastSource format: "mp3" filePath: mp3 host: "127.0.0.1" port: sa_info.source_port password: <PASSWORD>.source_password stream: sa_info.stream_key source.start (err) -> throw err if err status = standalone.master.streams[sa_info.stream_key].status() expect(status.source.sources).to.have.length 1 done() it "should accept a listener and feed it data", (done) -> this.timeout 4000 listener = new StreamListener "127.0.0.1", sa_info.port, sa_info.stream_key listener.connect (err) => throw err if err listener.once "bytes", -> listener.disconnect() done() it "should accept an API call to /streams", (done) -> request.get url:"#{sa_info.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql sa_info.stream_key done()
true
StandaloneHelper = require "./helpers/standalone" StreamListener = $src "util/stream_listener" IcecastSource = $src "util/icecast_source" mp3 = $file "mp3/mp3-44100-128-s.mp3" debug = require("debug")("sm:tests:standalone") request = require "request" describe "Standalone Mode", -> sa_info = null standalone = null before (done) -> StandaloneHelper.startStandalone 'mp3', (err,info) -> throw err if err sa_info = info standalone = info.standalone done() it "should map slave stream sources to master streams", (done) -> standalone.master.once_configured -> expect(standalone.master.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams).to.have.key sa_info.stream_key expect(standalone.slave.streams[sa_info.stream_key].source).to.eql standalone.master.streams[sa_info.stream_key] done() it "should accept a source", (done) -> source = new IcecastSource format: "mp3" filePath: mp3 host: "127.0.0.1" port: sa_info.source_port password: PI:PASSWORD:<PASSWORD>END_PI.source_password stream: sa_info.stream_key source.start (err) -> throw err if err status = standalone.master.streams[sa_info.stream_key].status() expect(status.source.sources).to.have.length 1 done() it "should accept a listener and feed it data", (done) -> this.timeout 4000 listener = new StreamListener "127.0.0.1", sa_info.port, sa_info.stream_key listener.connect (err) => throw err if err listener.once "bytes", -> listener.disconnect() done() it "should accept an API call to /streams", (done) -> request.get url:"#{sa_info.api_uri}/streams", json:true, (err,res,json) -> throw err if err expect(res.statusCode).to.be.eql 200 expect(json).to.be.instanceof Array expect(json).to.have.length 1 expect(json[0].key).to.eql sa_info.stream_key done()
[ { "context": "\n\t\t\t},\n\t\t\tusername: {\n\t\t\t\tdescription: 'Enter your username'\n\t\t\t\trequired: true\n\t\t\t\ttype: 'string'\n\t\t\t},\n\t\t\tp", "end": 368, "score": 0.5834709405899048, "start": 360, "tag": "USERNAME", "value": "username" }, { "context": ": {\n\t\t\t\temail: result.email,\n\t\t\t\tusername: result.username,\n\t\t\t\tpassword: result.password\n\t\t\t},\n\t\t\turl: crys", "end": 1061, "score": 0.6671806573867798, "start": 1053, "tag": "USERNAME", "value": "username" }, { "context": "mail,\n\t\t\t\tusername: result.username,\n\t\t\t\tpassword: result.password\n\t\t\t},\n\t\t\turl: crystal.url 'api', 'users'\n\t\t}, (er", "end": 1092, "score": 0.9990186095237732, "start": 1077, "tag": "PASSWORD", "value": "result.password" } ]
src/autocode/signup.coffee
crystal/autocode-js
92
prompt = require 'prompt' request = require 'request' signup = () -> console.log "Ready to signup? Let's go!" crystal = this prompt.message = '' prompt.delimiter = '' prompt.start() prompt.get { properties: { email: { description: 'Enter your email' required: true type: 'string' }, username: { description: 'Enter your username' required: true type: 'string' }, password: { description: 'Enter your password' hidden: true required: true type: 'string' } } }, (err, result) -> # validate result if !result throw new Error 'Email/Username/Password are required.' # validate email if !result.email throw new Error 'Email is required.' # validate username if !result.username throw new Error 'Username is required.' # validate password if !result.password throw new Error 'Password is required.' # cache username crystal.cache 'username', result.username request.post { formData: { email: result.email, username: result.username, password: result.password }, url: crystal.url 'api', 'users' }, (err, resp, body) -> if !err && resp.statusCode == 200 console.log "Thanks for signing up!" else if body.match 'duplicate' console.log "Username already in use. Please try again!" else console.log "Unable to signup." module.exports = signup
154921
prompt = require 'prompt' request = require 'request' signup = () -> console.log "Ready to signup? Let's go!" crystal = this prompt.message = '' prompt.delimiter = '' prompt.start() prompt.get { properties: { email: { description: 'Enter your email' required: true type: 'string' }, username: { description: 'Enter your username' required: true type: 'string' }, password: { description: 'Enter your password' hidden: true required: true type: 'string' } } }, (err, result) -> # validate result if !result throw new Error 'Email/Username/Password are required.' # validate email if !result.email throw new Error 'Email is required.' # validate username if !result.username throw new Error 'Username is required.' # validate password if !result.password throw new Error 'Password is required.' # cache username crystal.cache 'username', result.username request.post { formData: { email: result.email, username: result.username, password: <PASSWORD> }, url: crystal.url 'api', 'users' }, (err, resp, body) -> if !err && resp.statusCode == 200 console.log "Thanks for signing up!" else if body.match 'duplicate' console.log "Username already in use. Please try again!" else console.log "Unable to signup." module.exports = signup
true
prompt = require 'prompt' request = require 'request' signup = () -> console.log "Ready to signup? Let's go!" crystal = this prompt.message = '' prompt.delimiter = '' prompt.start() prompt.get { properties: { email: { description: 'Enter your email' required: true type: 'string' }, username: { description: 'Enter your username' required: true type: 'string' }, password: { description: 'Enter your password' hidden: true required: true type: 'string' } } }, (err, result) -> # validate result if !result throw new Error 'Email/Username/Password are required.' # validate email if !result.email throw new Error 'Email is required.' # validate username if !result.username throw new Error 'Username is required.' # validate password if !result.password throw new Error 'Password is required.' # cache username crystal.cache 'username', result.username request.post { formData: { email: result.email, username: result.username, password: PI:PASSWORD:<PASSWORD>END_PI }, url: crystal.url 'api', 'users' }, (err, resp, body) -> if !err && resp.statusCode == 200 console.log "Thanks for signing up!" else if body.match 'duplicate' console.log "Username already in use. Please try again!" else console.log "Unable to signup." module.exports = signup
[ { "context": "# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public Li", "end": 43, "score": 0.9999101758003235, "start": 29, "tag": "EMAIL", "value": "contact@ppy.sh" } ]
resources/assets/coffee/_classes/line-chart.coffee
osu-katakuna/osu-katakuna-web
5
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. bn = 'line-chart' class @LineChart constructor: (area, @options = {}) -> @margins = top: 20 right: 20 bottom: 50 left: 60 _.assign @margins, @options.margins @id = Math.floor(Math.random() * 1000) @options.scales ?= {} @options.scales.x ?= d3.scaleTime() @options.scales.y ?= d3.scaleLinear() @options.circleLine ?= false @options.axisLabels ?= true @area = d3.select(area) .classed osu.classWithModifiers(bn, @options.modifiers), true @svg = @area.append 'svg' @svgWrapper = @svg.append 'g' .classed "#{bn}__wrapper", true if @options.axisLabels @svgXAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--x", true @svgYAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--y", true @svgLine = @svgWrapper.append 'path' .classed "#{bn}__line", true @hoverArea = @area.append 'div' .classed "#{bn}__hover-area", true .on 'mouseout', @hoverEnd .on 'mousemove', @onHover .on 'drag', @onHover for own pos, size of @margins @hoverArea.style pos, "#{size}px" @hover = @hoverArea.append 'div' .classed "#{bn}__hover", true .attr 'data-visibility', 'hidden' if @options.circleLine @hoverLine = @hover.append 'div' .classed "#{bn}__hover-line", true @hoverCircle = @hover.append 'div' .classed "#{bn}__hover-circle", true @hoverInfoBox = @hover.append 'div' .classed "#{bn}__hover-info-box", true .attr 'data-float', 'left' @hoverInfoBoxX = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--x", true @hoverInfoBoxY = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--y", true if @options.axisLabels @xAxis = d3.axisBottom() .tickSizeOuter 0 .tickPadding 5 @yAxis = d3.axisLeft().ticks(4) @line = d3.line() .curve(@options.curve ? d3.curveMonotoneX) loadData: (data) => @data = data @svgLine.datum data @resize() setDimensions: => areaDims = @area.node().getBoundingClientRect() return false unless areaDims.width > 0 && areaDims.height > 0 @width = areaDims.width - (@margins.left + @margins.right) @height = areaDims.height - (@margins.top + @margins.bottom) true setScalesRange: => @options.scales.x .range [0, @width] .domain @options.domains?.x || d3.extent(@data, (d) => d.x) @options.scales.y .range [@height, 0] .domain @options.domains?.y || d3.extent(@data, (d) => d.y) setAxesSize: => return unless @options.axisLabels @xAxis .scale @options.scales.x .tickSizeInner -@height .ticks @options.ticks?.x ? 15 .tickFormat @options.formats.x .tickValues @options.tickValues?.x @yAxis .scale @options.scales.y .tickSizeInner -@width .tickFormat @options.formats.y .tickValues @options.tickValues?.y setLineSize: => @line .x (d) => @options.scales.x d.x .y (d) => @options.scales.y d.y setSvgSize: => @svg .attr 'width', @width + (@margins.left + @margins.right) .attr 'height', @height + (@margins.top + @margins.bottom) setWrapperSize: => @svgWrapper .attr 'transform', "translate(#{@margins.left}, #{@margins.top})" drawAxes: => return unless @options.axisLabels @svgXAxis .transition() .attr 'transform', "translate(0, #{@height})" .call @xAxis @svgYAxis .transition() .call @yAxis @svgXAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgYAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgXAxis.selectAll '.domain' .classed 'u-hidden', true @svgYAxis.selectAll '.domain' .classed 'u-hidden', true @svgXAxis.selectAll 'text' .style 'text-anchor', 'start' .attr 'transform', 'rotate(45) translate(5, 0)' .classed "#{bn}__tick-text #{bn}__tick-text--strong", true @svgYAxis.selectAll 'text' .classed "#{bn}__tick-text", true drawLine: => @svgLine .transition() .attr 'd', @line hoverEnd: => Fade.out @hover.node() hoverReset: => style = (key, value) => elem.style(key, value) for elem in [@hoverLine, @hoverCircle] # Immediately hide so its position can be invisibly reset. style 'transition', 'none' @hoverEnd() style 'transform', null # Out of current loop so browser doesn't optimize out the styling # and ignores previously set transition override. Timeout.set 0, => style 'transition', null hoverStart: => Fade.in @hover.node() lookupIndexFromX: (x) => d3.bisector((d) => d.x).left @data, x onHover: => x = @options.scales.x.invert(d3.mouse(@hoverArea.node())[0]) i = @lookupIndexFromX x return unless i return unless @data[i - 1] && @data[i] @hoverStart() Timeout.clear @_autoEndHover @_autoEndHover = Timeout.set(3000, @hoverEnd) if osu.isMobile() d = if x - @data[i - 1].x <= @data[i].x - x then @data[i - 1] else @data[i] coords = ['x', 'y'].map (axis) => # rounded to avoid blurry positioning "#{Math.round(@options.scales[axis](d[axis]))}px" @hoverLine.style 'transform', "translateX(#{coords[0]})" @hoverCircle.style 'transform', "translate(#{coords.join(',')})" @hoverInfoBoxX.html (@options.infoBoxFormats?.x ? @options.formats.x)(d.x) @hoverInfoBoxY.html (@options.infoBoxFormats?.y ? @options.formats.y)(d.y) mouseX = d3.event.clientX if mouseX? infoBoxRect = @hoverInfoBox.node().getBoundingClientRect() if @hoverInfoBox.attr('data-float') == 'right' if mouseX > infoBoxRect.left @hoverInfoBox.attr('data-float', 'left') else if mouseX < infoBoxRect.right @hoverInfoBox.attr('data-float', 'right') resize: => hasDimensions = @setDimensions() return unless hasDimensions @setScalesRange() @setSvgSize() @setWrapperSize() @setAxesSize() @setLineSize() @drawAxes() @drawLine() @hoverReset()
220522
# Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. bn = 'line-chart' class @LineChart constructor: (area, @options = {}) -> @margins = top: 20 right: 20 bottom: 50 left: 60 _.assign @margins, @options.margins @id = Math.floor(Math.random() * 1000) @options.scales ?= {} @options.scales.x ?= d3.scaleTime() @options.scales.y ?= d3.scaleLinear() @options.circleLine ?= false @options.axisLabels ?= true @area = d3.select(area) .classed osu.classWithModifiers(bn, @options.modifiers), true @svg = @area.append 'svg' @svgWrapper = @svg.append 'g' .classed "#{bn}__wrapper", true if @options.axisLabels @svgXAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--x", true @svgYAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--y", true @svgLine = @svgWrapper.append 'path' .classed "#{bn}__line", true @hoverArea = @area.append 'div' .classed "#{bn}__hover-area", true .on 'mouseout', @hoverEnd .on 'mousemove', @onHover .on 'drag', @onHover for own pos, size of @margins @hoverArea.style pos, "#{size}px" @hover = @hoverArea.append 'div' .classed "#{bn}__hover", true .attr 'data-visibility', 'hidden' if @options.circleLine @hoverLine = @hover.append 'div' .classed "#{bn}__hover-line", true @hoverCircle = @hover.append 'div' .classed "#{bn}__hover-circle", true @hoverInfoBox = @hover.append 'div' .classed "#{bn}__hover-info-box", true .attr 'data-float', 'left' @hoverInfoBoxX = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--x", true @hoverInfoBoxY = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--y", true if @options.axisLabels @xAxis = d3.axisBottom() .tickSizeOuter 0 .tickPadding 5 @yAxis = d3.axisLeft().ticks(4) @line = d3.line() .curve(@options.curve ? d3.curveMonotoneX) loadData: (data) => @data = data @svgLine.datum data @resize() setDimensions: => areaDims = @area.node().getBoundingClientRect() return false unless areaDims.width > 0 && areaDims.height > 0 @width = areaDims.width - (@margins.left + @margins.right) @height = areaDims.height - (@margins.top + @margins.bottom) true setScalesRange: => @options.scales.x .range [0, @width] .domain @options.domains?.x || d3.extent(@data, (d) => d.x) @options.scales.y .range [@height, 0] .domain @options.domains?.y || d3.extent(@data, (d) => d.y) setAxesSize: => return unless @options.axisLabels @xAxis .scale @options.scales.x .tickSizeInner -@height .ticks @options.ticks?.x ? 15 .tickFormat @options.formats.x .tickValues @options.tickValues?.x @yAxis .scale @options.scales.y .tickSizeInner -@width .tickFormat @options.formats.y .tickValues @options.tickValues?.y setLineSize: => @line .x (d) => @options.scales.x d.x .y (d) => @options.scales.y d.y setSvgSize: => @svg .attr 'width', @width + (@margins.left + @margins.right) .attr 'height', @height + (@margins.top + @margins.bottom) setWrapperSize: => @svgWrapper .attr 'transform', "translate(#{@margins.left}, #{@margins.top})" drawAxes: => return unless @options.axisLabels @svgXAxis .transition() .attr 'transform', "translate(0, #{@height})" .call @xAxis @svgYAxis .transition() .call @yAxis @svgXAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgYAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgXAxis.selectAll '.domain' .classed 'u-hidden', true @svgYAxis.selectAll '.domain' .classed 'u-hidden', true @svgXAxis.selectAll 'text' .style 'text-anchor', 'start' .attr 'transform', 'rotate(45) translate(5, 0)' .classed "#{bn}__tick-text #{bn}__tick-text--strong", true @svgYAxis.selectAll 'text' .classed "#{bn}__tick-text", true drawLine: => @svgLine .transition() .attr 'd', @line hoverEnd: => Fade.out @hover.node() hoverReset: => style = (key, value) => elem.style(key, value) for elem in [@hoverLine, @hoverCircle] # Immediately hide so its position can be invisibly reset. style 'transition', 'none' @hoverEnd() style 'transform', null # Out of current loop so browser doesn't optimize out the styling # and ignores previously set transition override. Timeout.set 0, => style 'transition', null hoverStart: => Fade.in @hover.node() lookupIndexFromX: (x) => d3.bisector((d) => d.x).left @data, x onHover: => x = @options.scales.x.invert(d3.mouse(@hoverArea.node())[0]) i = @lookupIndexFromX x return unless i return unless @data[i - 1] && @data[i] @hoverStart() Timeout.clear @_autoEndHover @_autoEndHover = Timeout.set(3000, @hoverEnd) if osu.isMobile() d = if x - @data[i - 1].x <= @data[i].x - x then @data[i - 1] else @data[i] coords = ['x', 'y'].map (axis) => # rounded to avoid blurry positioning "#{Math.round(@options.scales[axis](d[axis]))}px" @hoverLine.style 'transform', "translateX(#{coords[0]})" @hoverCircle.style 'transform', "translate(#{coords.join(',')})" @hoverInfoBoxX.html (@options.infoBoxFormats?.x ? @options.formats.x)(d.x) @hoverInfoBoxY.html (@options.infoBoxFormats?.y ? @options.formats.y)(d.y) mouseX = d3.event.clientX if mouseX? infoBoxRect = @hoverInfoBox.node().getBoundingClientRect() if @hoverInfoBox.attr('data-float') == 'right' if mouseX > infoBoxRect.left @hoverInfoBox.attr('data-float', 'left') else if mouseX < infoBoxRect.right @hoverInfoBox.attr('data-float', 'right') resize: => hasDimensions = @setDimensions() return unless hasDimensions @setScalesRange() @setSvgSize() @setWrapperSize() @setAxesSize() @setLineSize() @drawAxes() @drawLine() @hoverReset()
true
# Copyright (c) ppy Pty Ltd <PI:EMAIL:<EMAIL>END_PI>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. bn = 'line-chart' class @LineChart constructor: (area, @options = {}) -> @margins = top: 20 right: 20 bottom: 50 left: 60 _.assign @margins, @options.margins @id = Math.floor(Math.random() * 1000) @options.scales ?= {} @options.scales.x ?= d3.scaleTime() @options.scales.y ?= d3.scaleLinear() @options.circleLine ?= false @options.axisLabels ?= true @area = d3.select(area) .classed osu.classWithModifiers(bn, @options.modifiers), true @svg = @area.append 'svg' @svgWrapper = @svg.append 'g' .classed "#{bn}__wrapper", true if @options.axisLabels @svgXAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--x", true @svgYAxis = @svgWrapper.append 'g' .classed "#{bn}__axis #{bn}__axis--y", true @svgLine = @svgWrapper.append 'path' .classed "#{bn}__line", true @hoverArea = @area.append 'div' .classed "#{bn}__hover-area", true .on 'mouseout', @hoverEnd .on 'mousemove', @onHover .on 'drag', @onHover for own pos, size of @margins @hoverArea.style pos, "#{size}px" @hover = @hoverArea.append 'div' .classed "#{bn}__hover", true .attr 'data-visibility', 'hidden' if @options.circleLine @hoverLine = @hover.append 'div' .classed "#{bn}__hover-line", true @hoverCircle = @hover.append 'div' .classed "#{bn}__hover-circle", true @hoverInfoBox = @hover.append 'div' .classed "#{bn}__hover-info-box", true .attr 'data-float', 'left' @hoverInfoBoxX = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--x", true @hoverInfoBoxY = @hoverInfoBox.append 'div' .classed "#{bn}__hover-info-box-text #{bn}__hover-info-box-text--y", true if @options.axisLabels @xAxis = d3.axisBottom() .tickSizeOuter 0 .tickPadding 5 @yAxis = d3.axisLeft().ticks(4) @line = d3.line() .curve(@options.curve ? d3.curveMonotoneX) loadData: (data) => @data = data @svgLine.datum data @resize() setDimensions: => areaDims = @area.node().getBoundingClientRect() return false unless areaDims.width > 0 && areaDims.height > 0 @width = areaDims.width - (@margins.left + @margins.right) @height = areaDims.height - (@margins.top + @margins.bottom) true setScalesRange: => @options.scales.x .range [0, @width] .domain @options.domains?.x || d3.extent(@data, (d) => d.x) @options.scales.y .range [@height, 0] .domain @options.domains?.y || d3.extent(@data, (d) => d.y) setAxesSize: => return unless @options.axisLabels @xAxis .scale @options.scales.x .tickSizeInner -@height .ticks @options.ticks?.x ? 15 .tickFormat @options.formats.x .tickValues @options.tickValues?.x @yAxis .scale @options.scales.y .tickSizeInner -@width .tickFormat @options.formats.y .tickValues @options.tickValues?.y setLineSize: => @line .x (d) => @options.scales.x d.x .y (d) => @options.scales.y d.y setSvgSize: => @svg .attr 'width', @width + (@margins.left + @margins.right) .attr 'height', @height + (@margins.top + @margins.bottom) setWrapperSize: => @svgWrapper .attr 'transform', "translate(#{@margins.left}, #{@margins.top})" drawAxes: => return unless @options.axisLabels @svgXAxis .transition() .attr 'transform', "translate(0, #{@height})" .call @xAxis @svgYAxis .transition() .call @yAxis @svgXAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgYAxis.selectAll '.tick line' .classed "#{bn}__tick-line #{bn}__tick-line--default", true @svgXAxis.selectAll '.domain' .classed 'u-hidden', true @svgYAxis.selectAll '.domain' .classed 'u-hidden', true @svgXAxis.selectAll 'text' .style 'text-anchor', 'start' .attr 'transform', 'rotate(45) translate(5, 0)' .classed "#{bn}__tick-text #{bn}__tick-text--strong", true @svgYAxis.selectAll 'text' .classed "#{bn}__tick-text", true drawLine: => @svgLine .transition() .attr 'd', @line hoverEnd: => Fade.out @hover.node() hoverReset: => style = (key, value) => elem.style(key, value) for elem in [@hoverLine, @hoverCircle] # Immediately hide so its position can be invisibly reset. style 'transition', 'none' @hoverEnd() style 'transform', null # Out of current loop so browser doesn't optimize out the styling # and ignores previously set transition override. Timeout.set 0, => style 'transition', null hoverStart: => Fade.in @hover.node() lookupIndexFromX: (x) => d3.bisector((d) => d.x).left @data, x onHover: => x = @options.scales.x.invert(d3.mouse(@hoverArea.node())[0]) i = @lookupIndexFromX x return unless i return unless @data[i - 1] && @data[i] @hoverStart() Timeout.clear @_autoEndHover @_autoEndHover = Timeout.set(3000, @hoverEnd) if osu.isMobile() d = if x - @data[i - 1].x <= @data[i].x - x then @data[i - 1] else @data[i] coords = ['x', 'y'].map (axis) => # rounded to avoid blurry positioning "#{Math.round(@options.scales[axis](d[axis]))}px" @hoverLine.style 'transform', "translateX(#{coords[0]})" @hoverCircle.style 'transform', "translate(#{coords.join(',')})" @hoverInfoBoxX.html (@options.infoBoxFormats?.x ? @options.formats.x)(d.x) @hoverInfoBoxY.html (@options.infoBoxFormats?.y ? @options.formats.y)(d.y) mouseX = d3.event.clientX if mouseX? infoBoxRect = @hoverInfoBox.node().getBoundingClientRect() if @hoverInfoBox.attr('data-float') == 'right' if mouseX > infoBoxRect.left @hoverInfoBox.attr('data-float', 'left') else if mouseX < infoBoxRect.right @hoverInfoBox.attr('data-float', 'right') resize: => hasDimensions = @setDimensions() return unless hasDimensions @setScalesRange() @setSvgSize() @setWrapperSize() @setAxesSize() @setLineSize() @drawAxes() @drawLine() @hoverReset()
[ { "context": "# Copyright © 2014–6 Brad Ackerman.\n#\n# Licensed under the Apache License, Version 2", "end": 34, "score": 0.9998356103897095, "start": 21, "tag": "NAME", "value": "Brad Ackerman" } ]
assets/coffee/settings.coffee
backerman/eveindy
2
# Copyright © 2014–6 Brad Ackerman. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. angular.module 'eveindy' .controller 'SettingsCtrl', [ 'Session', '$scope' class SettingsCtrl constructor: (@Session, @$scope) -> @apikeys = {} @newkey = {} @forms = {} @alerts = [] @$scope.$on 'login-status', @_updateLoginStatus if @Session.authenticated @_updateLoginStatus null, true _updateLoginStatus: (_, isLoggedIn) => @authenticated = isLoggedIn @getApiKeys() getApiKeys: () -> @apikeys = @Session.apikeys deleteKey: (keyID) => @Session.deleteKey keyID addKey: () => @Session.addKey @newkey .then (response) => @newkey = {} # Ignore nonexistent FormController (for tests) @forms.newkey?.$setPristine() , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{@newkey.id}." @newkey = {} @forms.newkey?.$setPristine() refreshKey: (key) -> @Session.refreshKey key .then (_) -> #we don't care 42 , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{key.id}." closeAlert: (idx) -> # Remove the specified alert from the array. @alerts.splice(idx, 1) ]
202514
# Copyright © 2014–6 <NAME>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. angular.module 'eveindy' .controller 'SettingsCtrl', [ 'Session', '$scope' class SettingsCtrl constructor: (@Session, @$scope) -> @apikeys = {} @newkey = {} @forms = {} @alerts = [] @$scope.$on 'login-status', @_updateLoginStatus if @Session.authenticated @_updateLoginStatus null, true _updateLoginStatus: (_, isLoggedIn) => @authenticated = isLoggedIn @getApiKeys() getApiKeys: () -> @apikeys = @Session.apikeys deleteKey: (keyID) => @Session.deleteKey keyID addKey: () => @Session.addKey @newkey .then (response) => @newkey = {} # Ignore nonexistent FormController (for tests) @forms.newkey?.$setPristine() , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{@newkey.id}." @newkey = {} @forms.newkey?.$setPristine() refreshKey: (key) -> @Session.refreshKey key .then (_) -> #we don't care 42 , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{key.id}." closeAlert: (idx) -> # Remove the specified alert from the array. @alerts.splice(idx, 1) ]
true
# Copyright © 2014–6 PI:NAME:<NAME>END_PI. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. angular.module 'eveindy' .controller 'SettingsCtrl', [ 'Session', '$scope' class SettingsCtrl constructor: (@Session, @$scope) -> @apikeys = {} @newkey = {} @forms = {} @alerts = [] @$scope.$on 'login-status', @_updateLoginStatus if @Session.authenticated @_updateLoginStatus null, true _updateLoginStatus: (_, isLoggedIn) => @authenticated = isLoggedIn @getApiKeys() getApiKeys: () -> @apikeys = @Session.apikeys deleteKey: (keyID) => @Session.deleteKey keyID addKey: () => @Session.addKey @newkey .then (response) => @newkey = {} # Ignore nonexistent FormController (for tests) @forms.newkey?.$setPristine() , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{@newkey.id}." @newkey = {} @forms.newkey?.$setPristine() refreshKey: (key) -> @Session.refreshKey key .then (_) -> #we don't care 42 , (_) => @alerts.push type: "danger" msg: "Internal server error: unable to process key #{key.id}." closeAlert: (idx) -> # Remove the specified alert from the array. @alerts.splice(idx, 1) ]
[ { "context": " undefined, dev\n\n API.mail.send\n to: 'alert@cottagelabs.com'\n subject: 'Catalogue fix complete'\n ", "end": 1592, "score": 0.9999316930770874, "start": 1571, "tag": "EMAIL", "value": "alert@cottagelabs.com" } ]
noddy/service/v2/scripts/cleancatalogue.coffee
oaworks/API
2
'''API.add 'service/oab/scripts/cleancatalogue', get: #roleRequired: 'root' action: () -> dev = if this.queryParams.live is true then false else true action = if this.queryParams.action? then true else false processed = 0 fixed = 0 _process = (rec) -> processed += 1 if rec.url and _.isArray(rec.url) and rec.found?.epmc? and _.isArray rec.found.epmc upd = {} badu = false goodu = false for u in rec.url if u.indexOf('doi.org') is -1 goodu = u break else badu = u if goodu upd.url = goodu upd.found = {epmc:goodu} else if badu if rec.metadata?.doi and action open = API.use.oadoi.doi rec.metadata.doi if open.url upd.url = open.url upd.found = {oadoi: rec.url} if rec.metadata?.url? if typeof rec.metadata.url is 'string' and rec.metadata.url is badu upd['metadata.url'] = '$DELETE' else if _.isArray rec.metadata.url and badu in rec.metadata.url upd['metadata.url'] = _.without rec.metadata.url, badu upd.found ?= {} upd.url ?= '$DELETE' fixed += 1 oab_catalogue.update(rec._id, upd, undefined, undefined, undefined, undefined, dev) if action oab_catalogue.each 'url:* AND found.epmc:*', _process, undefined, undefined, undefined, undefined, dev API.mail.send to: 'alert@cottagelabs.com' subject: 'Catalogue fix complete' text: 'Recs processed: ' + processed + '\n\nRecs fixed: ' + fixed + '\n\nDev: ' + dev + '\n\nAction:' + action return dev: dev, action: action, processed: processed, fixed: fixed '''
149076
'''API.add 'service/oab/scripts/cleancatalogue', get: #roleRequired: 'root' action: () -> dev = if this.queryParams.live is true then false else true action = if this.queryParams.action? then true else false processed = 0 fixed = 0 _process = (rec) -> processed += 1 if rec.url and _.isArray(rec.url) and rec.found?.epmc? and _.isArray rec.found.epmc upd = {} badu = false goodu = false for u in rec.url if u.indexOf('doi.org') is -1 goodu = u break else badu = u if goodu upd.url = goodu upd.found = {epmc:goodu} else if badu if rec.metadata?.doi and action open = API.use.oadoi.doi rec.metadata.doi if open.url upd.url = open.url upd.found = {oadoi: rec.url} if rec.metadata?.url? if typeof rec.metadata.url is 'string' and rec.metadata.url is badu upd['metadata.url'] = '$DELETE' else if _.isArray rec.metadata.url and badu in rec.metadata.url upd['metadata.url'] = _.without rec.metadata.url, badu upd.found ?= {} upd.url ?= '$DELETE' fixed += 1 oab_catalogue.update(rec._id, upd, undefined, undefined, undefined, undefined, dev) if action oab_catalogue.each 'url:* AND found.epmc:*', _process, undefined, undefined, undefined, undefined, dev API.mail.send to: '<EMAIL>' subject: 'Catalogue fix complete' text: 'Recs processed: ' + processed + '\n\nRecs fixed: ' + fixed + '\n\nDev: ' + dev + '\n\nAction:' + action return dev: dev, action: action, processed: processed, fixed: fixed '''
true
'''API.add 'service/oab/scripts/cleancatalogue', get: #roleRequired: 'root' action: () -> dev = if this.queryParams.live is true then false else true action = if this.queryParams.action? then true else false processed = 0 fixed = 0 _process = (rec) -> processed += 1 if rec.url and _.isArray(rec.url) and rec.found?.epmc? and _.isArray rec.found.epmc upd = {} badu = false goodu = false for u in rec.url if u.indexOf('doi.org') is -1 goodu = u break else badu = u if goodu upd.url = goodu upd.found = {epmc:goodu} else if badu if rec.metadata?.doi and action open = API.use.oadoi.doi rec.metadata.doi if open.url upd.url = open.url upd.found = {oadoi: rec.url} if rec.metadata?.url? if typeof rec.metadata.url is 'string' and rec.metadata.url is badu upd['metadata.url'] = '$DELETE' else if _.isArray rec.metadata.url and badu in rec.metadata.url upd['metadata.url'] = _.without rec.metadata.url, badu upd.found ?= {} upd.url ?= '$DELETE' fixed += 1 oab_catalogue.update(rec._id, upd, undefined, undefined, undefined, undefined, dev) if action oab_catalogue.each 'url:* AND found.epmc:*', _process, undefined, undefined, undefined, undefined, dev API.mail.send to: 'PI:EMAIL:<EMAIL>END_PI' subject: 'Catalogue fix complete' text: 'Recs processed: ' + processed + '\n\nRecs fixed: ' + fixed + '\n\nDev: ' + dev + '\n\nAction:' + action return dev: dev, action: action, processed: processed, fixed: fixed '''
[ { "context": " $http.post API + '/api/users', username: $scope.username, password: $scope.password, email: $scope.email\n ", "end": 311, "score": 0.6787955164909363, "start": 303, "tag": "USERNAME", "value": "username" }, { "context": "api/users', username: $scope.username, password: $scope.password, email: $scope.email\n .success (data) ", "end": 338, "score": 0.9938015937805176, "start": 324, "tag": "PASSWORD", "value": "scope.password" }, { "context": " $state.go 'login', user: username: $scope.username, password: $scope.password\n consol", "end": 457, "score": 0.6137815117835999, "start": 449, "tag": "USERNAME", "value": "username" }, { "context": "login', user: username: $scope.username, password: $scope.password\n console.log data\n .err", "end": 484, "score": 0.9413620233535767, "start": 469, "tag": "PASSWORD", "value": "$scope.password" } ]
public/coffee/controllers/register.coffee
maxaille/PartyFinance
1
App.controller 'registerCtrl', [ '$rootScope' '$scope' '$http' '$state' 'API' ($rootScope, $scope, $http, $state, API) -> $scope.validate = -> if $scope.password != $scope.passwordRepeat then return $http.post API + '/api/users', username: $scope.username, password: $scope.password, email: $scope.email .success (data) -> $state.go 'login', user: username: $scope.username, password: $scope.password console.log data .error (data) -> console.log data ]
125241
App.controller 'registerCtrl', [ '$rootScope' '$scope' '$http' '$state' 'API' ($rootScope, $scope, $http, $state, API) -> $scope.validate = -> if $scope.password != $scope.passwordRepeat then return $http.post API + '/api/users', username: $scope.username, password: $<PASSWORD>, email: $scope.email .success (data) -> $state.go 'login', user: username: $scope.username, password: <PASSWORD> console.log data .error (data) -> console.log data ]
true
App.controller 'registerCtrl', [ '$rootScope' '$scope' '$http' '$state' 'API' ($rootScope, $scope, $http, $state, API) -> $scope.validate = -> if $scope.password != $scope.passwordRepeat then return $http.post API + '/api/users', username: $scope.username, password: $PI:PASSWORD:<PASSWORD>END_PI, email: $scope.email .success (data) -> $state.go 'login', user: username: $scope.username, password: PI:PASSWORD:<PASSWORD>END_PI console.log data .error (data) -> console.log data ]
[ { "context": "itor für das 21.\"\n superscript: \"\"\n text2: \" Jahrhundert\"\n help:\n forHelpVisit: \"Für Hilfe besuche bit", "end": 137, "score": 0.9991778135299683, "start": 126, "tag": "NAME", "value": "Jahrhundert" } ]
def/de/welcome.cson
juggernautjp/atom-i18n-beta
2
Welcome: tabTitle: "Welcome" subtitle: text1: "Ein hackbarer Texteditor für das 21." superscript: "" text2: " Jahrhundert" help: forHelpVisit: "Für Hilfe besuche bitte" atomDocs: text1: "Die " link: "Atom-Doku" text2: " für Anleitungen und die API-Referenz." _template: "${text1}<a>${link}</a>${text2}" atomForum: text1: "Das Atom-Forum unter " link: "discuss.atom.io" text2: "" # optional _template: "${text1}<a>${link}</a>${text2}" atomOrg: text1: "Die Seite " link: "Atom" text2: ". Hier sind alle über GitHub erzeugten Atom-Packages zu finden." _template: "${text1}<a>${link}</a>${text2}" showWelcomeGuide: "Willkommens-Seite beim Öffnen von Atom anzeigen"
195956
Welcome: tabTitle: "Welcome" subtitle: text1: "Ein hackbarer Texteditor für das 21." superscript: "" text2: " <NAME>" help: forHelpVisit: "Für Hilfe besuche bitte" atomDocs: text1: "Die " link: "Atom-Doku" text2: " für Anleitungen und die API-Referenz." _template: "${text1}<a>${link}</a>${text2}" atomForum: text1: "Das Atom-Forum unter " link: "discuss.atom.io" text2: "" # optional _template: "${text1}<a>${link}</a>${text2}" atomOrg: text1: "Die Seite " link: "Atom" text2: ". Hier sind alle über GitHub erzeugten Atom-Packages zu finden." _template: "${text1}<a>${link}</a>${text2}" showWelcomeGuide: "Willkommens-Seite beim Öffnen von Atom anzeigen"
true
Welcome: tabTitle: "Welcome" subtitle: text1: "Ein hackbarer Texteditor für das 21." superscript: "" text2: " PI:NAME:<NAME>END_PI" help: forHelpVisit: "Für Hilfe besuche bitte" atomDocs: text1: "Die " link: "Atom-Doku" text2: " für Anleitungen und die API-Referenz." _template: "${text1}<a>${link}</a>${text2}" atomForum: text1: "Das Atom-Forum unter " link: "discuss.atom.io" text2: "" # optional _template: "${text1}<a>${link}</a>${text2}" atomOrg: text1: "Die Seite " link: "Atom" text2: ". Hier sind alle über GitHub erzeugten Atom-Packages zu finden." _template: "${text1}<a>${link}</a>${text2}" showWelcomeGuide: "Willkommens-Seite beim Öffnen von Atom anzeigen"
[ { "context": " \"Well hello there, %\",\n \"Hey %, Hello!\",\n \"Mornin', %\",\n \"Good day, %\",\n \"Good 'aye!, %\"\n]\nmo", "end": 340, "score": 0.9997323155403137, "start": 334, "tag": "NAME", "value": "Mornin" }, { "context": "/返答/i, (msg) ->\n msg.send \"( [[はい]](http://192.168.22.101:9999/hubot/yes) / [[いいえ]](http://192.168.22.101:9", "end": 2090, "score": 0.9995079636573792, "start": 2076, "tag": "IP_ADDRESS", "value": "192.168.22.101" }, { "context": "//192.168.22.101:9999/hubot/yes) / [[いいえ]](http://192.168.22.101:9999/hubot/no)y)\"\n\n\nreplyDate = (msg, num) ->\n ", "end": 2138, "score": 0.9729800820350647, "start": 2124, "tag": "IP_ADDRESS", "value": "192.168.22.101" } ]
scripts/hello.coffee
ray34g/hubot
0
# Description: # Hubot, be polite and say hello. # # Dependencies: # None # # Configuration: # None # # Commands: # Hello or Good Day make hubot say hello to you back # Good Morning makes hubot say good morning to you back cronJob = require('cron').CronJob hellos = [ "Well hello there, %", "Hey %, Hello!", "Mornin', %", "Good day, %", "Good 'aye!, %" ] mornings = [ "Good morning, %", "Good morning to you too, %", "Good day, %", "Good 'aye!, %" ] module.exports = (robot) -> # Hello, World. cid = setInterval -> return if typeof robot?.send isnt 'function' envelope = {} robot.send envelope, "Hello, world! @all" console.info("Console:") clearInterval cid , 1000 robot.hear /(hello|good( [d'])?ay(e)?)/i, (msg) -> hello = msg.random hellos msg.send hello.replace "%", msg.message.user.name robot.hear /(^(good )?m(a|o)rnin(g)?)/i, (msg) -> hello = msg.random mornings msg.send hello.replace "%", msg.message.user.name # Today robot.respond /today ([-+]?\d+)/i, (msg) -> num = parseInt(msg.match[1]) replyDate(msg, num) robot.respond /today\s*$/i, (msg) -> replyDate(msg, 0) # Test Codes ## hear robot.hear /Can you hear me?/i, (msg) -> msg.send "I hear you." ## respond robot.respond /Can you respond me?/i, (msg) -> msg.send "I respond you." ## using message object robot.respond /Call my name/i, (msg) -> msg.send "Hi, #{msg.message.user.name}" ## regular expression robot.hear /(マネし|マネす)(.*)/i, (msg) -> msg.send "#{msg.match[0]}!" ## HTTP Listener robot.router.get '/hubot/yes', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:はい" robot.router.get '/hubot/no', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:いいえ" ## Link button robot.hear /返答/i, (msg) -> msg.send "( [[はい]](http://192.168.22.101:9999/hubot/yes) / [[いいえ]](http://192.168.22.101:9999/hubot/no)y)" replyDate = (msg, num) -> now = new Date(Date.now() + num * 24 * 60 * 60 * 1000) year = now.getFullYear() month = now.getMonth() + 1 day = now.getDate() msg.send year + "/" + month + "/" + day # ## Cron # send = (room, msg) -> # response = new robot.Response(robot, {user : {id : -1, name : room}, text : "none", done : false}, []) # response.send msg # # ### *(sec) *(min) *(hour) *(day) *(month) *(day of the week) # new cronJob('0 0 * * * *', () -> # currentTime = new Date # send "", "current time is #{new Date().currentTime.getHours()}:00." # ).start() #
137279
# Description: # Hubot, be polite and say hello. # # Dependencies: # None # # Configuration: # None # # Commands: # Hello or Good Day make hubot say hello to you back # Good Morning makes hubot say good morning to you back cronJob = require('cron').CronJob hellos = [ "Well hello there, %", "Hey %, Hello!", "<NAME>', %", "Good day, %", "Good 'aye!, %" ] mornings = [ "Good morning, %", "Good morning to you too, %", "Good day, %", "Good 'aye!, %" ] module.exports = (robot) -> # Hello, World. cid = setInterval -> return if typeof robot?.send isnt 'function' envelope = {} robot.send envelope, "Hello, world! @all" console.info("Console:") clearInterval cid , 1000 robot.hear /(hello|good( [d'])?ay(e)?)/i, (msg) -> hello = msg.random hellos msg.send hello.replace "%", msg.message.user.name robot.hear /(^(good )?m(a|o)rnin(g)?)/i, (msg) -> hello = msg.random mornings msg.send hello.replace "%", msg.message.user.name # Today robot.respond /today ([-+]?\d+)/i, (msg) -> num = parseInt(msg.match[1]) replyDate(msg, num) robot.respond /today\s*$/i, (msg) -> replyDate(msg, 0) # Test Codes ## hear robot.hear /Can you hear me?/i, (msg) -> msg.send "I hear you." ## respond robot.respond /Can you respond me?/i, (msg) -> msg.send "I respond you." ## using message object robot.respond /Call my name/i, (msg) -> msg.send "Hi, #{msg.message.user.name}" ## regular expression robot.hear /(マネし|マネす)(.*)/i, (msg) -> msg.send "#{msg.match[0]}!" ## HTTP Listener robot.router.get '/hubot/yes', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:はい" robot.router.get '/hubot/no', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:いいえ" ## Link button robot.hear /返答/i, (msg) -> msg.send "( [[はい]](http://192.168.22.101:9999/hubot/yes) / [[いいえ]](http://192.168.22.101:9999/hubot/no)y)" replyDate = (msg, num) -> now = new Date(Date.now() + num * 24 * 60 * 60 * 1000) year = now.getFullYear() month = now.getMonth() + 1 day = now.getDate() msg.send year + "/" + month + "/" + day # ## Cron # send = (room, msg) -> # response = new robot.Response(robot, {user : {id : -1, name : room}, text : "none", done : false}, []) # response.send msg # # ### *(sec) *(min) *(hour) *(day) *(month) *(day of the week) # new cronJob('0 0 * * * *', () -> # currentTime = new Date # send "", "current time is #{new Date().currentTime.getHours()}:00." # ).start() #
true
# Description: # Hubot, be polite and say hello. # # Dependencies: # None # # Configuration: # None # # Commands: # Hello or Good Day make hubot say hello to you back # Good Morning makes hubot say good morning to you back cronJob = require('cron').CronJob hellos = [ "Well hello there, %", "Hey %, Hello!", "PI:NAME:<NAME>END_PI', %", "Good day, %", "Good 'aye!, %" ] mornings = [ "Good morning, %", "Good morning to you too, %", "Good day, %", "Good 'aye!, %" ] module.exports = (robot) -> # Hello, World. cid = setInterval -> return if typeof robot?.send isnt 'function' envelope = {} robot.send envelope, "Hello, world! @all" console.info("Console:") clearInterval cid , 1000 robot.hear /(hello|good( [d'])?ay(e)?)/i, (msg) -> hello = msg.random hellos msg.send hello.replace "%", msg.message.user.name robot.hear /(^(good )?m(a|o)rnin(g)?)/i, (msg) -> hello = msg.random mornings msg.send hello.replace "%", msg.message.user.name # Today robot.respond /today ([-+]?\d+)/i, (msg) -> num = parseInt(msg.match[1]) replyDate(msg, num) robot.respond /today\s*$/i, (msg) -> replyDate(msg, 0) # Test Codes ## hear robot.hear /Can you hear me?/i, (msg) -> msg.send "I hear you." ## respond robot.respond /Can you respond me?/i, (msg) -> msg.send "I respond you." ## using message object robot.respond /Call my name/i, (msg) -> msg.send "Hi, #{msg.message.user.name}" ## regular expression robot.hear /(マネし|マネす)(.*)/i, (msg) -> msg.send "#{msg.match[0]}!" ## HTTP Listener robot.router.get '/hubot/yes', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:はい" robot.router.get '/hubot/no', (request, response) -> response.end() envelope = {} robot.send envelope, "返答:いいえ" ## Link button robot.hear /返答/i, (msg) -> msg.send "( [[はい]](http://192.168.22.101:9999/hubot/yes) / [[いいえ]](http://192.168.22.101:9999/hubot/no)y)" replyDate = (msg, num) -> now = new Date(Date.now() + num * 24 * 60 * 60 * 1000) year = now.getFullYear() month = now.getMonth() + 1 day = now.getDate() msg.send year + "/" + month + "/" + day # ## Cron # send = (room, msg) -> # response = new robot.Response(robot, {user : {id : -1, name : room}, text : "none", done : false}, []) # response.send msg # # ### *(sec) *(min) *(hour) *(day) *(month) *(day of the week) # new cronJob('0 0 * * * *', () -> # currentTime = new Date # send "", "current time is #{new Date().currentTime.getHours()}:00." # ).start() #
[ { "context": ".LastName = lastName\n this.FirstName = firstName\n this.DateOfBirth = dateOfBirth\n\n toStr", "end": 297, "score": 0.8142790198326111, "start": 288, "tag": "NAME", "value": "firstName" }, { "context": "rstName + \" \" + this.DateOfBirth\n\np = new Person(\"Torres\", \"Fred\", new Date(1964, 12-1, 11))\nprint(p.toStr", "end": 458, "score": 0.9998443126678467, "start": 452, "tag": "NAME", "value": "Torres" }, { "context": "\" \" + this.DateOfBirth\n\np = new Person(\"Torres\", \"Fred\", new Date(1964, 12-1, 11))\nprint(p.toString())\n\n", "end": 466, "score": 0.9998387098312378, "start": 462, "tag": "NAME", "value": "Fred" }, { "context": "ployee extends Person\n\n constructor: (lastName, firstName, dateOfBirth, company) ->\n\n super(lastName", "end": 584, "score": 0.7831698656082153, "start": 575, "tag": "NAME", "value": "firstName" }, { "context": "n super() + \" \" + this.Company\n\ne = new Employee(\"Torres\", \"Fred\", new Date(1964, 12-1, 11), \"ScerIS\")\npri", "end": 781, "score": 0.9998428821563721, "start": 775, "tag": "NAME", "value": "Torres" }, { "context": "+ \" \" + this.Company\n\ne = new Employee(\"Torres\", \"Fred\", new Date(1964, 12-1, 11), \"ScerIS\")\nprint(e.toS", "end": 789, "score": 0.9998245239257812, "start": 785, "tag": "NAME", "value": "Fred" } ]
CoffeeScriptRunTime/CoffeeScripts/class.demo.coffee
fredericaltorres/DynamicJavaScriptRunTimes.NET
4
## CoffeeScript Demo #!DisplayJavaScript pass = () -> return "passing" ######################################################################## ## ## class Person constructor: (lastName, firstName, dateOfBirth) -> this.LastName = lastName this.FirstName = firstName this.DateOfBirth = dateOfBirth toString: () -> return this.LastName + " " + this.FirstName + " " + this.DateOfBirth p = new Person("Torres", "Fred", new Date(1964, 12-1, 11)) print(p.toString()) class Employee extends Person constructor: (lastName, firstName, dateOfBirth, company) -> super(lastName, firstName, dateOfBirth) this.Company = company toString: () -> return super() + " " + this.Company e = new Employee("Torres", "Fred", new Date(1964, 12-1, 11), "ScerIS") print(e.toString())
175568
## CoffeeScript Demo #!DisplayJavaScript pass = () -> return "passing" ######################################################################## ## ## class Person constructor: (lastName, firstName, dateOfBirth) -> this.LastName = lastName this.FirstName = <NAME> this.DateOfBirth = dateOfBirth toString: () -> return this.LastName + " " + this.FirstName + " " + this.DateOfBirth p = new Person("<NAME>", "<NAME>", new Date(1964, 12-1, 11)) print(p.toString()) class Employee extends Person constructor: (lastName, <NAME>, dateOfBirth, company) -> super(lastName, firstName, dateOfBirth) this.Company = company toString: () -> return super() + " " + this.Company e = new Employee("<NAME>", "<NAME>", new Date(1964, 12-1, 11), "ScerIS") print(e.toString())
true
## CoffeeScript Demo #!DisplayJavaScript pass = () -> return "passing" ######################################################################## ## ## class Person constructor: (lastName, firstName, dateOfBirth) -> this.LastName = lastName this.FirstName = PI:NAME:<NAME>END_PI this.DateOfBirth = dateOfBirth toString: () -> return this.LastName + " " + this.FirstName + " " + this.DateOfBirth p = new Person("PI:NAME:<NAME>END_PI", "PI:NAME:<NAME>END_PI", new Date(1964, 12-1, 11)) print(p.toString()) class Employee extends Person constructor: (lastName, PI:NAME:<NAME>END_PI, dateOfBirth, company) -> super(lastName, firstName, dateOfBirth) this.Company = company toString: () -> return super() + " " + this.Company e = new Employee("PI:NAME:<NAME>END_PI", "PI:NAME:<NAME>END_PI", new Date(1964, 12-1, 11), "ScerIS") print(e.toString())
[ { "context": "NK] “../Chocolat/chocolat.coffee”\n# ###\n# @Author: Kristinita\n# @Date:\t 2017-04-04 13:01:15\n# @Last Modified ti", "end": 102, "score": 0.9997028708457947, "start": 92, "tag": "NAME", "value": "Kristinita" }, { "context": "roll to top for galleries:\n# # https://github.com/fancyapps/fancybox/issues/2186\n# # So I remove 'slideShow' ", "end": 890, "score": 0.9992570281028748, "start": 881, "tag": "USERNAME", "value": "fancyapps" } ]
themes/sashapelican/static/coffee/Fancybox/fancybox.coffee
Kristinita/---
6
# [DECLINED] I migrate to Chocolat: # [LINK] “../Chocolat/chocolat.coffee” # ### # @Author: Kristinita # @Date: 2017-04-04 13:01:15 # @Last Modified time: 2017-04-14 14:37:51 # ### # ############ # # Fancybox # # ############ # ### # Modal window for images: # http://fancyapps.com/fancybox/3/ # http://fancyapps.com/fancybox/3/docs/#options # http://xiper.net/collect/js-plugins/gallery/fancybox # ### # # [INFO] Disable <a> wrapper for FancyBox 3: # # https://stackoverflow.com/a/25908042/5951529 # $('.SashaLazy').each(-> # $(this).replaceWith '<a data-fancybox="gallery" href="' + $(this).attr('data-src') + \ # '">' + $(this)[0].outerHTML + '</a>' # return # ).promise().done() # # [INFO] FancyBox3 options: # # https://fancyapps.com/fancybox/3/docs/#options # # Show all buttons in top right corner # # [BUG] Scrollbar scroll to top for galleries: # # https://github.com/fancyapps/fancybox/issues/2186 # # So I remove 'slideShow' button. # $('[data-fancybox="gallery"]').fancybox buttons: [ # 'zoom' # 'share' # 'fullScreen' # 'download' # 'thumbs' # 'close' # ]
24909
# [DECLINED] I migrate to Chocolat: # [LINK] “../Chocolat/chocolat.coffee” # ### # @Author: <NAME> # @Date: 2017-04-04 13:01:15 # @Last Modified time: 2017-04-14 14:37:51 # ### # ############ # # Fancybox # # ############ # ### # Modal window for images: # http://fancyapps.com/fancybox/3/ # http://fancyapps.com/fancybox/3/docs/#options # http://xiper.net/collect/js-plugins/gallery/fancybox # ### # # [INFO] Disable <a> wrapper for FancyBox 3: # # https://stackoverflow.com/a/25908042/5951529 # $('.SashaLazy').each(-> # $(this).replaceWith '<a data-fancybox="gallery" href="' + $(this).attr('data-src') + \ # '">' + $(this)[0].outerHTML + '</a>' # return # ).promise().done() # # [INFO] FancyBox3 options: # # https://fancyapps.com/fancybox/3/docs/#options # # Show all buttons in top right corner # # [BUG] Scrollbar scroll to top for galleries: # # https://github.com/fancyapps/fancybox/issues/2186 # # So I remove 'slideShow' button. # $('[data-fancybox="gallery"]').fancybox buttons: [ # 'zoom' # 'share' # 'fullScreen' # 'download' # 'thumbs' # 'close' # ]
true
# [DECLINED] I migrate to Chocolat: # [LINK] “../Chocolat/chocolat.coffee” # ### # @Author: PI:NAME:<NAME>END_PI # @Date: 2017-04-04 13:01:15 # @Last Modified time: 2017-04-14 14:37:51 # ### # ############ # # Fancybox # # ############ # ### # Modal window for images: # http://fancyapps.com/fancybox/3/ # http://fancyapps.com/fancybox/3/docs/#options # http://xiper.net/collect/js-plugins/gallery/fancybox # ### # # [INFO] Disable <a> wrapper for FancyBox 3: # # https://stackoverflow.com/a/25908042/5951529 # $('.SashaLazy').each(-> # $(this).replaceWith '<a data-fancybox="gallery" href="' + $(this).attr('data-src') + \ # '">' + $(this)[0].outerHTML + '</a>' # return # ).promise().done() # # [INFO] FancyBox3 options: # # https://fancyapps.com/fancybox/3/docs/#options # # Show all buttons in top right corner # # [BUG] Scrollbar scroll to top for galleries: # # https://github.com/fancyapps/fancybox/issues/2186 # # So I remove 'slideShow' button. # $('[data-fancybox="gallery"]').fancybox buttons: [ # 'zoom' # 'share' # 'fullScreen' # 'download' # 'thumbs' # 'close' # ]
[ { "context": "# Below follows my CoffeeScript port of Aaron Heckmann's jQuery Hook plugin,\n# which is dual-licensed un", "end": 54, "score": 0.9998766183853149, "start": 40, "tag": "NAME", "value": "Aaron Heckmann" }, { "context": " on GitHub for more details:\n# https://github.com/aheckmann/jquery.hook\n\n$.hook = (fns) ->\n\tfns = fns.split '", "end": 307, "score": 0.9994134902954102, "start": 298, "tag": "USERNAME", "value": "aheckmann" } ]
interface/src/components/jquery-domchange/src/jquery.hook.coffee
aignacio/homestark
1
# Below follows my CoffeeScript port of Aaron Heckmann's jQuery Hook plugin, # which is dual-licensed under the MIT and GPL licenses: # http://www.opensource.org/licenses/mit-license.php # http://www.gnu.org/licenses/gpl.html # See the project page on GitHub for more details: # https://github.com/aheckmann/jquery.hook $.hook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> old = $.fn[method] if old and !old.__hookold $.fn[method] = -> @triggerHandler 'onbefore' + method @triggerHandler 'on' + method result = old.apply @, arguments @triggerHandler 'onafter' + method result $.fn[method].__hookold = old $.unhook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> current = $.fn[method] $.fn[method] = current.__hookold if current and current.__hookold
197044
# Below follows my CoffeeScript port of <NAME>'s jQuery Hook plugin, # which is dual-licensed under the MIT and GPL licenses: # http://www.opensource.org/licenses/mit-license.php # http://www.gnu.org/licenses/gpl.html # See the project page on GitHub for more details: # https://github.com/aheckmann/jquery.hook $.hook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> old = $.fn[method] if old and !old.__hookold $.fn[method] = -> @triggerHandler 'onbefore' + method @triggerHandler 'on' + method result = old.apply @, arguments @triggerHandler 'onafter' + method result $.fn[method].__hookold = old $.unhook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> current = $.fn[method] $.fn[method] = current.__hookold if current and current.__hookold
true
# Below follows my CoffeeScript port of PI:NAME:<NAME>END_PI's jQuery Hook plugin, # which is dual-licensed under the MIT and GPL licenses: # http://www.opensource.org/licenses/mit-license.php # http://www.gnu.org/licenses/gpl.html # See the project page on GitHub for more details: # https://github.com/aheckmann/jquery.hook $.hook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> old = $.fn[method] if old and !old.__hookold $.fn[method] = -> @triggerHandler 'onbefore' + method @triggerHandler 'on' + method result = old.apply @, arguments @triggerHandler 'onafter' + method result $.fn[method].__hookold = old $.unhook = (fns) -> fns = fns.split ' ' if typeof fns is 'string' $.makeArray fns # if typeof fns === 'string' # fns = fns.split ' ' # else # fns = $.makeArray fns jQuery.each fns, (i, method) -> current = $.fn[method] $.fn[method] = current.__hookold if current and current.__hookold
[ { "context": " port: 0xcafe\n uuid: 'nothing'\n token: 'idunno'\n\n badClient.connect (@error) =>\n done()\n", "end": 633, "score": 0.9984208941459656, "start": 627, "tag": "PASSWORD", "value": "idunno" } ]
test/failed-authenticate-spec.coffee
octoblu/meshblu-core-protocol-adapter-xmpp
0
_ = require 'lodash' Connect = require './connect' MeshbluXmpp = require 'meshblu-xmpp' RedisNS = require '@octoblu/redis-ns' describe 'on: failed authenticate', -> beforeEach 'on connect', (done) -> @workerFunc = sinon.stub() @connect = new Connect { @workerFunc } @connect.connect (error, things) => return done error if error? {@sut,@connection,@device,@jobManager} = things done() afterEach (done) -> @connect.shutItDown done beforeEach (done) -> badClient = new MeshbluXmpp hostname: 'localhost' port: 0xcafe uuid: 'nothing' token: 'idunno' badClient.connect (@error) => done() @workerFunc.onFirstCall().yields null, metadata: code: 403 it 'should have an error', -> expect(@error).to.exist
62712
_ = require 'lodash' Connect = require './connect' MeshbluXmpp = require 'meshblu-xmpp' RedisNS = require '@octoblu/redis-ns' describe 'on: failed authenticate', -> beforeEach 'on connect', (done) -> @workerFunc = sinon.stub() @connect = new Connect { @workerFunc } @connect.connect (error, things) => return done error if error? {@sut,@connection,@device,@jobManager} = things done() afterEach (done) -> @connect.shutItDown done beforeEach (done) -> badClient = new MeshbluXmpp hostname: 'localhost' port: 0xcafe uuid: 'nothing' token: '<PASSWORD>' badClient.connect (@error) => done() @workerFunc.onFirstCall().yields null, metadata: code: 403 it 'should have an error', -> expect(@error).to.exist
true
_ = require 'lodash' Connect = require './connect' MeshbluXmpp = require 'meshblu-xmpp' RedisNS = require '@octoblu/redis-ns' describe 'on: failed authenticate', -> beforeEach 'on connect', (done) -> @workerFunc = sinon.stub() @connect = new Connect { @workerFunc } @connect.connect (error, things) => return done error if error? {@sut,@connection,@device,@jobManager} = things done() afterEach (done) -> @connect.shutItDown done beforeEach (done) -> badClient = new MeshbluXmpp hostname: 'localhost' port: 0xcafe uuid: 'nothing' token: 'PI:PASSWORD:<PASSWORD>END_PI' badClient.connect (@error) => done() @workerFunc.onFirstCall().yields null, metadata: code: 403 it 'should have an error', -> expect(@error).to.exist
[ { "context": " 'index', Object.assign formats, title: 'Resume of Robert de Forest'\n return\n\nmodule.exports = router\n", "end": 230, "score": 0.9998337626457214, "start": 214, "tag": "NAME", "value": "Robert de Forest" } ]
routes/index.coffee
rdeforest/resume
0
express = require 'express' app = require '../app' router = express.Router() formats = require '../lib/formats' router.get '/', (req, res, next) -> res.render 'index', Object.assign formats, title: 'Resume of Robert de Forest' return module.exports = router
30832
express = require 'express' app = require '../app' router = express.Router() formats = require '../lib/formats' router.get '/', (req, res, next) -> res.render 'index', Object.assign formats, title: 'Resume of <NAME>' return module.exports = router
true
express = require 'express' app = require '../app' router = express.Router() formats = require '../lib/formats' router.get '/', (req, res, next) -> res.render 'index', Object.assign formats, title: 'Resume of PI:NAME:<NAME>END_PI' return module.exports = router
[ { "context": "nsureIndex({ token: 1 }, { unique: true })\n@author Nathan Klick\n@copyright QRef 2012\n@abstract\n###\nclass AuthCode", "end": 310, "score": 0.999889612197876, "start": 298, "tag": "NAME", "value": "Nathan Klick" } ]
Workspace/QRef/NodeServer/src/schema/AuthCodeSchema.coffee
qrefdev/qref
0
mongoose = require('mongoose') Schema = mongoose.Schema ObjectId = Schema.ObjectId ### Schema representing a time-limited user specific authentication token. @example MongoDB Collection db.user.tokens @example MongoDB Indexes db.user.tokens.ensureIndex({ token: 1 }, { unique: true }) @author Nathan Klick @copyright QRef 2012 @abstract ### class AuthCodeSchemaInternal ### @property [String] (Required) A unique SHA-512 hash representing a user credential. ### code: type: String required: true unique: true ### @property [Date] (Required) The expiration date of the token. ### expiresOn: type: Date required: true ### @property [ObjectId] (Required) The user that this token was issued for. ### user: type: ObjectId ref: 'users' required: true AuthCodeSchema = new Schema(new AuthCodeSchemaInternal()) module.exports = AuthCodeSchema
2753
mongoose = require('mongoose') Schema = mongoose.Schema ObjectId = Schema.ObjectId ### Schema representing a time-limited user specific authentication token. @example MongoDB Collection db.user.tokens @example MongoDB Indexes db.user.tokens.ensureIndex({ token: 1 }, { unique: true }) @author <NAME> @copyright QRef 2012 @abstract ### class AuthCodeSchemaInternal ### @property [String] (Required) A unique SHA-512 hash representing a user credential. ### code: type: String required: true unique: true ### @property [Date] (Required) The expiration date of the token. ### expiresOn: type: Date required: true ### @property [ObjectId] (Required) The user that this token was issued for. ### user: type: ObjectId ref: 'users' required: true AuthCodeSchema = new Schema(new AuthCodeSchemaInternal()) module.exports = AuthCodeSchema
true
mongoose = require('mongoose') Schema = mongoose.Schema ObjectId = Schema.ObjectId ### Schema representing a time-limited user specific authentication token. @example MongoDB Collection db.user.tokens @example MongoDB Indexes db.user.tokens.ensureIndex({ token: 1 }, { unique: true }) @author PI:NAME:<NAME>END_PI @copyright QRef 2012 @abstract ### class AuthCodeSchemaInternal ### @property [String] (Required) A unique SHA-512 hash representing a user credential. ### code: type: String required: true unique: true ### @property [Date] (Required) The expiration date of the token. ### expiresOn: type: Date required: true ### @property [ObjectId] (Required) The user that this token was issued for. ### user: type: ObjectId ref: 'users' required: true AuthCodeSchema = new Schema(new AuthCodeSchemaInternal()) module.exports = AuthCodeSchema
[ { "context": "T'\n\t\tauth:\n\t\t\tuser: settings.apis.v1.user\n\t\t\tpass: settings.apis.v1.pass\n\t\t\tsendImmediately: true\n\t}, (error, response, bo", "end": 613, "score": 0.9770703911781311, "start": 592, "tag": "PASSWORD", "value": "settings.apis.v1.pass" } ]
app/coffee/models/Publisher.coffee
shyoshyo/web-sharelatex
1
mongoose = require 'mongoose' Schema = mongoose.Schema ObjectId = Schema.ObjectId settings = require 'settings-sharelatex' logger = require 'logger-sharelatex' request = require 'request' PublisherSchema = new Schema slug: { type: String, required: true } managerIds: [ type:ObjectId, ref:'User' ] # fetch publisher's (brand on v1) data from v1 API. Errors are ignored PublisherSchema.method 'fetchV1Data', (callback = (error, publisher)->) -> request { baseUrl: settings.apis.v1.url url: "/api/v2/brands/#{this.slug}" method: 'GET' auth: user: settings.apis.v1.user pass: settings.apis.v1.pass sendImmediately: true }, (error, response, body) => try parsedBody = JSON.parse(body) catch error # log error and carry on without v1 data logger.err { model: 'Publisher', slug: this.slug, error }, '[fetchV1DataError]' this.name = parsedBody?.name this.partner = parsedBody?.partner callback(null, this) conn = mongoose.createConnection(settings.mongo.url, { server: {poolSize: settings.mongo.poolSize || 10}, config: {autoIndex: false} }) Publisher = conn.model 'Publisher', PublisherSchema exports.Publisher = Publisher exports.PublisherSchema = PublisherSchema
92611
mongoose = require 'mongoose' Schema = mongoose.Schema ObjectId = Schema.ObjectId settings = require 'settings-sharelatex' logger = require 'logger-sharelatex' request = require 'request' PublisherSchema = new Schema slug: { type: String, required: true } managerIds: [ type:ObjectId, ref:'User' ] # fetch publisher's (brand on v1) data from v1 API. Errors are ignored PublisherSchema.method 'fetchV1Data', (callback = (error, publisher)->) -> request { baseUrl: settings.apis.v1.url url: "/api/v2/brands/#{this.slug}" method: 'GET' auth: user: settings.apis.v1.user pass: <PASSWORD> sendImmediately: true }, (error, response, body) => try parsedBody = JSON.parse(body) catch error # log error and carry on without v1 data logger.err { model: 'Publisher', slug: this.slug, error }, '[fetchV1DataError]' this.name = parsedBody?.name this.partner = parsedBody?.partner callback(null, this) conn = mongoose.createConnection(settings.mongo.url, { server: {poolSize: settings.mongo.poolSize || 10}, config: {autoIndex: false} }) Publisher = conn.model 'Publisher', PublisherSchema exports.Publisher = Publisher exports.PublisherSchema = PublisherSchema
true
mongoose = require 'mongoose' Schema = mongoose.Schema ObjectId = Schema.ObjectId settings = require 'settings-sharelatex' logger = require 'logger-sharelatex' request = require 'request' PublisherSchema = new Schema slug: { type: String, required: true } managerIds: [ type:ObjectId, ref:'User' ] # fetch publisher's (brand on v1) data from v1 API. Errors are ignored PublisherSchema.method 'fetchV1Data', (callback = (error, publisher)->) -> request { baseUrl: settings.apis.v1.url url: "/api/v2/brands/#{this.slug}" method: 'GET' auth: user: settings.apis.v1.user pass: PI:PASSWORD:<PASSWORD>END_PI sendImmediately: true }, (error, response, body) => try parsedBody = JSON.parse(body) catch error # log error and carry on without v1 data logger.err { model: 'Publisher', slug: this.slug, error }, '[fetchV1DataError]' this.name = parsedBody?.name this.partner = parsedBody?.partner callback(null, this) conn = mongoose.createConnection(settings.mongo.url, { server: {poolSize: settings.mongo.poolSize || 10}, config: {autoIndex: false} }) Publisher = conn.model 'Publisher', PublisherSchema exports.Publisher = Publisher exports.PublisherSchema = PublisherSchema
[ { "context": "mplate: Ember.Handlebars.compile(tpl)\n# name: \"PersonView\"\n actions:\n toogleall: () ->\n togg", "end": 209, "score": 0.8220428824424744, "start": 199, "tag": "NAME", "value": "PersonView" } ]
app/assets/javascripts/views/PersonsView.coffee
ehudkaldor/patientmanager
0
define ["App", "ember", "text!../templates/persons.handlebars", "semantic"], (App, Ember, tpl) -> App.PersonsView = Ember.View.extend defaultTemplate: Ember.Handlebars.compile(tpl) # name: "PersonView" actions: toogleall: () -> toggleTo = $('#checkboxheader').checkbox("is checked") console.log("toogleall to " + toggleTo) if toggleTo == true $('.ui.fitted.toggle.row').checkbox('check') else $('.ui.fitted.toggle.row').checkbox('uncheck') afterRenderEvent: () -> console.log("PersonView afterRender") $('.ui.fitted.toggle').checkbox()
96947
define ["App", "ember", "text!../templates/persons.handlebars", "semantic"], (App, Ember, tpl) -> App.PersonsView = Ember.View.extend defaultTemplate: Ember.Handlebars.compile(tpl) # name: "<NAME>" actions: toogleall: () -> toggleTo = $('#checkboxheader').checkbox("is checked") console.log("toogleall to " + toggleTo) if toggleTo == true $('.ui.fitted.toggle.row').checkbox('check') else $('.ui.fitted.toggle.row').checkbox('uncheck') afterRenderEvent: () -> console.log("PersonView afterRender") $('.ui.fitted.toggle').checkbox()
true
define ["App", "ember", "text!../templates/persons.handlebars", "semantic"], (App, Ember, tpl) -> App.PersonsView = Ember.View.extend defaultTemplate: Ember.Handlebars.compile(tpl) # name: "PI:NAME:<NAME>END_PI" actions: toogleall: () -> toggleTo = $('#checkboxheader').checkbox("is checked") console.log("toogleall to " + toggleTo) if toggleTo == true $('.ui.fitted.toggle.row').checkbox('check') else $('.ui.fitted.toggle.row').checkbox('uncheck') afterRenderEvent: () -> console.log("PersonView afterRender") $('.ui.fitted.toggle').checkbox()
[ { "context": "ptions.p12)\n form.append \"p12_password\",\"#{options.p12_password}\"\n\n form.append \"bundleIdentifier\",\"#{option", "end": 4632, "score": 0.9302231669425964, "start": 4610, "tag": "PASSWORD", "value": "#{options.p12_password" } ]
lib/build/build-manager.coffee
yezhiming/atom-butterfly
3
fs = require 'fs' request = require 'request' Q = require 'q' _ = require 'underscore' uuid = require 'uuid' os = require 'os' fsIsDirectorySync = (path) -> try stat = fs.statSync(path) stat.isDirectory() catch false module.exports = class BuildManager activate: -> atom.workspaceView.command "atom-chameleon:publish-application", => @cmdPublishApplication() @server = atom.config.get('atom-chameleon.puzzleServerAddress') atom.workspaceView.command "atom-chameleon:build-list", => @cmdBuildList() deactivate: -> cmdBuildList: -> new (require './build-list-view')().attach() cmdPublishApplication: -> PublishAppView = require './publish-wizard-view' buildWizard = new PublishAppView().attach() buildStateView = new (require './build-state-view')() # 这样就可以可以不仅在windows还是mac都可以获取到.atom路径 decs = "#{os.tmpdir()}/atom-chameleon" zipFile = "#{uuid.v1()}.zip" unless fsIsDirectorySync(decs) console.log "新建文件夹:#{decs}" fs.mkdirSync decs removeZipPath = "#{decs}/#{zipFile}" buildWizard.finishPromise() .then (result) -> console.log "开始压缩..." buildWizard.destroy() buildStateView.attach() require('../../utils/zip')(atom.project.path,removeZipPath).then (zip_path) ->_.extend(result, asset: zip_path) .then (result) -> console.log "结束压缩..." Q.Promise (resolve, reject, notify) -> buildStateView.socket.on "resSocketId", (sid) -> console.log "resSocketId:#{sid}" resolve(_.extend(result, socketId: sid)) buildStateView.socket.emit "reqSocketId" .then (result) => @sendBuildRequest(result) .then (result) -> buildStateView.buttonAbled() console.log "删除文件:#{removeZipPath}" if fs.existsSync removeZipPath fs.unlinkSync(removeZipPath) JSON.parse result .then (task) -> buildStateView.setTask(task) .catch (err) -> buildStateView.destroy() console.trace err.stack alert "err occur! #{err}" sendBuildRequest: (options) -> console.log "options:" console.log options if options.platform == "android" Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)=> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-android" form.append "platform","android" form.append "asset",fs.createReadStream(options.asset) # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # 以下只要一个信息不填写,那么就使用默认的证书发布安卓应用 # unless ((options.keystore is "") && (options.keypass is "") && (options.alias is "") && (options.aliaspass is "")) if (options.keystore && options.keypass && options.alias && options.aliaspass) form.append "keystore",fs.createReadStream (options.keystore) form.append "keypass","#{options.keypass}" form.append "alias","#{options.alias}" form.append "aliaspass","#{options.aliaspass}" # 如果不填写,就使用默认库 unless ((options.repository_url is "") && (options.scheme is "")) form.append "repository_url","#{options.repository_url}" form.append "buildtype","#{options.scheme}" # 不填写,使用默认启动页面 unless (options.content_src is "") form.append "content_src","#{options.content_src}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "title","#{options.title}" form.append "socketId","#{options.socketId}" else Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)-> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-ios" form.append "platform","ios" # 以下三个参数需要同时不为空,否则不发送到服务器 如果不填写,那么使用服务器的默认证书 # unless ((options.mobileprovision is "") && (options.p12 is "") && (options.p12_password is "")) if options.mobileprovision && options.p12 && options.p12_password form.append "mobileprovision", fs.createReadStream(options.mobileprovision) form.append "p12",fs.createReadStream(options.p12) form.append "p12_password","#{options.p12_password}" form.append "bundleIdentifier","#{options.bundleIdentifier}" # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # # 下面是库连接,只要一下一个值为空,就是使用默认的github地址进行下载 unless ((options.repository_url is "") || (options.scheme is "")) form.append "scheme","#{options.scheme}" form.append "repository_url","#{options.repository_url}" unless (options.content_src is "") form.append "content_src","#{options.content_src}" # 是否使用push servers # unless ((options.pushp12 is "") && (options.pushp12password is "")) if options.pushp12 && options.pushp12password form.append "pushp12",fs.createReadStream(options.pushp12) form.append "pushp12password",options.pushp12password form.append "title","#{options.title}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "asset",fs.createReadStream(options.asset) form.append "socketId","#{options.socketId}"
184531
fs = require 'fs' request = require 'request' Q = require 'q' _ = require 'underscore' uuid = require 'uuid' os = require 'os' fsIsDirectorySync = (path) -> try stat = fs.statSync(path) stat.isDirectory() catch false module.exports = class BuildManager activate: -> atom.workspaceView.command "atom-chameleon:publish-application", => @cmdPublishApplication() @server = atom.config.get('atom-chameleon.puzzleServerAddress') atom.workspaceView.command "atom-chameleon:build-list", => @cmdBuildList() deactivate: -> cmdBuildList: -> new (require './build-list-view')().attach() cmdPublishApplication: -> PublishAppView = require './publish-wizard-view' buildWizard = new PublishAppView().attach() buildStateView = new (require './build-state-view')() # 这样就可以可以不仅在windows还是mac都可以获取到.atom路径 decs = "#{os.tmpdir()}/atom-chameleon" zipFile = "#{uuid.v1()}.zip" unless fsIsDirectorySync(decs) console.log "新建文件夹:#{decs}" fs.mkdirSync decs removeZipPath = "#{decs}/#{zipFile}" buildWizard.finishPromise() .then (result) -> console.log "开始压缩..." buildWizard.destroy() buildStateView.attach() require('../../utils/zip')(atom.project.path,removeZipPath).then (zip_path) ->_.extend(result, asset: zip_path) .then (result) -> console.log "结束压缩..." Q.Promise (resolve, reject, notify) -> buildStateView.socket.on "resSocketId", (sid) -> console.log "resSocketId:#{sid}" resolve(_.extend(result, socketId: sid)) buildStateView.socket.emit "reqSocketId" .then (result) => @sendBuildRequest(result) .then (result) -> buildStateView.buttonAbled() console.log "删除文件:#{removeZipPath}" if fs.existsSync removeZipPath fs.unlinkSync(removeZipPath) JSON.parse result .then (task) -> buildStateView.setTask(task) .catch (err) -> buildStateView.destroy() console.trace err.stack alert "err occur! #{err}" sendBuildRequest: (options) -> console.log "options:" console.log options if options.platform == "android" Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)=> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-android" form.append "platform","android" form.append "asset",fs.createReadStream(options.asset) # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # 以下只要一个信息不填写,那么就使用默认的证书发布安卓应用 # unless ((options.keystore is "") && (options.keypass is "") && (options.alias is "") && (options.aliaspass is "")) if (options.keystore && options.keypass && options.alias && options.aliaspass) form.append "keystore",fs.createReadStream (options.keystore) form.append "keypass","#{options.keypass}" form.append "alias","#{options.alias}" form.append "aliaspass","#{options.aliaspass}" # 如果不填写,就使用默认库 unless ((options.repository_url is "") && (options.scheme is "")) form.append "repository_url","#{options.repository_url}" form.append "buildtype","#{options.scheme}" # 不填写,使用默认启动页面 unless (options.content_src is "") form.append "content_src","#{options.content_src}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "title","#{options.title}" form.append "socketId","#{options.socketId}" else Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)-> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-ios" form.append "platform","ios" # 以下三个参数需要同时不为空,否则不发送到服务器 如果不填写,那么使用服务器的默认证书 # unless ((options.mobileprovision is "") && (options.p12 is "") && (options.p12_password is "")) if options.mobileprovision && options.p12 && options.p12_password form.append "mobileprovision", fs.createReadStream(options.mobileprovision) form.append "p12",fs.createReadStream(options.p12) form.append "p12_password","<PASSWORD>}" form.append "bundleIdentifier","#{options.bundleIdentifier}" # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # # 下面是库连接,只要一下一个值为空,就是使用默认的github地址进行下载 unless ((options.repository_url is "") || (options.scheme is "")) form.append "scheme","#{options.scheme}" form.append "repository_url","#{options.repository_url}" unless (options.content_src is "") form.append "content_src","#{options.content_src}" # 是否使用push servers # unless ((options.pushp12 is "") && (options.pushp12password is "")) if options.pushp12 && options.pushp12password form.append "pushp12",fs.createReadStream(options.pushp12) form.append "pushp12password",options.pushp12password form.append "title","#{options.title}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "asset",fs.createReadStream(options.asset) form.append "socketId","#{options.socketId}"
true
fs = require 'fs' request = require 'request' Q = require 'q' _ = require 'underscore' uuid = require 'uuid' os = require 'os' fsIsDirectorySync = (path) -> try stat = fs.statSync(path) stat.isDirectory() catch false module.exports = class BuildManager activate: -> atom.workspaceView.command "atom-chameleon:publish-application", => @cmdPublishApplication() @server = atom.config.get('atom-chameleon.puzzleServerAddress') atom.workspaceView.command "atom-chameleon:build-list", => @cmdBuildList() deactivate: -> cmdBuildList: -> new (require './build-list-view')().attach() cmdPublishApplication: -> PublishAppView = require './publish-wizard-view' buildWizard = new PublishAppView().attach() buildStateView = new (require './build-state-view')() # 这样就可以可以不仅在windows还是mac都可以获取到.atom路径 decs = "#{os.tmpdir()}/atom-chameleon" zipFile = "#{uuid.v1()}.zip" unless fsIsDirectorySync(decs) console.log "新建文件夹:#{decs}" fs.mkdirSync decs removeZipPath = "#{decs}/#{zipFile}" buildWizard.finishPromise() .then (result) -> console.log "开始压缩..." buildWizard.destroy() buildStateView.attach() require('../../utils/zip')(atom.project.path,removeZipPath).then (zip_path) ->_.extend(result, asset: zip_path) .then (result) -> console.log "结束压缩..." Q.Promise (resolve, reject, notify) -> buildStateView.socket.on "resSocketId", (sid) -> console.log "resSocketId:#{sid}" resolve(_.extend(result, socketId: sid)) buildStateView.socket.emit "reqSocketId" .then (result) => @sendBuildRequest(result) .then (result) -> buildStateView.buttonAbled() console.log "删除文件:#{removeZipPath}" if fs.existsSync removeZipPath fs.unlinkSync(removeZipPath) JSON.parse result .then (task) -> buildStateView.setTask(task) .catch (err) -> buildStateView.destroy() console.trace err.stack alert "err occur! #{err}" sendBuildRequest: (options) -> console.log "options:" console.log options if options.platform == "android" Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)=> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-android" form.append "platform","android" form.append "asset",fs.createReadStream(options.asset) # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # 以下只要一个信息不填写,那么就使用默认的证书发布安卓应用 # unless ((options.keystore is "") && (options.keypass is "") && (options.alias is "") && (options.aliaspass is "")) if (options.keystore && options.keypass && options.alias && options.aliaspass) form.append "keystore",fs.createReadStream (options.keystore) form.append "keypass","#{options.keypass}" form.append "alias","#{options.alias}" form.append "aliaspass","#{options.aliaspass}" # 如果不填写,就使用默认库 unless ((options.repository_url is "") && (options.scheme is "")) form.append "repository_url","#{options.repository_url}" form.append "buildtype","#{options.scheme}" # 不填写,使用默认启动页面 unless (options.content_src is "") form.append "content_src","#{options.content_src}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "title","#{options.title}" form.append "socketId","#{options.socketId}" else Q.Promise (resolve, reject, notify) => r = request.post {url:"#{@server}/api/tasks",timeout: 1000*60*10}, (err, httpResponse, body)-> if err then reject(err) else resolve(body) form = r.form() form.append "access_token","#{atom.config.get('atom-chameleon.puzzleAccessToken')}" form.append "builder","cordova-ios" form.append "platform","ios" # 以下三个参数需要同时不为空,否则不发送到服务器 如果不填写,那么使用服务器的默认证书 # unless ((options.mobileprovision is "") && (options.p12 is "") && (options.p12_password is "")) if options.mobileprovision && options.p12 && options.p12_password form.append "mobileprovision", fs.createReadStream(options.mobileprovision) form.append "p12",fs.createReadStream(options.p12) form.append "p12_password","PI:PASSWORD:<PASSWORD>END_PI}" form.append "bundleIdentifier","#{options.bundleIdentifier}" # 若不填写,使用默认图标 unless options.icon is "" form.append "icon",fs.createReadStream(options.icon) # # 下面是库连接,只要一下一个值为空,就是使用默认的github地址进行下载 unless ((options.repository_url is "") || (options.scheme is "")) form.append "scheme","#{options.scheme}" form.append "repository_url","#{options.repository_url}" unless (options.content_src is "") form.append "content_src","#{options.content_src}" # 是否使用push servers # unless ((options.pushp12 is "") && (options.pushp12password is "")) if options.pushp12 && options.pushp12password form.append "pushp12",fs.createReadStream(options.pushp12) form.append "pushp12password",options.pushp12password form.append "title","#{options.title}" form.append "version","#{options.version}" form.append "build","#{options.build}" form.append "asset",fs.createReadStream(options.asset) form.append "socketId","#{options.socketId}"
[ { "context": "tities:\n steps:\n abc:\n name : 'batman'\n startsAt : '2015-12-01'\n endsAt ", "end": 257, "score": 0.9988950490951538, "start": 251, "tag": "NAME", "value": "batman" } ]
components/StepRow/StepRowExamples.cjsx
lsentkiewicz/react-components
25
'use strict' React = require 'react' StepRow = require './StepRow.coffee' Provider = require('react-redux').Provider store = require('appirio-tech-client-app-layer').default initialData = entities: steps: abc: name : 'batman' startsAt : '2015-12-01' endsAt : '2015-12-01' stepType : 'designConcepts' status : 'PROJECT_LAUNCHED' details : submissionsDueBy: '2015-12-01' stepsByProject: abc: items: [] storeInstance = store(initialData) component = -> <Provider store={storeInstance}> <div className="StepRowExample"> <h1>Existing step in editable state</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['UPDATE']} /> <h1>Existing step in view-only mode</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['READ']} /> <h1>New step in editable state</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['UPDATE']} /> <h1>New step in view-only mode</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['READ']} /> </div> </Provider> module.exports = component
113965
'use strict' React = require 'react' StepRow = require './StepRow.coffee' Provider = require('react-redux').Provider store = require('appirio-tech-client-app-layer').default initialData = entities: steps: abc: name : '<NAME>' startsAt : '2015-12-01' endsAt : '2015-12-01' stepType : 'designConcepts' status : 'PROJECT_LAUNCHED' details : submissionsDueBy: '2015-12-01' stepsByProject: abc: items: [] storeInstance = store(initialData) component = -> <Provider store={storeInstance}> <div className="StepRowExample"> <h1>Existing step in editable state</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['UPDATE']} /> <h1>Existing step in view-only mode</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['READ']} /> <h1>New step in editable state</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['UPDATE']} /> <h1>New step in view-only mode</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['READ']} /> </div> </Provider> module.exports = component
true
'use strict' React = require 'react' StepRow = require './StepRow.coffee' Provider = require('react-redux').Provider store = require('appirio-tech-client-app-layer').default initialData = entities: steps: abc: name : 'PI:NAME:<NAME>END_PI' startsAt : '2015-12-01' endsAt : '2015-12-01' stepType : 'designConcepts' status : 'PROJECT_LAUNCHED' details : submissionsDueBy: '2015-12-01' stepsByProject: abc: items: [] storeInstance = store(initialData) component = -> <Provider store={storeInstance}> <div className="StepRowExample"> <h1>Existing step in editable state</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['UPDATE']} /> <h1>Existing step in view-only mode</h1> <StepRow formKey="abc" projectId="abc" stepId="abc" permissions={['READ']} /> <h1>New step in editable state</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['UPDATE']} /> <h1>New step in view-only mode</h1> <StepRow projectId="def" formKey="new" isNew={true} permissions={['READ']} /> </div> </Provider> module.exports = component
[ { "context": "ery.js'\nDebater = require './../debater.coffee'\n\n# Tim Huminski. Level 2\nmodule.exports = class Huminski extends ", "end": 83, "score": 0.9989753365516663, "start": 71, "tag": "NAME", "value": "Tim Huminski" }, { "context": " constructor: (@game) ->\n super(@game, true, 'T HUMINSKI', 1, 3, 'ENGLISH TEACHER')\n\n # set ba", "end": 192, "score": 0.9881459474563599, "start": 191, "tag": "NAME", "value": "T" }, { "context": " constructor: (@game) ->\n super(@game, true, 'T HUMINSKI', 1, 3, 'ENGLISH TEACHER')\n\n # set basic stati", "end": 201, "score": 0.9734691977500916, "start": 193, "tag": "NAME", "value": "HUMINSKI" } ]
src/js/debaters/huminski.coffee
nagn/Battle-Resolution
0
$ = require 'lib/jquery.js' Debater = require './../debater.coffee' # Tim Huminski. Level 2 module.exports = class Huminski extends Debater constructor: (@game) -> super(@game, true, 'T HUMINSKI', 1, 3, 'ENGLISH TEACHER') # set basic statis # ALREADY SET (constructed) # @case (HP) # @level (speaker score) (Lvl) # @type (type) @clash = 2 # ATTACK @presentation = 4 # SP. ATTACK @organization = 1 # SPEED @civility = 5 # Totally arbitrary @cross = 1 # DEFENCE Sandal = require 'moves/sandal.coffee' @addMove(new Sandal()) Ramble = require 'moves/ramble.coffee' @addMove(new Ramble())
115333
$ = require 'lib/jquery.js' Debater = require './../debater.coffee' # <NAME>. Level 2 module.exports = class Huminski extends Debater constructor: (@game) -> super(@game, true, '<NAME> <NAME>', 1, 3, 'ENGLISH TEACHER') # set basic statis # ALREADY SET (constructed) # @case (HP) # @level (speaker score) (Lvl) # @type (type) @clash = 2 # ATTACK @presentation = 4 # SP. ATTACK @organization = 1 # SPEED @civility = 5 # Totally arbitrary @cross = 1 # DEFENCE Sandal = require 'moves/sandal.coffee' @addMove(new Sandal()) Ramble = require 'moves/ramble.coffee' @addMove(new Ramble())
true
$ = require 'lib/jquery.js' Debater = require './../debater.coffee' # PI:NAME:<NAME>END_PI. Level 2 module.exports = class Huminski extends Debater constructor: (@game) -> super(@game, true, 'PI:NAME:<NAME>END_PI PI:NAME:<NAME>END_PI', 1, 3, 'ENGLISH TEACHER') # set basic statis # ALREADY SET (constructed) # @case (HP) # @level (speaker score) (Lvl) # @type (type) @clash = 2 # ATTACK @presentation = 4 # SP. ATTACK @organization = 1 # SPEED @civility = 5 # Totally arbitrary @cross = 1 # DEFENCE Sandal = require 'moves/sandal.coffee' @addMove(new Sandal()) Ramble = require 'moves/ramble.coffee' @addMove(new Ramble())
[ { "context": "###\n EasyWebWorker v0.2\n Rames Aliyev -2013\n\n -> easywebworker.com\n###\n\n# EASY-WEB-WOR", "end": 39, "score": 0.9998869895935059, "start": 27, "tag": "NAME", "value": "Rames Aliyev" } ]
easy-web-worker.coffee
tayfunerbilen/EasyWebWorker
0
### EasyWebWorker v0.2 Rames Aliyev -2013 -> easywebworker.com ### # EASY-WEB-WORKER CORE # Abstract Execute Structure for worker controllers. class _ExecuteStructure # Execute function. execute: (args) -> # Copy arguments to avoid "DataCloneError: The object could not be cloned." (arg for arg in args) # Listen for communication. listen: (event) -> # Separate funcName and arguments. args = event.data funcName = args[0] args = args.slice(1) # Add event as first argument. args.unshift(event) # If function name contains . (dot) process it as nested function. if funcName.indexOf(".") isnt -1 # Split name. nestedFunc = funcName.split(".") # Check if target function is assigned to window and script running on browser. if nestedFunc[0] is "window" and event.caller is "WebWorker" funcName = window nestedFunc = nestedFunc.slice(1) else funcName = @context # Get nesting depth. depth = nestedFunc.length # Reach function. for func, order in nestedFunc funcName = funcName[func] # Correct context. context = funcName if order is depth - 2 # Execute nested function with correct context. funcName.apply(context, args) else # If function is single, direct execute it. @context[funcName].apply(@context, args) # Browser side web worker controller. class EasyWebWorker extends _ExecuteStructure # Create worker, get context and create listeners. constructor: (@fileUrl, @callerContext, startupData) -> # Assign context as Caller's context. @context = @callerContext # Create QueryString for startupData # If url also has QueryString add data as last value if startupData? joiner = if @fileUrl.indexOf("?") isnt -1 then "&" else "?" queryString = unless startupData is null then JSON.stringify(startupData) else null @fileUrl += joiner + queryString # Create worker. # Send EasyWebWorker's context to Webworker fallback. @worker = new Worker(@fileUrl, this) # Listen for messages. @worker.onmessage = () => @listen.apply(@, arguments) # Error statement. @worker.onerror = (event) => @error.call(@, event, event.filename, event.lineno, event.message) # Add special tag on listen event listen: (event) -> event.caller = "WebWorker" super(event) # Execute worker function. execute: () -> # Pass arguments to web worker. @worker.postMessage(super(arguments)) # Error statement. error: () -> # Execute onError function if assigned. @onerror.apply(@callerContext, arguments) if @onerror instanceof Function # Terminate worker. terminate: () -> # Close worker from browser. @worker.terminate() # Terminate alias. close: () -> # Close worker from browser. @worker.terminate() # Worker side web worker controller. class _WorkerSideController extends _ExecuteStructure # Get context and create listeners. constructor: (@self) -> # Assign context as Worker's context. @context = @self # Get startup data from href and convert it to js object. locationHref = @self.location.href # Check the joiner if locationHref.indexOf("&") isnt -1 splitBy = "&" else if locationHref.indexOf("?") isnt -1 splitBy = "?" else splitBy = false # If href has starupData if splitBy isnt false startupData = locationHref.split(splitBy) startupData = startupData[startupData.length-1] # If startupData exist if startupData isnt null and startupData isnt undefined @self.startupData = JSON.parse(decodeURIComponent(startupData)) else @self.startupData = null # Listen for messages. @self.onmessage = () => @listen.apply(@, arguments) # Add special tag on listen event listen: (event) -> event.caller = "WebBrowser" super(event) # Execute browser function. execute: () -> # Pass arguments to web worker. @self.postMessage(super(arguments)) # Call window.console.log function log: () -> @self.execute("window.console.log", arguments) # FALLBACKS # Fallback for WorkerSideController class _WorkerSideFallback extends _WorkerSideController constructor: () -> # Run WorkerSideController's contruction with artifical location href. super({location:{href:easyWebWorkerInstance.fileUrl}}) # Assign startup data. @startupData = @self.startupData # Terminate fake worker by assign empty function. terminate: () -> easyWebWorkerInstance.worker.terminate() # Imitate console log. log: () -> console.log.apply(console, arguments) # Post message to EasyWebWorker's listener with fake event in itself context. execute: () -> easyWebWorkerInstance.listen.call(easyWebWorkerInstance, {worker_fallback:true, data:(arg for arg in arguments)}) # HTML5 Web Worker Fallback. class _WorkerFallback # Import Scripts regular expression. importscripts_regexp = /importScripts\("(.*)"\);?/gi # When worker created load the file. # Main: main web worker file. # Files: Our filename and content container. # Quene: Push jobs to quene before all scripts are loaded. # Depth: The depth of importScripts. # Worker: Fake worker. constructor: (file, @easyWebWorkerInstance, @files={}, @quene=[], @depth=0, @worker=null) -> # Avoid create fallback twice. window._WorkerPrepared = true # Load main script. @_loadFile(file, true) # Load files with ajax. _loadFile: (file, is_main=false) -> # Our script container. content = null # If its not main file, set content as null for mark it as "in progress". @files[file].content = null unless is_main # Create XHR Object. XHR = new XMLHttpRequest() or new ActiveXObject("Msxml2.XMLHTTP") or new ActiveXObject("Microsoft.XMLHTTP") # Assign loaded event. XHR.onreadystatechange = () => if XHR.readyState is 4 and (XHR.status is 200 or window.location.href.indexOf("http") is -1) # Get loaded content. content = XHR.responseText # Set it as main if its our main worker file. if is_main @files['main'] = {content: content, depth:0} # If its not else @files[file].content = content # Import outer scripts. @_importScripts(content) # Get the script. XHR.open('GET', file, true) XHR.send(null) # Search for importScripts _importScripts: (content) -> # Find matches. matches = content.match(importscripts_regexp) # Push files to load quene. if matches? # Increase depth @depth++ # Add importScripts into files container to load and process them by right depth order. for matched in matches @files[matched.replace(importscripts_regexp, "$1")] = {content: undefined, depth:@depth} # Load files. for filename, data of @files when data.content is undefined and filename isnt "main" @_loadFile(filename) # Check if all files loaded. all_loaded = true for filename, data of @files all_loaded = false if data.content is undefined or data.content is null # If all files are loaded, combine all scripts togehter. if all_loaded # Handle all depth of imports. while @depth-- # Get parents of depth for filename, data of @files when data.depth is @depth # Replace importScript() with script itself. @files[filename].content = @files[filename].content.replace importscripts_regexp, (to_replace, filename, pos, content) => @files[filename].content # Initialize script. @_initializeScript(@files.main.content) # Run script within wrapper. _initializeScript: (script) => # Create IIFE for encapsulation. # In private scope run script. do () => # Gather runtime variables. easyWebWorkerInstance = @easyWebWorkerInstance # Eval whole script. eval(script) # Create WorkerSideController with fallback support. self = new _WorkerSideFallback() # Assign Worker Fallback's worker to function executer. @worker = (command) -> # Fake event. event = {caller:"WebBrowser", command:command} # Analyse command. funcName = command[0] args = command.slice(1) # Unshift fake event into args. args.unshift(event) # Find correct context for worker function. # If nested function. if funcName.indexOf(".") isnt -1 funcContext = funcName.split(".") funcContext.pop() funcContext = funcContext.join(".") funcContext = eval(funcContext) # If root function. else funcContext = eval(funcName) # Execute. eval(funcName).apply(funcContext, args) # Run cached commands after initialize completed. for command in @quene @worker(command) # Execute scripts postMessage: (command) -> # If all script loaded and worker initialized run command. if @worker? @worker(command) # Else add command into command cache else @quene.push(command) # Terminate worker by assign it to empty function. terminate: () => @worker = () -> null # STARTUP PROCESS # Create web worker fallback if browser doesnt support Web Workers. if this.document isnt undefined and !window.Worker and !window._WorkerPrepared window.Worker = _WorkerFallback # If in a worker run automaticly. if this.document is undefined # Create controller. self.caller = new _WorkerSideController(self) # Create function alias. self.execute = self.caller.execute self.log = self.caller.log
194182
### EasyWebWorker v0.2 <NAME> -2013 -> easywebworker.com ### # EASY-WEB-WORKER CORE # Abstract Execute Structure for worker controllers. class _ExecuteStructure # Execute function. execute: (args) -> # Copy arguments to avoid "DataCloneError: The object could not be cloned." (arg for arg in args) # Listen for communication. listen: (event) -> # Separate funcName and arguments. args = event.data funcName = args[0] args = args.slice(1) # Add event as first argument. args.unshift(event) # If function name contains . (dot) process it as nested function. if funcName.indexOf(".") isnt -1 # Split name. nestedFunc = funcName.split(".") # Check if target function is assigned to window and script running on browser. if nestedFunc[0] is "window" and event.caller is "WebWorker" funcName = window nestedFunc = nestedFunc.slice(1) else funcName = @context # Get nesting depth. depth = nestedFunc.length # Reach function. for func, order in nestedFunc funcName = funcName[func] # Correct context. context = funcName if order is depth - 2 # Execute nested function with correct context. funcName.apply(context, args) else # If function is single, direct execute it. @context[funcName].apply(@context, args) # Browser side web worker controller. class EasyWebWorker extends _ExecuteStructure # Create worker, get context and create listeners. constructor: (@fileUrl, @callerContext, startupData) -> # Assign context as Caller's context. @context = @callerContext # Create QueryString for startupData # If url also has QueryString add data as last value if startupData? joiner = if @fileUrl.indexOf("?") isnt -1 then "&" else "?" queryString = unless startupData is null then JSON.stringify(startupData) else null @fileUrl += joiner + queryString # Create worker. # Send EasyWebWorker's context to Webworker fallback. @worker = new Worker(@fileUrl, this) # Listen for messages. @worker.onmessage = () => @listen.apply(@, arguments) # Error statement. @worker.onerror = (event) => @error.call(@, event, event.filename, event.lineno, event.message) # Add special tag on listen event listen: (event) -> event.caller = "WebWorker" super(event) # Execute worker function. execute: () -> # Pass arguments to web worker. @worker.postMessage(super(arguments)) # Error statement. error: () -> # Execute onError function if assigned. @onerror.apply(@callerContext, arguments) if @onerror instanceof Function # Terminate worker. terminate: () -> # Close worker from browser. @worker.terminate() # Terminate alias. close: () -> # Close worker from browser. @worker.terminate() # Worker side web worker controller. class _WorkerSideController extends _ExecuteStructure # Get context and create listeners. constructor: (@self) -> # Assign context as Worker's context. @context = @self # Get startup data from href and convert it to js object. locationHref = @self.location.href # Check the joiner if locationHref.indexOf("&") isnt -1 splitBy = "&" else if locationHref.indexOf("?") isnt -1 splitBy = "?" else splitBy = false # If href has starupData if splitBy isnt false startupData = locationHref.split(splitBy) startupData = startupData[startupData.length-1] # If startupData exist if startupData isnt null and startupData isnt undefined @self.startupData = JSON.parse(decodeURIComponent(startupData)) else @self.startupData = null # Listen for messages. @self.onmessage = () => @listen.apply(@, arguments) # Add special tag on listen event listen: (event) -> event.caller = "WebBrowser" super(event) # Execute browser function. execute: () -> # Pass arguments to web worker. @self.postMessage(super(arguments)) # Call window.console.log function log: () -> @self.execute("window.console.log", arguments) # FALLBACKS # Fallback for WorkerSideController class _WorkerSideFallback extends _WorkerSideController constructor: () -> # Run WorkerSideController's contruction with artifical location href. super({location:{href:easyWebWorkerInstance.fileUrl}}) # Assign startup data. @startupData = @self.startupData # Terminate fake worker by assign empty function. terminate: () -> easyWebWorkerInstance.worker.terminate() # Imitate console log. log: () -> console.log.apply(console, arguments) # Post message to EasyWebWorker's listener with fake event in itself context. execute: () -> easyWebWorkerInstance.listen.call(easyWebWorkerInstance, {worker_fallback:true, data:(arg for arg in arguments)}) # HTML5 Web Worker Fallback. class _WorkerFallback # Import Scripts regular expression. importscripts_regexp = /importScripts\("(.*)"\);?/gi # When worker created load the file. # Main: main web worker file. # Files: Our filename and content container. # Quene: Push jobs to quene before all scripts are loaded. # Depth: The depth of importScripts. # Worker: Fake worker. constructor: (file, @easyWebWorkerInstance, @files={}, @quene=[], @depth=0, @worker=null) -> # Avoid create fallback twice. window._WorkerPrepared = true # Load main script. @_loadFile(file, true) # Load files with ajax. _loadFile: (file, is_main=false) -> # Our script container. content = null # If its not main file, set content as null for mark it as "in progress". @files[file].content = null unless is_main # Create XHR Object. XHR = new XMLHttpRequest() or new ActiveXObject("Msxml2.XMLHTTP") or new ActiveXObject("Microsoft.XMLHTTP") # Assign loaded event. XHR.onreadystatechange = () => if XHR.readyState is 4 and (XHR.status is 200 or window.location.href.indexOf("http") is -1) # Get loaded content. content = XHR.responseText # Set it as main if its our main worker file. if is_main @files['main'] = {content: content, depth:0} # If its not else @files[file].content = content # Import outer scripts. @_importScripts(content) # Get the script. XHR.open('GET', file, true) XHR.send(null) # Search for importScripts _importScripts: (content) -> # Find matches. matches = content.match(importscripts_regexp) # Push files to load quene. if matches? # Increase depth @depth++ # Add importScripts into files container to load and process them by right depth order. for matched in matches @files[matched.replace(importscripts_regexp, "$1")] = {content: undefined, depth:@depth} # Load files. for filename, data of @files when data.content is undefined and filename isnt "main" @_loadFile(filename) # Check if all files loaded. all_loaded = true for filename, data of @files all_loaded = false if data.content is undefined or data.content is null # If all files are loaded, combine all scripts togehter. if all_loaded # Handle all depth of imports. while @depth-- # Get parents of depth for filename, data of @files when data.depth is @depth # Replace importScript() with script itself. @files[filename].content = @files[filename].content.replace importscripts_regexp, (to_replace, filename, pos, content) => @files[filename].content # Initialize script. @_initializeScript(@files.main.content) # Run script within wrapper. _initializeScript: (script) => # Create IIFE for encapsulation. # In private scope run script. do () => # Gather runtime variables. easyWebWorkerInstance = @easyWebWorkerInstance # Eval whole script. eval(script) # Create WorkerSideController with fallback support. self = new _WorkerSideFallback() # Assign Worker Fallback's worker to function executer. @worker = (command) -> # Fake event. event = {caller:"WebBrowser", command:command} # Analyse command. funcName = command[0] args = command.slice(1) # Unshift fake event into args. args.unshift(event) # Find correct context for worker function. # If nested function. if funcName.indexOf(".") isnt -1 funcContext = funcName.split(".") funcContext.pop() funcContext = funcContext.join(".") funcContext = eval(funcContext) # If root function. else funcContext = eval(funcName) # Execute. eval(funcName).apply(funcContext, args) # Run cached commands after initialize completed. for command in @quene @worker(command) # Execute scripts postMessage: (command) -> # If all script loaded and worker initialized run command. if @worker? @worker(command) # Else add command into command cache else @quene.push(command) # Terminate worker by assign it to empty function. terminate: () => @worker = () -> null # STARTUP PROCESS # Create web worker fallback if browser doesnt support Web Workers. if this.document isnt undefined and !window.Worker and !window._WorkerPrepared window.Worker = _WorkerFallback # If in a worker run automaticly. if this.document is undefined # Create controller. self.caller = new _WorkerSideController(self) # Create function alias. self.execute = self.caller.execute self.log = self.caller.log
true
### EasyWebWorker v0.2 PI:NAME:<NAME>END_PI -2013 -> easywebworker.com ### # EASY-WEB-WORKER CORE # Abstract Execute Structure for worker controllers. class _ExecuteStructure # Execute function. execute: (args) -> # Copy arguments to avoid "DataCloneError: The object could not be cloned." (arg for arg in args) # Listen for communication. listen: (event) -> # Separate funcName and arguments. args = event.data funcName = args[0] args = args.slice(1) # Add event as first argument. args.unshift(event) # If function name contains . (dot) process it as nested function. if funcName.indexOf(".") isnt -1 # Split name. nestedFunc = funcName.split(".") # Check if target function is assigned to window and script running on browser. if nestedFunc[0] is "window" and event.caller is "WebWorker" funcName = window nestedFunc = nestedFunc.slice(1) else funcName = @context # Get nesting depth. depth = nestedFunc.length # Reach function. for func, order in nestedFunc funcName = funcName[func] # Correct context. context = funcName if order is depth - 2 # Execute nested function with correct context. funcName.apply(context, args) else # If function is single, direct execute it. @context[funcName].apply(@context, args) # Browser side web worker controller. class EasyWebWorker extends _ExecuteStructure # Create worker, get context and create listeners. constructor: (@fileUrl, @callerContext, startupData) -> # Assign context as Caller's context. @context = @callerContext # Create QueryString for startupData # If url also has QueryString add data as last value if startupData? joiner = if @fileUrl.indexOf("?") isnt -1 then "&" else "?" queryString = unless startupData is null then JSON.stringify(startupData) else null @fileUrl += joiner + queryString # Create worker. # Send EasyWebWorker's context to Webworker fallback. @worker = new Worker(@fileUrl, this) # Listen for messages. @worker.onmessage = () => @listen.apply(@, arguments) # Error statement. @worker.onerror = (event) => @error.call(@, event, event.filename, event.lineno, event.message) # Add special tag on listen event listen: (event) -> event.caller = "WebWorker" super(event) # Execute worker function. execute: () -> # Pass arguments to web worker. @worker.postMessage(super(arguments)) # Error statement. error: () -> # Execute onError function if assigned. @onerror.apply(@callerContext, arguments) if @onerror instanceof Function # Terminate worker. terminate: () -> # Close worker from browser. @worker.terminate() # Terminate alias. close: () -> # Close worker from browser. @worker.terminate() # Worker side web worker controller. class _WorkerSideController extends _ExecuteStructure # Get context and create listeners. constructor: (@self) -> # Assign context as Worker's context. @context = @self # Get startup data from href and convert it to js object. locationHref = @self.location.href # Check the joiner if locationHref.indexOf("&") isnt -1 splitBy = "&" else if locationHref.indexOf("?") isnt -1 splitBy = "?" else splitBy = false # If href has starupData if splitBy isnt false startupData = locationHref.split(splitBy) startupData = startupData[startupData.length-1] # If startupData exist if startupData isnt null and startupData isnt undefined @self.startupData = JSON.parse(decodeURIComponent(startupData)) else @self.startupData = null # Listen for messages. @self.onmessage = () => @listen.apply(@, arguments) # Add special tag on listen event listen: (event) -> event.caller = "WebBrowser" super(event) # Execute browser function. execute: () -> # Pass arguments to web worker. @self.postMessage(super(arguments)) # Call window.console.log function log: () -> @self.execute("window.console.log", arguments) # FALLBACKS # Fallback for WorkerSideController class _WorkerSideFallback extends _WorkerSideController constructor: () -> # Run WorkerSideController's contruction with artifical location href. super({location:{href:easyWebWorkerInstance.fileUrl}}) # Assign startup data. @startupData = @self.startupData # Terminate fake worker by assign empty function. terminate: () -> easyWebWorkerInstance.worker.terminate() # Imitate console log. log: () -> console.log.apply(console, arguments) # Post message to EasyWebWorker's listener with fake event in itself context. execute: () -> easyWebWorkerInstance.listen.call(easyWebWorkerInstance, {worker_fallback:true, data:(arg for arg in arguments)}) # HTML5 Web Worker Fallback. class _WorkerFallback # Import Scripts regular expression. importscripts_regexp = /importScripts\("(.*)"\);?/gi # When worker created load the file. # Main: main web worker file. # Files: Our filename and content container. # Quene: Push jobs to quene before all scripts are loaded. # Depth: The depth of importScripts. # Worker: Fake worker. constructor: (file, @easyWebWorkerInstance, @files={}, @quene=[], @depth=0, @worker=null) -> # Avoid create fallback twice. window._WorkerPrepared = true # Load main script. @_loadFile(file, true) # Load files with ajax. _loadFile: (file, is_main=false) -> # Our script container. content = null # If its not main file, set content as null for mark it as "in progress". @files[file].content = null unless is_main # Create XHR Object. XHR = new XMLHttpRequest() or new ActiveXObject("Msxml2.XMLHTTP") or new ActiveXObject("Microsoft.XMLHTTP") # Assign loaded event. XHR.onreadystatechange = () => if XHR.readyState is 4 and (XHR.status is 200 or window.location.href.indexOf("http") is -1) # Get loaded content. content = XHR.responseText # Set it as main if its our main worker file. if is_main @files['main'] = {content: content, depth:0} # If its not else @files[file].content = content # Import outer scripts. @_importScripts(content) # Get the script. XHR.open('GET', file, true) XHR.send(null) # Search for importScripts _importScripts: (content) -> # Find matches. matches = content.match(importscripts_regexp) # Push files to load quene. if matches? # Increase depth @depth++ # Add importScripts into files container to load and process them by right depth order. for matched in matches @files[matched.replace(importscripts_regexp, "$1")] = {content: undefined, depth:@depth} # Load files. for filename, data of @files when data.content is undefined and filename isnt "main" @_loadFile(filename) # Check if all files loaded. all_loaded = true for filename, data of @files all_loaded = false if data.content is undefined or data.content is null # If all files are loaded, combine all scripts togehter. if all_loaded # Handle all depth of imports. while @depth-- # Get parents of depth for filename, data of @files when data.depth is @depth # Replace importScript() with script itself. @files[filename].content = @files[filename].content.replace importscripts_regexp, (to_replace, filename, pos, content) => @files[filename].content # Initialize script. @_initializeScript(@files.main.content) # Run script within wrapper. _initializeScript: (script) => # Create IIFE for encapsulation. # In private scope run script. do () => # Gather runtime variables. easyWebWorkerInstance = @easyWebWorkerInstance # Eval whole script. eval(script) # Create WorkerSideController with fallback support. self = new _WorkerSideFallback() # Assign Worker Fallback's worker to function executer. @worker = (command) -> # Fake event. event = {caller:"WebBrowser", command:command} # Analyse command. funcName = command[0] args = command.slice(1) # Unshift fake event into args. args.unshift(event) # Find correct context for worker function. # If nested function. if funcName.indexOf(".") isnt -1 funcContext = funcName.split(".") funcContext.pop() funcContext = funcContext.join(".") funcContext = eval(funcContext) # If root function. else funcContext = eval(funcName) # Execute. eval(funcName).apply(funcContext, args) # Run cached commands after initialize completed. for command in @quene @worker(command) # Execute scripts postMessage: (command) -> # If all script loaded and worker initialized run command. if @worker? @worker(command) # Else add command into command cache else @quene.push(command) # Terminate worker by assign it to empty function. terminate: () => @worker = () -> null # STARTUP PROCESS # Create web worker fallback if browser doesnt support Web Workers. if this.document isnt undefined and !window.Worker and !window._WorkerPrepared window.Worker = _WorkerFallback # If in a worker run automaticly. if this.document is undefined # Create controller. self.caller = new _WorkerSideController(self) # Create function alias. self.execute = self.caller.execute self.log = self.caller.log
[ { "context": "# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public Li", "end": 43, "score": 0.9999161958694458, "start": 29, "tag": "EMAIL", "value": "contact@ppy.sh" } ]
resources/assets/coffee/_classes/polyfills.coffee
osu-katakuna/osu-katakuna-web
5
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. class @Polyfills constructor: -> @customEvent() @localStorage() @mathTrunc() @composedPath() # Event.composedPath polyfill for Edge. # Actual composedPath logic is a bit more complicated but this works for our usage # until it gets implemented in Edge. composedPath: -> return if typeof Event.prototype.composedPath == 'function' Event.prototype.composedPath = -> target = @target path = [] while target.parentNode? path.push target target = target.parentNode path.push document, window return path # For IE9+. # Reference: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent customEvent: -> return if typeof CustomEvent == 'function' customEvent = (event, params) -> params ?= bubbles: false cancelable: false detail: undefined evt = document.createEvent 'CustomEvent' evt.initCustomEvent event, params.bubbles, params.cancelable, params.detail evt customEvent.prototype = window.Event.prototype window.CustomEvent = customEvent # Mainly for Safari Private Mode. localStorage: -> try window.localStorage.setItem '_test', '1' window.localStorage.removeItem '_test' catch localStorage = new DumbStorage window.localStorage = localStorage window.localStorage.__proto__ = localStorage # For IE. # Reference: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc mathTrunc: -> Math.trunc ?= (x) -> x - x % 1
168899
# Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. class @Polyfills constructor: -> @customEvent() @localStorage() @mathTrunc() @composedPath() # Event.composedPath polyfill for Edge. # Actual composedPath logic is a bit more complicated but this works for our usage # until it gets implemented in Edge. composedPath: -> return if typeof Event.prototype.composedPath == 'function' Event.prototype.composedPath = -> target = @target path = [] while target.parentNode? path.push target target = target.parentNode path.push document, window return path # For IE9+. # Reference: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent customEvent: -> return if typeof CustomEvent == 'function' customEvent = (event, params) -> params ?= bubbles: false cancelable: false detail: undefined evt = document.createEvent 'CustomEvent' evt.initCustomEvent event, params.bubbles, params.cancelable, params.detail evt customEvent.prototype = window.Event.prototype window.CustomEvent = customEvent # Mainly for Safari Private Mode. localStorage: -> try window.localStorage.setItem '_test', '1' window.localStorage.removeItem '_test' catch localStorage = new DumbStorage window.localStorage = localStorage window.localStorage.__proto__ = localStorage # For IE. # Reference: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc mathTrunc: -> Math.trunc ?= (x) -> x - x % 1
true
# Copyright (c) ppy Pty Ltd <PI:EMAIL:<EMAIL>END_PI>. Licensed under the GNU Affero General Public License v3.0. # See the LICENCE file in the repository root for full licence text. class @Polyfills constructor: -> @customEvent() @localStorage() @mathTrunc() @composedPath() # Event.composedPath polyfill for Edge. # Actual composedPath logic is a bit more complicated but this works for our usage # until it gets implemented in Edge. composedPath: -> return if typeof Event.prototype.composedPath == 'function' Event.prototype.composedPath = -> target = @target path = [] while target.parentNode? path.push target target = target.parentNode path.push document, window return path # For IE9+. # Reference: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent customEvent: -> return if typeof CustomEvent == 'function' customEvent = (event, params) -> params ?= bubbles: false cancelable: false detail: undefined evt = document.createEvent 'CustomEvent' evt.initCustomEvent event, params.bubbles, params.cancelable, params.detail evt customEvent.prototype = window.Event.prototype window.CustomEvent = customEvent # Mainly for Safari Private Mode. localStorage: -> try window.localStorage.setItem '_test', '1' window.localStorage.removeItem '_test' catch localStorage = new DumbStorage window.localStorage = localStorage window.localStorage.__proto__ = localStorage # For IE. # Reference: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc mathTrunc: -> Math.trunc ?= (x) -> x - x % 1
[ { "context": "### EventManager, v1.0.1\n*\n* Copyright (c) 2009, Howard Rauscher\n* Licensed under the MIT License\n###\n\n#Based on t", "end": 64, "score": 0.9998105764389038, "start": 49, "tag": "NAME", "value": "Howard Rauscher" }, { "context": "e\n###\n\n#Based on the code https://gist.github.com/howardr/118668 - thanks!\n\nexport default class EventManag", "end": 153, "score": 0.999567985534668, "start": 146, "tag": "USERNAME", "value": "howardr" } ]
src/events/event-manager.coffee
JacobShirley95/ecollision
3
### EventManager, v1.0.1 * * Copyright (c) 2009, Howard Rauscher * Licensed under the MIT License ### #Based on the code https://gist.github.com/howardr/118668 - thanks! export default class EventManager class EventArg constructor: (@name, @data) -> @cancelled = false; @removed = false; cancel: -> @cancelled = true; remove: -> @removed = true; constructor: -> @_listeners = [] addListener: (name, fn) -> (@_listeners[name] = @_listeners[name] || []).push(fn) return @ removeListener: (name, fn) -> if(arguments.length == 1) @_listeners[name] = [] else if(typeof(fn) == 'function') listeners = @_listeners[name] if(listeners != undefined) foundAt = -1 for listener,i in listeners if(listener == fn) foundAt = i break if(foundAt >= 0) listeners.splice(foundAt, 1); return @ fire: (name, args) -> listeners = @_listeners[name] args = args || [] if(listeners != undefined) data = {} evt = null for listener,i in listeners evt = new EventArg(name, data) listener.apply(window, args.concat(evt)) data = evt.data if(evt.removed) listeners.splice(i, 1) len = listeners.length --i if(evt.cancelled) break return @ hasListeners: (name) -> return (@_listeners[name] == undefined ? 0 : @_listeners[name].length) > 0 @eventify: (object, manager) -> methods = ['addListener', 'removeListener', 'fire'] manager = manager || new EventManager() func = (method) -> object[method] = -> return manager[method].apply(manager, arguments) func(method) for method in methods
115483
### EventManager, v1.0.1 * * Copyright (c) 2009, <NAME> * Licensed under the MIT License ### #Based on the code https://gist.github.com/howardr/118668 - thanks! export default class EventManager class EventArg constructor: (@name, @data) -> @cancelled = false; @removed = false; cancel: -> @cancelled = true; remove: -> @removed = true; constructor: -> @_listeners = [] addListener: (name, fn) -> (@_listeners[name] = @_listeners[name] || []).push(fn) return @ removeListener: (name, fn) -> if(arguments.length == 1) @_listeners[name] = [] else if(typeof(fn) == 'function') listeners = @_listeners[name] if(listeners != undefined) foundAt = -1 for listener,i in listeners if(listener == fn) foundAt = i break if(foundAt >= 0) listeners.splice(foundAt, 1); return @ fire: (name, args) -> listeners = @_listeners[name] args = args || [] if(listeners != undefined) data = {} evt = null for listener,i in listeners evt = new EventArg(name, data) listener.apply(window, args.concat(evt)) data = evt.data if(evt.removed) listeners.splice(i, 1) len = listeners.length --i if(evt.cancelled) break return @ hasListeners: (name) -> return (@_listeners[name] == undefined ? 0 : @_listeners[name].length) > 0 @eventify: (object, manager) -> methods = ['addListener', 'removeListener', 'fire'] manager = manager || new EventManager() func = (method) -> object[method] = -> return manager[method].apply(manager, arguments) func(method) for method in methods
true
### EventManager, v1.0.1 * * Copyright (c) 2009, PI:NAME:<NAME>END_PI * Licensed under the MIT License ### #Based on the code https://gist.github.com/howardr/118668 - thanks! export default class EventManager class EventArg constructor: (@name, @data) -> @cancelled = false; @removed = false; cancel: -> @cancelled = true; remove: -> @removed = true; constructor: -> @_listeners = [] addListener: (name, fn) -> (@_listeners[name] = @_listeners[name] || []).push(fn) return @ removeListener: (name, fn) -> if(arguments.length == 1) @_listeners[name] = [] else if(typeof(fn) == 'function') listeners = @_listeners[name] if(listeners != undefined) foundAt = -1 for listener,i in listeners if(listener == fn) foundAt = i break if(foundAt >= 0) listeners.splice(foundAt, 1); return @ fire: (name, args) -> listeners = @_listeners[name] args = args || [] if(listeners != undefined) data = {} evt = null for listener,i in listeners evt = new EventArg(name, data) listener.apply(window, args.concat(evt)) data = evt.data if(evt.removed) listeners.splice(i, 1) len = listeners.length --i if(evt.cancelled) break return @ hasListeners: (name) -> return (@_listeners[name] == undefined ? 0 : @_listeners[name].length) > 0 @eventify: (object, manager) -> methods = ['addListener', 'removeListener', 'fire'] manager = manager || new EventManager() func = (method) -> object[method] = -> return manager[method].apply(manager, arguments) func(method) for method in methods
[ { "context": "# Droplet BASIC mode\n#\n# Copyright (c) Anthony Bau\n# MIT License\n\nshell = require '../../vendor/shel", "end": 50, "score": 0.9998829960823059, "start": 39, "tag": "NAME", "value": "Anthony Bau" } ]
src/languages/shell.coffee
takeratta/droplet
145
# Droplet BASIC mode # # Copyright (c) Anthony Bau # MIT License shell = require '../../vendor/shell.js' window.shell = shell return
143074
# Droplet BASIC mode # # Copyright (c) <NAME> # MIT License shell = require '../../vendor/shell.js' window.shell = shell return
true
# Droplet BASIC mode # # Copyright (c) PI:NAME:<NAME>END_PI # MIT License shell = require '../../vendor/shell.js' window.shell = shell return
[ { "context": " hubot ツイート止めて - ツイートを教えるのを止めるよー\n#\n# Author:\n# aha-oretama <sekine_y_529@msn.com>\n#\n\nTwit = require 'twit'\n\n", "end": 355, "score": 0.998203456401825, "start": 344, "tag": "USERNAME", "value": "aha-oretama" }, { "context": "めて - ツイートを教えるのを止めるよー\n#\n# Author:\n# aha-oretama <sekine_y_529@msn.com>\n#\n\nTwit = require 'twit'\n\nconfig =\n consumer_ke", "end": 377, "score": 0.9999209046363831, "start": 357, "tag": "EMAIL", "value": "sekine_y_529@msn.com" }, { "context": "{tweet.id_str}\" unless tweet.user.screen_name is 'oretamaBot'\n\n stream.on 'disconnect', (disconnectMessage) -", "end": 1393, "score": 0.9989190101623535, "start": 1383, "tag": "USERNAME", "value": "oretamaBot" }, { "context": "f msg.hasOwnProperty(\"command\")\n msg.command \"@#{item.user}\" + message\n else\n msg.send message\n", "end": 1891, "score": 0.6347008347511292, "start": 1891, "tag": "USERNAME", "value": "" }, { "context": "hasOwnProperty(\"command\")\n msg.command \"@#{item.user}\" + message\n else\n msg.send message\n\n\nmodule.", "end": 1902, "score": 0.9375510215759277, "start": 1898, "tag": "USERNAME", "value": "user" } ]
scripts/twitter-search.coffee
aha-oretama/oretamaBot
0
# Description: # Continue to search query on Twitter and to tweets. # # Dependencies: # "twit": "1.1.x" # # Configuration: # HUBOT_TWITTER_KEY # HUBOT_TWITTER_SECRET # HUBOT_TWITTER_TOKEN # HUBOT_TWITTER_TOKEN_SECRET # # Commands: # hubot ツイート流して <query> - 指定したツイートが流れたら教えてあげるよー # hubot ツイート止めて - ツイートを教えるのを止めるよー # # Author: # aha-oretama <sekine_y_529@msn.com> # Twit = require 'twit' config = consumer_key: process.env.HUBOT_TWITTER_KEY consumer_secret: process.env.HUBOT_TWITTER_SECRET access_token: process.env.HUBOT_TWITTER_TOKEN access_token_secret: process.env.HUBOT_TWITTER_TOKEN_SECRET getTwit = -> unless twit twit = new Twit config return twit createStream = (robot, msg, twit, stream, user, queryAndUser) -> newQuery = [] queryAndUser.forEach (query) -> newQuery = newQuery.concat(query) # TODO: アンド検索ができない stream.stop() if stream stream = twit.stream('statuses/filter', { track: newQuery,language: 'ja' }) console.log queryAndUser stream.on 'tweet', (tweet) -> queryAndUser.forEach (itemQueries, itemUser) -> for itemQuery in itemQueries # 複数ユーザ、複数ワードの同時検索に対応 if tweet.text.includes(itemQuery) and user is itemUser sendMessage robot, msg, itemUser, "#{itemQuery}見つかったよー https://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id_str}" unless tweet.user.screen_name is 'oretamaBot' stream.on 'disconnect', (disconnectMessage) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser "ツイート流すが切れたー。理由: #{disconnectMessage}" stream.on 'reconnect', (request, response, connectInterval) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser, "ちょっと切れちゃった。再開は #{connectInterval/1000}秒後" return stream sendMessage = (robot, msg, user, message) -> if msg.hasOwnProperty("command") msg.command "@#{item.user}" + message else msg.send message module.exports = (robot) -> twit = undefined stream = undefined queryAndUser = new Map() robot.respond /ツイート流して (\S+)$/i, (msg) -> query = msg.match[1] user = msg.envelope.user.name twit = getTwit() oldQuery = queryAndUser.get(user) if oldQuery is undefined queryAndUser.set(user,[query]) else oldQuery.push(query) queryAndUser.set(user, oldQuery) # ツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート流すよー' robot.respond /ツイート止めて/i, (msg) -> user = msg.envelope.user.name queryAndUser.delete(user) if queryAndUser.size is 0 stream.stop() if stream stream = undefined else # 対象ユーザを除いてツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート止めたよー'
81006
# Description: # Continue to search query on Twitter and to tweets. # # Dependencies: # "twit": "1.1.x" # # Configuration: # HUBOT_TWITTER_KEY # HUBOT_TWITTER_SECRET # HUBOT_TWITTER_TOKEN # HUBOT_TWITTER_TOKEN_SECRET # # Commands: # hubot ツイート流して <query> - 指定したツイートが流れたら教えてあげるよー # hubot ツイート止めて - ツイートを教えるのを止めるよー # # Author: # aha-oretama <<EMAIL>> # Twit = require 'twit' config = consumer_key: process.env.HUBOT_TWITTER_KEY consumer_secret: process.env.HUBOT_TWITTER_SECRET access_token: process.env.HUBOT_TWITTER_TOKEN access_token_secret: process.env.HUBOT_TWITTER_TOKEN_SECRET getTwit = -> unless twit twit = new Twit config return twit createStream = (robot, msg, twit, stream, user, queryAndUser) -> newQuery = [] queryAndUser.forEach (query) -> newQuery = newQuery.concat(query) # TODO: アンド検索ができない stream.stop() if stream stream = twit.stream('statuses/filter', { track: newQuery,language: 'ja' }) console.log queryAndUser stream.on 'tweet', (tweet) -> queryAndUser.forEach (itemQueries, itemUser) -> for itemQuery in itemQueries # 複数ユーザ、複数ワードの同時検索に対応 if tweet.text.includes(itemQuery) and user is itemUser sendMessage robot, msg, itemUser, "#{itemQuery}見つかったよー https://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id_str}" unless tweet.user.screen_name is 'oretamaBot' stream.on 'disconnect', (disconnectMessage) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser "ツイート流すが切れたー。理由: #{disconnectMessage}" stream.on 'reconnect', (request, response, connectInterval) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser, "ちょっと切れちゃった。再開は #{connectInterval/1000}秒後" return stream sendMessage = (robot, msg, user, message) -> if msg.hasOwnProperty("command") msg.command "@#{item.user}" + message else msg.send message module.exports = (robot) -> twit = undefined stream = undefined queryAndUser = new Map() robot.respond /ツイート流して (\S+)$/i, (msg) -> query = msg.match[1] user = msg.envelope.user.name twit = getTwit() oldQuery = queryAndUser.get(user) if oldQuery is undefined queryAndUser.set(user,[query]) else oldQuery.push(query) queryAndUser.set(user, oldQuery) # ツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート流すよー' robot.respond /ツイート止めて/i, (msg) -> user = msg.envelope.user.name queryAndUser.delete(user) if queryAndUser.size is 0 stream.stop() if stream stream = undefined else # 対象ユーザを除いてツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート止めたよー'
true
# Description: # Continue to search query on Twitter and to tweets. # # Dependencies: # "twit": "1.1.x" # # Configuration: # HUBOT_TWITTER_KEY # HUBOT_TWITTER_SECRET # HUBOT_TWITTER_TOKEN # HUBOT_TWITTER_TOKEN_SECRET # # Commands: # hubot ツイート流して <query> - 指定したツイートが流れたら教えてあげるよー # hubot ツイート止めて - ツイートを教えるのを止めるよー # # Author: # aha-oretama <PI:EMAIL:<EMAIL>END_PI> # Twit = require 'twit' config = consumer_key: process.env.HUBOT_TWITTER_KEY consumer_secret: process.env.HUBOT_TWITTER_SECRET access_token: process.env.HUBOT_TWITTER_TOKEN access_token_secret: process.env.HUBOT_TWITTER_TOKEN_SECRET getTwit = -> unless twit twit = new Twit config return twit createStream = (robot, msg, twit, stream, user, queryAndUser) -> newQuery = [] queryAndUser.forEach (query) -> newQuery = newQuery.concat(query) # TODO: アンド検索ができない stream.stop() if stream stream = twit.stream('statuses/filter', { track: newQuery,language: 'ja' }) console.log queryAndUser stream.on 'tweet', (tweet) -> queryAndUser.forEach (itemQueries, itemUser) -> for itemQuery in itemQueries # 複数ユーザ、複数ワードの同時検索に対応 if tweet.text.includes(itemQuery) and user is itemUser sendMessage robot, msg, itemUser, "#{itemQuery}見つかったよー https://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id_str}" unless tweet.user.screen_name is 'oretamaBot' stream.on 'disconnect', (disconnectMessage) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser "ツイート流すが切れたー。理由: #{disconnectMessage}" stream.on 'reconnect', (request, response, connectInterval) -> queryAndUser.forEach (itemQueries, itemUser) -> sendMessage robot, msg, itemUser, "ちょっと切れちゃった。再開は #{connectInterval/1000}秒後" return stream sendMessage = (robot, msg, user, message) -> if msg.hasOwnProperty("command") msg.command "@#{item.user}" + message else msg.send message module.exports = (robot) -> twit = undefined stream = undefined queryAndUser = new Map() robot.respond /ツイート流して (\S+)$/i, (msg) -> query = msg.match[1] user = msg.envelope.user.name twit = getTwit() oldQuery = queryAndUser.get(user) if oldQuery is undefined queryAndUser.set(user,[query]) else oldQuery.push(query) queryAndUser.set(user, oldQuery) # ツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート流すよー' robot.respond /ツイート止めて/i, (msg) -> user = msg.envelope.user.name queryAndUser.delete(user) if queryAndUser.size is 0 stream.stop() if stream stream = undefined else # 対象ユーザを除いてツイートの検索開始 stream = createStream(robot,msg,twit, stream, user, queryAndUser) msg.send 'ツイート止めたよー'
[ { "context": "# Copyright Joyent, Inc. and other Node contributors.\n#\n# Permission", "end": 18, "score": 0.9982824325561523, "start": 12, "tag": "NAME", "value": "Joyent" } ]
deps/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder/index.coffee
lxe/io.coffee
0
# Copyright Joyent, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. assertEncoding = (encoding) -> throw new Error("Unknown encoding: " + encoding) if encoding and not isBufferEncoding(encoding) return # StringDecoder provides an interface for efficiently splitting a series of # buffers into a series of JS strings without breaking apart multi-byte # characters. CESU-8 is handled as part of the UTF-8 encoding. # # @TODO Handling all encodings inside a single object makes it very difficult # to reason about this code, so it should be split up in the future. # @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code # points as used by CESU-8. # CESU-8 represents each of Surrogate Pair by 3-bytes # UTF-16 represents each of Surrogate Pair by 2-bytes # Base-64 stores 3 bytes in 4 chars, and pads the remainder. # Enough space to store all bytes of a single character. UTF-8 needs 4 # bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). # Number of bytes received for the current incomplete multi-byte character. # Number of bytes expected for the current incomplete multi-byte character. # write decodes the given buffer and returns it as JS string that is # guaranteed to not contain any partial multi-byte characters. Any partial # character found at the end of the buffer is buffered up, and will be # returned when calling write again with the remaining bytes. # # Note: Converting a Buffer containing an orphan surrogate to a String # currently works, but converting a String to a Buffer (via `new Buffer`, or # Buffer#write) will replace incomplete surrogates with the unicode # replacement character. See https://codereview.chromium.org/121173009/ . # if our last write ended with an incomplete multibyte character # determine how many remaining bytes this buffer has to offer for this char # add the new bytes to the char buffer # still not enough chars in this buffer? wait for more ... # remove bytes belonging to the current character from the buffer # get the character that was split # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # if there are no more bytes in this buffer, just emit our char # determine and set charLength / charReceived # buffer the incomplete character bytes we got # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # or just emit the charStr # detectIncompleteChar determines if there is an incomplete UTF-8 character at # the end of the given buffer. If so, it sets this.charLength to the byte # length that character, and sets this.charReceived to the number of bytes # that are available for this character. # determine how many bytes we have to check at the end of this buffer # Figure out if one of the last i bytes of our buffer announces an # incomplete char. # See http://en.wikipedia.org/wiki/UTF-8#Description # 110XXXXX # 1110XXXX # 11110XXX passThroughWrite = (buffer) -> buffer.toString @encoding utf16DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 2 @charLength = (if @charReceived then 2 else 0) return base64DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 3 @charLength = (if @charReceived then 3 else 0) return Buffer = require("buffer").Buffer isBufferEncoding = Buffer.isEncoding or (encoding) -> switch encoding and encoding.toLowerCase() when "hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw" true else false StringDecoder = exports.StringDecoder = (encoding) -> @encoding = (encoding or "utf8").toLowerCase().replace(/[-_]/, "") assertEncoding encoding switch @encoding when "utf8" @surrogateSize = 3 when "ucs2", "utf16le" @surrogateSize = 2 @detectIncompleteChar = utf16DetectIncompleteChar when "base64" @surrogateSize = 3 @detectIncompleteChar = base64DetectIncompleteChar else @write = passThroughWrite return @charBuffer = new Buffer(6) @charReceived = 0 @charLength = 0 return StringDecoder::write = (buffer) -> charStr = "" while @charLength available = (if (buffer.length >= @charLength - @charReceived) then @charLength - @charReceived else buffer.length) buffer.copy @charBuffer, @charReceived, 0, available @charReceived += available return "" if @charReceived < @charLength buffer = buffer.slice(available, buffer.length) charStr = @charBuffer.slice(0, @charLength).toString(@encoding) charCode = charStr.charCodeAt(charStr.length - 1) if charCode >= 0xd800 and charCode <= 0xdbff @charLength += @surrogateSize charStr = "" continue @charReceived = @charLength = 0 return charStr if buffer.length is 0 break @detectIncompleteChar buffer end = buffer.length if @charLength buffer.copy @charBuffer, 0, buffer.length - @charReceived, end end -= @charReceived charStr += buffer.toString(@encoding, 0, end) end = charStr.length - 1 charCode = charStr.charCodeAt(end) if charCode >= 0xd800 and charCode <= 0xdbff size = @surrogateSize @charLength += size @charReceived += size @charBuffer.copy @charBuffer, size, 0, size buffer.copy @charBuffer, 0, 0, size return charStr.substring(0, end) charStr StringDecoder::detectIncompleteChar = (buffer) -> i = (if (buffer.length >= 3) then 3 else buffer.length) while i > 0 c = buffer[buffer.length - i] if i is 1 and c >> 5 is 0x06 @charLength = 2 break if i <= 2 and c >> 4 is 0x0e @charLength = 3 break if i <= 3 and c >> 3 is 0x1e @charLength = 4 break i-- @charReceived = i return StringDecoder::end = (buffer) -> res = "" res = @write(buffer) if buffer and buffer.length if @charReceived cr = @charReceived buf = @charBuffer enc = @encoding res += buf.slice(0, cr).toString(enc) res
82765
# Copyright <NAME>, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. assertEncoding = (encoding) -> throw new Error("Unknown encoding: " + encoding) if encoding and not isBufferEncoding(encoding) return # StringDecoder provides an interface for efficiently splitting a series of # buffers into a series of JS strings without breaking apart multi-byte # characters. CESU-8 is handled as part of the UTF-8 encoding. # # @TODO Handling all encodings inside a single object makes it very difficult # to reason about this code, so it should be split up in the future. # @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code # points as used by CESU-8. # CESU-8 represents each of Surrogate Pair by 3-bytes # UTF-16 represents each of Surrogate Pair by 2-bytes # Base-64 stores 3 bytes in 4 chars, and pads the remainder. # Enough space to store all bytes of a single character. UTF-8 needs 4 # bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). # Number of bytes received for the current incomplete multi-byte character. # Number of bytes expected for the current incomplete multi-byte character. # write decodes the given buffer and returns it as JS string that is # guaranteed to not contain any partial multi-byte characters. Any partial # character found at the end of the buffer is buffered up, and will be # returned when calling write again with the remaining bytes. # # Note: Converting a Buffer containing an orphan surrogate to a String # currently works, but converting a String to a Buffer (via `new Buffer`, or # Buffer#write) will replace incomplete surrogates with the unicode # replacement character. See https://codereview.chromium.org/121173009/ . # if our last write ended with an incomplete multibyte character # determine how many remaining bytes this buffer has to offer for this char # add the new bytes to the char buffer # still not enough chars in this buffer? wait for more ... # remove bytes belonging to the current character from the buffer # get the character that was split # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # if there are no more bytes in this buffer, just emit our char # determine and set charLength / charReceived # buffer the incomplete character bytes we got # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # or just emit the charStr # detectIncompleteChar determines if there is an incomplete UTF-8 character at # the end of the given buffer. If so, it sets this.charLength to the byte # length that character, and sets this.charReceived to the number of bytes # that are available for this character. # determine how many bytes we have to check at the end of this buffer # Figure out if one of the last i bytes of our buffer announces an # incomplete char. # See http://en.wikipedia.org/wiki/UTF-8#Description # 110XXXXX # 1110XXXX # 11110XXX passThroughWrite = (buffer) -> buffer.toString @encoding utf16DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 2 @charLength = (if @charReceived then 2 else 0) return base64DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 3 @charLength = (if @charReceived then 3 else 0) return Buffer = require("buffer").Buffer isBufferEncoding = Buffer.isEncoding or (encoding) -> switch encoding and encoding.toLowerCase() when "hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw" true else false StringDecoder = exports.StringDecoder = (encoding) -> @encoding = (encoding or "utf8").toLowerCase().replace(/[-_]/, "") assertEncoding encoding switch @encoding when "utf8" @surrogateSize = 3 when "ucs2", "utf16le" @surrogateSize = 2 @detectIncompleteChar = utf16DetectIncompleteChar when "base64" @surrogateSize = 3 @detectIncompleteChar = base64DetectIncompleteChar else @write = passThroughWrite return @charBuffer = new Buffer(6) @charReceived = 0 @charLength = 0 return StringDecoder::write = (buffer) -> charStr = "" while @charLength available = (if (buffer.length >= @charLength - @charReceived) then @charLength - @charReceived else buffer.length) buffer.copy @charBuffer, @charReceived, 0, available @charReceived += available return "" if @charReceived < @charLength buffer = buffer.slice(available, buffer.length) charStr = @charBuffer.slice(0, @charLength).toString(@encoding) charCode = charStr.charCodeAt(charStr.length - 1) if charCode >= 0xd800 and charCode <= 0xdbff @charLength += @surrogateSize charStr = "" continue @charReceived = @charLength = 0 return charStr if buffer.length is 0 break @detectIncompleteChar buffer end = buffer.length if @charLength buffer.copy @charBuffer, 0, buffer.length - @charReceived, end end -= @charReceived charStr += buffer.toString(@encoding, 0, end) end = charStr.length - 1 charCode = charStr.charCodeAt(end) if charCode >= 0xd800 and charCode <= 0xdbff size = @surrogateSize @charLength += size @charReceived += size @charBuffer.copy @charBuffer, size, 0, size buffer.copy @charBuffer, 0, 0, size return charStr.substring(0, end) charStr StringDecoder::detectIncompleteChar = (buffer) -> i = (if (buffer.length >= 3) then 3 else buffer.length) while i > 0 c = buffer[buffer.length - i] if i is 1 and c >> 5 is 0x06 @charLength = 2 break if i <= 2 and c >> 4 is 0x0e @charLength = 3 break if i <= 3 and c >> 3 is 0x1e @charLength = 4 break i-- @charReceived = i return StringDecoder::end = (buffer) -> res = "" res = @write(buffer) if buffer and buffer.length if @charReceived cr = @charReceived buf = @charBuffer enc = @encoding res += buf.slice(0, cr).toString(enc) res
true
# Copyright PI:NAME:<NAME>END_PI, Inc. and other Node contributors. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the # following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE # USE OR OTHER DEALINGS IN THE SOFTWARE. assertEncoding = (encoding) -> throw new Error("Unknown encoding: " + encoding) if encoding and not isBufferEncoding(encoding) return # StringDecoder provides an interface for efficiently splitting a series of # buffers into a series of JS strings without breaking apart multi-byte # characters. CESU-8 is handled as part of the UTF-8 encoding. # # @TODO Handling all encodings inside a single object makes it very difficult # to reason about this code, so it should be split up in the future. # @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code # points as used by CESU-8. # CESU-8 represents each of Surrogate Pair by 3-bytes # UTF-16 represents each of Surrogate Pair by 2-bytes # Base-64 stores 3 bytes in 4 chars, and pads the remainder. # Enough space to store all bytes of a single character. UTF-8 needs 4 # bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). # Number of bytes received for the current incomplete multi-byte character. # Number of bytes expected for the current incomplete multi-byte character. # write decodes the given buffer and returns it as JS string that is # guaranteed to not contain any partial multi-byte characters. Any partial # character found at the end of the buffer is buffered up, and will be # returned when calling write again with the remaining bytes. # # Note: Converting a Buffer containing an orphan surrogate to a String # currently works, but converting a String to a Buffer (via `new Buffer`, or # Buffer#write) will replace incomplete surrogates with the unicode # replacement character. See https://codereview.chromium.org/121173009/ . # if our last write ended with an incomplete multibyte character # determine how many remaining bytes this buffer has to offer for this char # add the new bytes to the char buffer # still not enough chars in this buffer? wait for more ... # remove bytes belonging to the current character from the buffer # get the character that was split # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # if there are no more bytes in this buffer, just emit our char # determine and set charLength / charReceived # buffer the incomplete character bytes we got # CESU-8: lead surrogate (D800-DBFF) is also the incomplete character # or just emit the charStr # detectIncompleteChar determines if there is an incomplete UTF-8 character at # the end of the given buffer. If so, it sets this.charLength to the byte # length that character, and sets this.charReceived to the number of bytes # that are available for this character. # determine how many bytes we have to check at the end of this buffer # Figure out if one of the last i bytes of our buffer announces an # incomplete char. # See http://en.wikipedia.org/wiki/UTF-8#Description # 110XXXXX # 1110XXXX # 11110XXX passThroughWrite = (buffer) -> buffer.toString @encoding utf16DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 2 @charLength = (if @charReceived then 2 else 0) return base64DetectIncompleteChar = (buffer) -> @charReceived = buffer.length % 3 @charLength = (if @charReceived then 3 else 0) return Buffer = require("buffer").Buffer isBufferEncoding = Buffer.isEncoding or (encoding) -> switch encoding and encoding.toLowerCase() when "hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw" true else false StringDecoder = exports.StringDecoder = (encoding) -> @encoding = (encoding or "utf8").toLowerCase().replace(/[-_]/, "") assertEncoding encoding switch @encoding when "utf8" @surrogateSize = 3 when "ucs2", "utf16le" @surrogateSize = 2 @detectIncompleteChar = utf16DetectIncompleteChar when "base64" @surrogateSize = 3 @detectIncompleteChar = base64DetectIncompleteChar else @write = passThroughWrite return @charBuffer = new Buffer(6) @charReceived = 0 @charLength = 0 return StringDecoder::write = (buffer) -> charStr = "" while @charLength available = (if (buffer.length >= @charLength - @charReceived) then @charLength - @charReceived else buffer.length) buffer.copy @charBuffer, @charReceived, 0, available @charReceived += available return "" if @charReceived < @charLength buffer = buffer.slice(available, buffer.length) charStr = @charBuffer.slice(0, @charLength).toString(@encoding) charCode = charStr.charCodeAt(charStr.length - 1) if charCode >= 0xd800 and charCode <= 0xdbff @charLength += @surrogateSize charStr = "" continue @charReceived = @charLength = 0 return charStr if buffer.length is 0 break @detectIncompleteChar buffer end = buffer.length if @charLength buffer.copy @charBuffer, 0, buffer.length - @charReceived, end end -= @charReceived charStr += buffer.toString(@encoding, 0, end) end = charStr.length - 1 charCode = charStr.charCodeAt(end) if charCode >= 0xd800 and charCode <= 0xdbff size = @surrogateSize @charLength += size @charReceived += size @charBuffer.copy @charBuffer, size, 0, size buffer.copy @charBuffer, 0, 0, size return charStr.substring(0, end) charStr StringDecoder::detectIncompleteChar = (buffer) -> i = (if (buffer.length >= 3) then 3 else buffer.length) while i > 0 c = buffer[buffer.length - i] if i is 1 and c >> 5 is 0x06 @charLength = 2 break if i <= 2 and c >> 4 is 0x0e @charLength = 3 break if i <= 3 and c >> 3 is 0x1e @charLength = 4 break i-- @charReceived = i return StringDecoder::end = (buffer) -> res = "" res = @write(buffer) if buffer and buffer.length if @charReceived cr = @charReceived buf = @charBuffer enc = @encoding res += buf.slice(0, cr).toString(enc) res
[ { "context": " (done) ->\n auth.login(server, {username: \"test@test.com\", password:\"password\"}, 200, \n (res)->", "end": 511, "score": 0.9999250173568726, "start": 498, "tag": "EMAIL", "value": "test@test.com" }, { "context": "gin(server, {username: \"test@test.com\", password:\"password\"}, 200, \n (res)->\n cook", "end": 532, "score": 0.9994876980781555, "start": 524, "tag": "PASSWORD", "value": "password" }, { "context": "76525937d6d7389ef',\n 'username' : 'TESTAAAA',\n 'uid' : '1245',\n ", "end": 2039, "score": 0.9982029795646667, "start": 2031, "tag": "USERNAME", "value": "TESTAAAA" }, { "context": " is a stack trace',\n 'token': 'AAAA'\n }\n }\n assi", "end": 2234, "score": 0.9471296072006226, "start": 2230, "tag": "KEY", "value": "AAAA" }, { "context": " res.body.user.should.be.equal '5c6e06d76525937d6d7389ef'\n res.b", "end": 2672, "score": 0.7851438522338867, "start": 2671, "tag": "USERNAME", "value": "5" }, { "context": " res.body.user.should.be.equal '5c6e06d76525937d6d7389ef'\n res.body.username.should.be.", "end": 2695, "score": 0.7187613844871521, "start": 2672, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": " res.body.username.should.be.equal 'TESTAAAA'\n res.body.uid.should.be.equal", "end": 2760, "score": 0.9845492839813232, "start": 2752, "tag": "USERNAME", "value": "TESTAAAA" }, { "context": " 'type' : 'API',\n 'user' : '5c6e06d76525937d6d7389ef',\n 'usernam", "end": 3429, "score": 0.9484584927558899, "start": 3428, "tag": "USERNAME", "value": "5" }, { "context": " 'type' : 'API',\n 'user' : '5c6e06d76525937d6d7389ef',\n 'username' : 'TEST_UNASSIGN',\n ", "end": 3452, "score": 0.4825400412082672, "start": 3429, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": "76525937d6d7389ef',\n 'username' : 'TEST_UNASSIGN',\n 'uid' : '2234',\n ", "end": 3498, "score": 0.9945381879806519, "start": 3485, "tag": "USERNAME", "value": "TEST_UNASSIGN" }, { "context": " will be unassign',\n 'token': 'AAAABBBB'\n }\n }\n assi", "end": 3715, "score": 0.9969115853309631, "start": 3707, "tag": "KEY", "value": "AAAABBBB" }, { "context": " res.body.user.should.be.equal '5c6e06d76525937d6d7389ef'\n ", "end": 4510, "score": 0.6203223466873169, "start": 4509, "tag": "USERNAME", "value": "5" }, { "context": " res.body.user.should.be.equal '5c6e06d76525937d6d7389ef'\n res.body.userna", "end": 4528, "score": 0.37540119886398315, "start": 4510, "tag": "KEY", "value": "c6e06d76525937d6d7" }, { "context": "res.body.user.should.be.equal '5c6e06d76525937d6d7389ef'\n res.body.username.sh", "end": 4533, "score": 0.34532397985458374, "start": 4528, "tag": "PASSWORD", "value": "389ef" }, { "context": " res.body.username.should.be.equal 'TEST_UNASSIGN'\n res.body.uid.should.", "end": 4611, "score": 0.9970577955245972, "start": 4598, "tag": "USERNAME", "value": "TEST_UNASSIGN" }, { "context": "76525937d6d7389ef',\n 'username' : 'Test',\n 'failure': {\n ", "end": 6523, "score": 0.9986573457717896, "start": 6519, "tag": "USERNAME", "value": "Test" }, { "context": " res.body.username.should.be.equal 'Test'\n res.body.user.should.be.equa", "end": 7237, "score": 0.9991307854652405, "start": 7233, "tag": "USERNAME", "value": "Test" }, { "context": " res.body.user.should.be.equal '6c6e06d76525937d6d7389ef'\n res.b", "end": 7291, "score": 0.9053831696510315, "start": 7290, "tag": "USERNAME", "value": "6" }, { "context": " res.body.user.should.be.equal '6c6e06d76525937d6d7389ef'\n res.body.failure.should.be.a", "end": 7314, "score": 0.968855082988739, "start": 7291, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": " 'uid': \"11111\",\n 'user' : '7c6e06d76525937d6d7389ef',\n 'usernam", "end": 7704, "score": 0.950531542301178, "start": 7703, "tag": "USERNAME", "value": "7" }, { "context": " 'uid': \"11111\",\n 'user' : '7c6e06d76525937d6d7389ef',\n 'username' : 'TEST SAME Failure", "end": 7727, "score": 0.9298719763755798, "start": 7704, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": "76525937d6d7389ef',\n 'username' : 'TEST SAME Failure',\n 'failure': {\n ", "end": 7777, "score": 0.998917281627655, "start": 7760, "tag": "USERNAME", "value": "TEST SAME Failure" }, { "context": " {\n \"user\" : \"admin\",\n \"time\" : \"2019-10-18T02", "end": 8107, "score": 0.9995660185813904, "start": 8102, "tag": "USERNAME", "value": "admin" }, { "context": " {\n \"user\" : \"admin\",\n \"time\" : \"2019-10-18T02", "end": 8296, "score": 0.999559223651886, "start": 8291, "tag": "USERNAME", "value": "admin" }, { "context": " res.body.username.should.be.equal 'TEST SAME Failure'\n res.body.user.should.be.equa", "end": 8917, "score": 0.9303767085075378, "start": 8900, "tag": "USERNAME", "value": "TEST SAME Failure" }, { "context": " res.body.user.should.be.equal '7c6e06d76525937d6d7389ef'\n\n res.", "end": 8971, "score": 0.8406416773796082, "start": 8970, "tag": "USERNAME", "value": "7" }, { "context": " res.body.user.should.be.equal '7c6e06d76525937d6d7389ef'\n\n res.body.uid.should.be.equa", "end": 8994, "score": 0.8964670300483704, "start": 8971, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": " 'uid': \"11111\",\n 'user' : '8c6e06d76525937d6d7389ef',\n 'usernam", "end": 9558, "score": 0.8473151922225952, "start": 9557, "tag": "USERNAME", "value": "8" }, { "context": " 'uid': \"11111\",\n 'user' : '8c6e06d76525937d6d7389ef',\n 'username' : 'TEST SAME TOKEN',", "end": 9581, "score": 0.9349037408828735, "start": 9558, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" }, { "context": "76525937d6d7389ef',\n 'username' : 'TEST SAME TOKEN',\n 'failure': {\n ", "end": 9629, "score": 0.9892536401748657, "start": 9614, "tag": "USERNAME", "value": "TEST SAME TOKEN" }, { "context": " res.body.username.should.be.equal 'TEST SAME TOKEN'\n res.body.user.should.be.equa", "end": 10394, "score": 0.9426818490028381, "start": 10379, "tag": "USERNAME", "value": "TEST SAME TOKEN" }, { "context": " res.body.user.should.be.equal '8c6e06d76525937d6d7389ef'\n\n res.", "end": 10448, "score": 0.8306479454040527, "start": 10447, "tag": "USERNAME", "value": "8" }, { "context": " res.body.user.should.be.equal '8c6e06d76525937d6d7389ef'\n\n res.body.failure.should.be.", "end": 10471, "score": 0.9454532265663147, "start": 10448, "tag": "PASSWORD", "value": "c6e06d76525937d6d7389ef" } ]
test/services_tests/test_assignment_services.coffee
J-JRC/ureport-standalone
0
#load application models server = require('../../app') _ = require('underscore'); assignment = require('../api_objects/assignment_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User can perform action on assignment collection', -> cookies = undefined; before (done) -> auth.login(server, {username: "test@test.com", password:"password"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return describe 'filter assignemnt', -> it 'should find all assignments with given time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', 'after': moment().subtract(60, 'days').format() } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 6 done() ) return it 'should find all new assignment with current time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return describe 'assign to', -> create_assignment_id = undefined it 'should create a new assignment with min params', (done) -> payload = { 'product' : 'TestProductData', 'type' : 'API', 'user' : '5c6e06d76525937d6d7389ef', 'username' : 'TESTAAAA', 'uid' : '1245', 'failure': { 'reason': '1111', 'stackTrace': 'this is a stack trace', 'token': 'AAAA' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductData' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5c6e06d76525937d6d7389ef' res.body.username.should.be.equal 'TESTAAAA' res.body.uid.should.be.equal '1245' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) return after (done) -> assignment.delete(server,cookies, create_assignment_id, 200, (res) -> done() ) return describe 'unassign to', -> create_assignment_id = undefined it 'should unassign a test', (done) -> payload = { 'product' : 'TestProductUnassign', 'type' : 'API', 'user' : '5c6e06d76525937d6d7389ef', 'username' : 'TEST_UNASSIGN', 'uid' : '2234', 'failure': { 'reason': '33333', 'stackTrace': 'this is a stack trace will be unassign', 'token': 'AAAABBBB' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.state.should.be.equal 'OPEN' assignment.unassign(server, cookies, create_assignment_id, { 'state': 'CLOSE' }, 200, (res) -> res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductUnassign' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5c6e06d76525937d6d7389ef' res.body.username.should.be.equal 'TEST_UNASSIGN' res.body.uid.should.be.equal '2234' res.body.state.should.be.equal 'CLOSE' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) ) return after (done) -> assignment.delete(server, cookies ,create_assignment_id, 200, (res) -> done() ) return describe 'create assignemnt with missing params', -> it 'should not create a new assignment at all', (done) -> payload = { 'product' : 'TestProductData' } assignment.create(server, cookies, payload, 400, (res) -> res.body.error.should.equal 'key user or username is requried' done() ) return describe 'create assignemnt with failure when found existing assignment', -> assWithSameToken = undefined; assWithSameFailure = undefined; before (done) -> assignment.getByUser(server,cookies, '5c7e06d76525937d6d7389ef', 200, (res) -> assWithSameFailure = res.body[0] assWithSameToken = res.body[1] res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return it 'should create a new assignment when reason is not the same', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '6c6e06d76525937d6d7389ef', 'username' : 'Test', 'failure': { 'reason': 'soem diff java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', } } assignment.create(server,cookies, payload, 200, (res) -> res.body._id.should.not.be.equal assWithSameFailure._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'Test' res.body.user.should.be.equal '6c6e06d76525937d6d7389ef' res.body.failure.should.be.an 'Object' done() ) return it 'should not create a new assignment when reason is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '7c6e06d76525937d6d7389ef', 'username' : 'TEST SAME Failure', 'failure': { 'reason': 'java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace' 'token': null }, "comments" : [ { "user" : "admin", "time" : "2019-10-18T02:51:47.520Z", "message" : "3" }, { "user" : "admin", "time" : "2019-10-18T02:51:50.041Z", "message" : "4" } ] } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameFailure._id res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.username.should.be.equal 'TEST SAME Failure' res.body.user.should.be.equal '7c6e06d76525937d6d7389ef' res.body.uid.should.be.equal '11111' res.body.failure.should.be.an 'Object' res.body.comments.should.be.an 'Array' res.body.comments.length.should.equal 4 done() ) return it 'should not create a new assignment when token is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameToken', 'uid': "11111", 'user' : '8c6e06d76525937d6d7389ef', 'username' : 'TEST SAME TOKEN', 'failure': { 'reason': '11 java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', 'token': '{89=[91], 82=[], 67=[]}' } } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameToken._id res.body.product.should.be.equal 'ProductSameToken' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'TEST SAME TOKEN' res.body.user.should.be.equal '8c6e06d76525937d6d7389ef' res.body.failure.should.be.an 'Object' done() ) return
184003
#load application models server = require('../../app') _ = require('underscore'); assignment = require('../api_objects/assignment_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User can perform action on assignment collection', -> cookies = undefined; before (done) -> auth.login(server, {username: "<EMAIL>", password:"<PASSWORD>"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return describe 'filter assignemnt', -> it 'should find all assignments with given time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', 'after': moment().subtract(60, 'days').format() } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 6 done() ) return it 'should find all new assignment with current time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return describe 'assign to', -> create_assignment_id = undefined it 'should create a new assignment with min params', (done) -> payload = { 'product' : 'TestProductData', 'type' : 'API', 'user' : '5c6e06d76525937d6d7389ef', 'username' : 'TESTAAAA', 'uid' : '1245', 'failure': { 'reason': '1111', 'stackTrace': 'this is a stack trace', 'token': '<KEY>' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductData' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5<PASSWORD>' res.body.username.should.be.equal 'TESTAAAA' res.body.uid.should.be.equal '1245' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) return after (done) -> assignment.delete(server,cookies, create_assignment_id, 200, (res) -> done() ) return describe 'unassign to', -> create_assignment_id = undefined it 'should unassign a test', (done) -> payload = { 'product' : 'TestProductUnassign', 'type' : 'API', 'user' : '5<PASSWORD>', 'username' : 'TEST_UNASSIGN', 'uid' : '2234', 'failure': { 'reason': '33333', 'stackTrace': 'this is a stack trace will be unassign', 'token': '<KEY>' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.state.should.be.equal 'OPEN' assignment.unassign(server, cookies, create_assignment_id, { 'state': 'CLOSE' }, 200, (res) -> res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductUnassign' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5<KEY> <PASSWORD>' res.body.username.should.be.equal 'TEST_UNASSIGN' res.body.uid.should.be.equal '2234' res.body.state.should.be.equal 'CLOSE' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) ) return after (done) -> assignment.delete(server, cookies ,create_assignment_id, 200, (res) -> done() ) return describe 'create assignemnt with missing params', -> it 'should not create a new assignment at all', (done) -> payload = { 'product' : 'TestProductData' } assignment.create(server, cookies, payload, 400, (res) -> res.body.error.should.equal 'key user or username is requried' done() ) return describe 'create assignemnt with failure when found existing assignment', -> assWithSameToken = undefined; assWithSameFailure = undefined; before (done) -> assignment.getByUser(server,cookies, '5c7e06d76525937d6d7389ef', 200, (res) -> assWithSameFailure = res.body[0] assWithSameToken = res.body[1] res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return it 'should create a new assignment when reason is not the same', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '6c6e06d76525937d6d7389ef', 'username' : 'Test', 'failure': { 'reason': 'soem diff java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', } } assignment.create(server,cookies, payload, 200, (res) -> res.body._id.should.not.be.equal assWithSameFailure._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'Test' res.body.user.should.be.equal '6<PASSWORD>' res.body.failure.should.be.an 'Object' done() ) return it 'should not create a new assignment when reason is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '7<PASSWORD>', 'username' : 'TEST SAME Failure', 'failure': { 'reason': 'java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace' 'token': null }, "comments" : [ { "user" : "admin", "time" : "2019-10-18T02:51:47.520Z", "message" : "3" }, { "user" : "admin", "time" : "2019-10-18T02:51:50.041Z", "message" : "4" } ] } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameFailure._id res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.username.should.be.equal 'TEST SAME Failure' res.body.user.should.be.equal '7<PASSWORD>' res.body.uid.should.be.equal '11111' res.body.failure.should.be.an 'Object' res.body.comments.should.be.an 'Array' res.body.comments.length.should.equal 4 done() ) return it 'should not create a new assignment when token is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameToken', 'uid': "11111", 'user' : '8<PASSWORD>', 'username' : 'TEST SAME TOKEN', 'failure': { 'reason': '11 java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', 'token': '{89=[91], 82=[], 67=[]}' } } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameToken._id res.body.product.should.be.equal 'ProductSameToken' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'TEST SAME TOKEN' res.body.user.should.be.equal '8<PASSWORD>' res.body.failure.should.be.an 'Object' done() ) return
true
#load application models server = require('../../app') _ = require('underscore'); assignment = require('../api_objects/assignment_api_object') auth = require('../api_objects/auth_api_object') mongoose = require('mongoose') chai = require('chai') chaiHttp = require('chai-http') moment = require('moment') should = chai.should() chai.use chaiHttp describe 'User can perform action on assignment collection', -> cookies = undefined; before (done) -> auth.login(server, {username: "PI:EMAIL:<EMAIL>END_PI", password:"PI:PASSWORD:<PASSWORD>END_PI"}, 200, (res)-> cookies = res.headers['set-cookie'].pop().split(';')[0]; done() ) return describe 'filter assignemnt', -> it 'should find all assignments with given time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', 'after': moment().subtract(60, 'days').format() } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 6 done() ) return it 'should find all new assignment with current time', (done) -> payload = { 'product' : 'ProductA', 'type' : 'API', } assignment.filter(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return describe 'assign to', -> create_assignment_id = undefined it 'should create a new assignment with min params', (done) -> payload = { 'product' : 'TestProductData', 'type' : 'API', 'user' : '5c6e06d76525937d6d7389ef', 'username' : 'TESTAAAA', 'uid' : '1245', 'failure': { 'reason': '1111', 'stackTrace': 'this is a stack trace', 'token': 'PI:KEY:<KEY>END_PI' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductData' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5PI:PASSWORD:<PASSWORD>END_PI' res.body.username.should.be.equal 'TESTAAAA' res.body.uid.should.be.equal '1245' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) return after (done) -> assignment.delete(server,cookies, create_assignment_id, 200, (res) -> done() ) return describe 'unassign to', -> create_assignment_id = undefined it 'should unassign a test', (done) -> payload = { 'product' : 'TestProductUnassign', 'type' : 'API', 'user' : '5PI:PASSWORD:<PASSWORD>END_PI', 'username' : 'TEST_UNASSIGN', 'uid' : '2234', 'failure': { 'reason': '33333', 'stackTrace': 'this is a stack trace will be unassign', 'token': 'PI:KEY:<KEY>END_PI' } } assignment.create(server, cookies, payload, 200, (res) -> create_assignment_id = res.body._id res.body.state.should.be.equal 'OPEN' assignment.unassign(server, cookies, create_assignment_id, { 'state': 'CLOSE' }, 200, (res) -> res.body.should.be.an 'Object' res.body.product.should.be.equal 'TestProductUnassign' res.body.type.should.be.equal 'API' res.body.user.should.be.equal '5PI:KEY:<KEY>END_PI PI:PASSWORD:<PASSWORD>END_PI' res.body.username.should.be.equal 'TEST_UNASSIGN' res.body.uid.should.be.equal '2234' res.body.state.should.be.equal 'CLOSE' res.body.failure.should.be.an 'Object' should.exist(res.body.assign_at) done() ) ) return after (done) -> assignment.delete(server, cookies ,create_assignment_id, 200, (res) -> done() ) return describe 'create assignemnt with missing params', -> it 'should not create a new assignment at all', (done) -> payload = { 'product' : 'TestProductData' } assignment.create(server, cookies, payload, 400, (res) -> res.body.error.should.equal 'key user or username is requried' done() ) return describe 'create assignemnt with failure when found existing assignment', -> assWithSameToken = undefined; assWithSameFailure = undefined; before (done) -> assignment.getByUser(server,cookies, '5c7e06d76525937d6d7389ef', 200, (res) -> assWithSameFailure = res.body[0] assWithSameToken = res.body[1] res.body.should.be.an 'Array' res.body.length.should.equal 2 done() ) return it 'should create a new assignment when reason is not the same', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '6c6e06d76525937d6d7389ef', 'username' : 'Test', 'failure': { 'reason': 'soem diff java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', } } assignment.create(server,cookies, payload, 200, (res) -> res.body._id.should.not.be.equal assWithSameFailure._id res.body.should.be.an 'Object' res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'Test' res.body.user.should.be.equal '6PI:PASSWORD:<PASSWORD>END_PI' res.body.failure.should.be.an 'Object' done() ) return it 'should not create a new assignment when reason is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameFailure', 'uid': "11111", 'user' : '7PI:PASSWORD:<PASSWORD>END_PI', 'username' : 'TEST SAME Failure', 'failure': { 'reason': 'java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace' 'token': null }, "comments" : [ { "user" : "admin", "time" : "2019-10-18T02:51:47.520Z", "message" : "3" }, { "user" : "admin", "time" : "2019-10-18T02:51:50.041Z", "message" : "4" } ] } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameFailure._id res.body.product.should.be.equal 'ProductSameFailure' res.body.type.should.be.equal 'API' res.body.username.should.be.equal 'TEST SAME Failure' res.body.user.should.be.equal '7PI:PASSWORD:<PASSWORD>END_PI' res.body.uid.should.be.equal '11111' res.body.failure.should.be.an 'Object' res.body.comments.should.be.an 'Array' res.body.comments.length.should.equal 4 done() ) return it 'should not create a new assignment when token is the same but replace user name', (done) -> payload = { 'type': 'API', 'product': 'ProductSameToken', 'uid': "11111", 'user' : '8PI:PASSWORD:<PASSWORD>END_PI', 'username' : 'TEST SAME TOKEN', 'failure': { 'reason': '11 java.lang.AssertionError: expected [404] but found [200]', 'stackTrace': 'this is a stack trace', 'token': '{89=[91], 82=[], 67=[]}' } } assignment.create(server,cookies, payload, 200, (res) -> res.body.should.be.an 'Object' res.body._id.should.be.equal assWithSameToken._id res.body.product.should.be.equal 'ProductSameToken' res.body.type.should.be.equal 'API' res.body.uid.should.be.equal '11111' res.body.username.should.be.equal 'TEST SAME TOKEN' res.body.user.should.be.equal '8PI:PASSWORD:<PASSWORD>END_PI' res.body.failure.should.be.an 'Object' done() ) return
[ { "context": " set_expand_local_storage: ->\r\n key = \"net-catalog-tree-expand-#{@props.data.id}\"\r\n localStorage[key] = @sta", "end": 3772, "score": 0.9337687492370605, "start": 3750, "tag": "KEY", "value": "catalog-tree-expand-#{" }, { "context": " get_expand_local_storage: ->\r\n key = \"net-catalog-tree-expand-#{@props.data.id}\"\r\n localStorage[key]\r\n\r\n ", "end": 3912, "score": 0.9546358585357666, "start": 3886, "tag": "KEY", "value": "net-catalog-tree-expand-#{" }, { "context": " key = \"net-catalog-tree-expand-#{@props.data.id}\"\r\n localStorage[key]\r\n\r\n TagLabel: Rea", "end": 3926, "score": 0.8656336665153503, "start": 3924, "tag": "KEY", "value": "id" } ]
app/assets/javascripts/operation_flow_editor/knet/book-catalog.coffee
kc-train/operation-flow-editor
2
@IDSet = class constructor: -> @hash = {} add: (item)-> @hash[item.id] = item remove: (id)-> delete @hash[id] get: (id)-> @hash[id] blank: -> Object.keys(@hash).length is 0 filter: (func)-> Object.keys(@hash) .map (id)=> @hash[id] .filter func ids: -> Object.keys(@hash) count: -> Object.keys(@hash).length each: (func)-> for id, value of @hash func value @CatalogTree = class constructor: (@array_data)-> @set = new IDSet() for item in @array_data catalog_item = new CatalogItem item, @ @set.add catalog_item blank: -> @set.blank() roots: -> @set.filter (x)-> x.depth is 0 get: (id)-> @set.get(id) get_index: (id)-> (@array_data.map (x)-> x.id).indexOf id count: -> @set.count() class CatalogItem constructor: (data, @tree)-> @id = data.id @depth = data.depth @name = data.name @children_ids = data.children_ids has_children: -> @children_ids.length > 0 children: -> @children_ids.map (id)=> @tree.set.get(id) descendants: -> re = [] for child in @children() re = re.concat child.descendants() re @KnetBookCatalog = React.createClass displayName: 'KnetBookCatalog' getInitialState: -> tree: new CatalogTree @props.data.catalogs_data tag_with_catalog_ids: @props.data.tag_with_catalog_ids render: -> tree = @state.tree <div className='knet-book-catalog'> { if tree.blank() <div className='blank'>没有获取到数据</div> else <div> <KnetBookCatalog.List host={@} data={tree.roots()} /> <KnetBookCatalog.TagsModal host={@} ref='tags_modal' /> </div> } </div> show_tags: (item_data, tag_ids)-> @refs.tags_modal.show(item_data, tag_ids) statics: List: React.createClass displayName: 'List' render: -> catalogs = @props.data <ul> { for catalog in catalogs <KnetBookCatalog.Item key={catalog.id} host={@props.host} data={catalog} /> } </ul> Item: React.createClass displayName: 'Item' getInitialState: -> ep = @get_expand_local_storage() if ep? expand: ep == 'true' else if @props.data.depth > 0 expand: false else expand: true render: -> data = @props.data klass = [] klass.push 'expand' if @state.expand klass.push 'leafnode' if not data.has_children() @set_expand_local_storage() tag_with_catalog_ids = @props.host.state.tag_with_catalog_ids tag_ids = tag_with_catalog_ids[data.id] || [] <li className={klass.join(' ')}> <div className='info'> { if data.has_children() <a className='expand-btn' href='javascript:;' onClick={@toggle_expand}> <i className='fa fa-minus' /> <i className='fa fa-plus' /> </a> } <div className='name'> <span>{data.name}</span> { if tag_ids.length <KnetBookCatalog.TagLabel host={@props.host} item_data={data} tag_ids={tag_ids} /> } </div> </div> { if data.has_children() <KnetBookCatalog.List host={@props.host} data={data.children()} /> } </li> toggle_expand: -> @setState expand: !@state.expand set_expand_local_storage: -> key = "net-catalog-tree-expand-#{@props.data.id}" localStorage[key] = @state.expand get_expand_local_storage: -> key = "net-catalog-tree-expand-#{@props.data.id}" localStorage[key] TagLabel: React.createClass render: -> tag_ids = @props.tag_ids <label onClick={@show_tags}>{tag_ids.length} 个概念</label> show_tags: -> @props.host.show_tags @props.item_data, @props.tag_ids TagsModal: React.createClass getInitialState: -> title: '' tags: [] render: -> <BSModal.InfoModal ref='modal' bs_size='md' title={@state.title}> { for tag in @state.tags <span className='tag' key={tag.id}> <i className='fa fa-tag' /> <span>{tag.name}</span> <a href="/net/#{@props.host.props.data.book_data.name}/tagging?tag_id=#{tag.id}"><i className='fa fa-play-circle-o' /> 整理</a> </span> } </BSModal.InfoModal> show: (item_data, tag_ids)-> @refs.modal.show() @refs.modal.loading() @setState title: item_data.name jQuery.ajax url: '/net/tag/get_tags' data: ids: tag_ids .done (res)=> @refs.modal.loaded() @setState tags: res
170908
@IDSet = class constructor: -> @hash = {} add: (item)-> @hash[item.id] = item remove: (id)-> delete @hash[id] get: (id)-> @hash[id] blank: -> Object.keys(@hash).length is 0 filter: (func)-> Object.keys(@hash) .map (id)=> @hash[id] .filter func ids: -> Object.keys(@hash) count: -> Object.keys(@hash).length each: (func)-> for id, value of @hash func value @CatalogTree = class constructor: (@array_data)-> @set = new IDSet() for item in @array_data catalog_item = new CatalogItem item, @ @set.add catalog_item blank: -> @set.blank() roots: -> @set.filter (x)-> x.depth is 0 get: (id)-> @set.get(id) get_index: (id)-> (@array_data.map (x)-> x.id).indexOf id count: -> @set.count() class CatalogItem constructor: (data, @tree)-> @id = data.id @depth = data.depth @name = data.name @children_ids = data.children_ids has_children: -> @children_ids.length > 0 children: -> @children_ids.map (id)=> @tree.set.get(id) descendants: -> re = [] for child in @children() re = re.concat child.descendants() re @KnetBookCatalog = React.createClass displayName: 'KnetBookCatalog' getInitialState: -> tree: new CatalogTree @props.data.catalogs_data tag_with_catalog_ids: @props.data.tag_with_catalog_ids render: -> tree = @state.tree <div className='knet-book-catalog'> { if tree.blank() <div className='blank'>没有获取到数据</div> else <div> <KnetBookCatalog.List host={@} data={tree.roots()} /> <KnetBookCatalog.TagsModal host={@} ref='tags_modal' /> </div> } </div> show_tags: (item_data, tag_ids)-> @refs.tags_modal.show(item_data, tag_ids) statics: List: React.createClass displayName: 'List' render: -> catalogs = @props.data <ul> { for catalog in catalogs <KnetBookCatalog.Item key={catalog.id} host={@props.host} data={catalog} /> } </ul> Item: React.createClass displayName: 'Item' getInitialState: -> ep = @get_expand_local_storage() if ep? expand: ep == 'true' else if @props.data.depth > 0 expand: false else expand: true render: -> data = @props.data klass = [] klass.push 'expand' if @state.expand klass.push 'leafnode' if not data.has_children() @set_expand_local_storage() tag_with_catalog_ids = @props.host.state.tag_with_catalog_ids tag_ids = tag_with_catalog_ids[data.id] || [] <li className={klass.join(' ')}> <div className='info'> { if data.has_children() <a className='expand-btn' href='javascript:;' onClick={@toggle_expand}> <i className='fa fa-minus' /> <i className='fa fa-plus' /> </a> } <div className='name'> <span>{data.name}</span> { if tag_ids.length <KnetBookCatalog.TagLabel host={@props.host} item_data={data} tag_ids={tag_ids} /> } </div> </div> { if data.has_children() <KnetBookCatalog.List host={@props.host} data={data.children()} /> } </li> toggle_expand: -> @setState expand: !@state.expand set_expand_local_storage: -> key = "net-<KEY>@props.data.id}" localStorage[key] = @state.expand get_expand_local_storage: -> key = "<KEY>@props.data.<KEY>}" localStorage[key] TagLabel: React.createClass render: -> tag_ids = @props.tag_ids <label onClick={@show_tags}>{tag_ids.length} 个概念</label> show_tags: -> @props.host.show_tags @props.item_data, @props.tag_ids TagsModal: React.createClass getInitialState: -> title: '' tags: [] render: -> <BSModal.InfoModal ref='modal' bs_size='md' title={@state.title}> { for tag in @state.tags <span className='tag' key={tag.id}> <i className='fa fa-tag' /> <span>{tag.name}</span> <a href="/net/#{@props.host.props.data.book_data.name}/tagging?tag_id=#{tag.id}"><i className='fa fa-play-circle-o' /> 整理</a> </span> } </BSModal.InfoModal> show: (item_data, tag_ids)-> @refs.modal.show() @refs.modal.loading() @setState title: item_data.name jQuery.ajax url: '/net/tag/get_tags' data: ids: tag_ids .done (res)=> @refs.modal.loaded() @setState tags: res
true
@IDSet = class constructor: -> @hash = {} add: (item)-> @hash[item.id] = item remove: (id)-> delete @hash[id] get: (id)-> @hash[id] blank: -> Object.keys(@hash).length is 0 filter: (func)-> Object.keys(@hash) .map (id)=> @hash[id] .filter func ids: -> Object.keys(@hash) count: -> Object.keys(@hash).length each: (func)-> for id, value of @hash func value @CatalogTree = class constructor: (@array_data)-> @set = new IDSet() for item in @array_data catalog_item = new CatalogItem item, @ @set.add catalog_item blank: -> @set.blank() roots: -> @set.filter (x)-> x.depth is 0 get: (id)-> @set.get(id) get_index: (id)-> (@array_data.map (x)-> x.id).indexOf id count: -> @set.count() class CatalogItem constructor: (data, @tree)-> @id = data.id @depth = data.depth @name = data.name @children_ids = data.children_ids has_children: -> @children_ids.length > 0 children: -> @children_ids.map (id)=> @tree.set.get(id) descendants: -> re = [] for child in @children() re = re.concat child.descendants() re @KnetBookCatalog = React.createClass displayName: 'KnetBookCatalog' getInitialState: -> tree: new CatalogTree @props.data.catalogs_data tag_with_catalog_ids: @props.data.tag_with_catalog_ids render: -> tree = @state.tree <div className='knet-book-catalog'> { if tree.blank() <div className='blank'>没有获取到数据</div> else <div> <KnetBookCatalog.List host={@} data={tree.roots()} /> <KnetBookCatalog.TagsModal host={@} ref='tags_modal' /> </div> } </div> show_tags: (item_data, tag_ids)-> @refs.tags_modal.show(item_data, tag_ids) statics: List: React.createClass displayName: 'List' render: -> catalogs = @props.data <ul> { for catalog in catalogs <KnetBookCatalog.Item key={catalog.id} host={@props.host} data={catalog} /> } </ul> Item: React.createClass displayName: 'Item' getInitialState: -> ep = @get_expand_local_storage() if ep? expand: ep == 'true' else if @props.data.depth > 0 expand: false else expand: true render: -> data = @props.data klass = [] klass.push 'expand' if @state.expand klass.push 'leafnode' if not data.has_children() @set_expand_local_storage() tag_with_catalog_ids = @props.host.state.tag_with_catalog_ids tag_ids = tag_with_catalog_ids[data.id] || [] <li className={klass.join(' ')}> <div className='info'> { if data.has_children() <a className='expand-btn' href='javascript:;' onClick={@toggle_expand}> <i className='fa fa-minus' /> <i className='fa fa-plus' /> </a> } <div className='name'> <span>{data.name}</span> { if tag_ids.length <KnetBookCatalog.TagLabel host={@props.host} item_data={data} tag_ids={tag_ids} /> } </div> </div> { if data.has_children() <KnetBookCatalog.List host={@props.host} data={data.children()} /> } </li> toggle_expand: -> @setState expand: !@state.expand set_expand_local_storage: -> key = "net-PI:KEY:<KEY>END_PI@props.data.id}" localStorage[key] = @state.expand get_expand_local_storage: -> key = "PI:KEY:<KEY>END_PI@props.data.PI:KEY:<KEY>END_PI}" localStorage[key] TagLabel: React.createClass render: -> tag_ids = @props.tag_ids <label onClick={@show_tags}>{tag_ids.length} 个概念</label> show_tags: -> @props.host.show_tags @props.item_data, @props.tag_ids TagsModal: React.createClass getInitialState: -> title: '' tags: [] render: -> <BSModal.InfoModal ref='modal' bs_size='md' title={@state.title}> { for tag in @state.tags <span className='tag' key={tag.id}> <i className='fa fa-tag' /> <span>{tag.name}</span> <a href="/net/#{@props.host.props.data.book_data.name}/tagging?tag_id=#{tag.id}"><i className='fa fa-play-circle-o' /> 整理</a> </span> } </BSModal.InfoModal> show: (item_data, tag_ids)-> @refs.modal.show() @refs.modal.loading() @setState title: item_data.name jQuery.ajax url: '/net/tag/get_tags' data: ids: tag_ids .done (res)=> @refs.modal.loaded() @setState tags: res
[ { "context": "# Copyright (c) 2018 Natalie Marleny\n# Casing - UI framework for Framer\n# License: MIT", "end": 36, "score": 0.9998846650123596, "start": 21, "tag": "NAME", "value": "Natalie Marleny" }, { "context": "r Framer\n# License: MIT\n# URL: https://github.com/nataliemarleny/Casing\n\n\nclass exports.FrmrDropdown extends Layer", "end": 127, "score": 0.9994680285453796, "start": 113, "tag": "USERNAME", "value": "nataliemarleny" } ]
FrmrDropdown.coffee
nataliemarleny/Casing
84
# Copyright (c) 2018 Natalie Marleny # Casing - UI framework for Framer # License: MIT # URL: https://github.com/nataliemarleny/Casing class exports.FrmrDropdown extends Layer constructor: (options = {}) -> DOM_id = "dropdown-#{_.random(2**31)}-#{_.now()}" _.defaults options, html: """ <select id="#{DOM_id}" style='background-color: #FFFFFF; appearance: none; outline: none; line-height: normal; margin: 0; border: 0; padding: 0; border-color: #E9ECF0; font-family: "-apple-system"; font-size: 14px; color: #7A838D; width: 310px; height: 45px; border-width: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05);' > <option value=""></option> </select> """ height: 44 width: 310 backgroundColor: "#FFFFFF" super options @dropdown = document.getElementById(DOM_id) @define "value", get: -> @dropdown.value set: (value) -> @dropdown.value = value @define "dropdownOptions", get: -> @_dropdownOptions set: (dropdownOptions) -> """ [{value: 'option-value', text: 'option-text'}] """ @_dropdownOptions = dropdownOptions _optionsHTML = "" for option in @dropdownOptions _optionsHTML += "<option value=#{option.value}>#{option.text}</option>" @dropdown.innerHTML = _optionsHTML
96368
# Copyright (c) 2018 <NAME> # Casing - UI framework for Framer # License: MIT # URL: https://github.com/nataliemarleny/Casing class exports.FrmrDropdown extends Layer constructor: (options = {}) -> DOM_id = "dropdown-#{_.random(2**31)}-#{_.now()}" _.defaults options, html: """ <select id="#{DOM_id}" style='background-color: #FFFFFF; appearance: none; outline: none; line-height: normal; margin: 0; border: 0; padding: 0; border-color: #E9ECF0; font-family: "-apple-system"; font-size: 14px; color: #7A838D; width: 310px; height: 45px; border-width: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05);' > <option value=""></option> </select> """ height: 44 width: 310 backgroundColor: "#FFFFFF" super options @dropdown = document.getElementById(DOM_id) @define "value", get: -> @dropdown.value set: (value) -> @dropdown.value = value @define "dropdownOptions", get: -> @_dropdownOptions set: (dropdownOptions) -> """ [{value: 'option-value', text: 'option-text'}] """ @_dropdownOptions = dropdownOptions _optionsHTML = "" for option in @dropdownOptions _optionsHTML += "<option value=#{option.value}>#{option.text}</option>" @dropdown.innerHTML = _optionsHTML
true
# Copyright (c) 2018 PI:NAME:<NAME>END_PI # Casing - UI framework for Framer # License: MIT # URL: https://github.com/nataliemarleny/Casing class exports.FrmrDropdown extends Layer constructor: (options = {}) -> DOM_id = "dropdown-#{_.random(2**31)}-#{_.now()}" _.defaults options, html: """ <select id="#{DOM_id}" style='background-color: #FFFFFF; appearance: none; outline: none; line-height: normal; margin: 0; border: 0; padding: 0; border-color: #E9ECF0; font-family: "-apple-system"; font-size: 14px; color: #7A838D; width: 310px; height: 45px; border-width: 2px; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05);' > <option value=""></option> </select> """ height: 44 width: 310 backgroundColor: "#FFFFFF" super options @dropdown = document.getElementById(DOM_id) @define "value", get: -> @dropdown.value set: (value) -> @dropdown.value = value @define "dropdownOptions", get: -> @_dropdownOptions set: (dropdownOptions) -> """ [{value: 'option-value', text: 'option-text'}] """ @_dropdownOptions = dropdownOptions _optionsHTML = "" for option in @dropdownOptions _optionsHTML += "<option value=#{option.value}>#{option.text}</option>" @dropdown.innerHTML = _optionsHTML
[ { "context": "extField _($$.form.textInput).extend\n hintText: 'foo@example.com'\n value: Ti.App.Properties.getString 'instapaper", "end": 305, "score": 0.9999087452888489, "start": 290, "tag": "EMAIL", "value": "foo@example.com" }, { "context": "user =\n username: nameField.value\n password: passwordField.value\n\n Instapaper.authenticate ->\n if @", "end": 1004, "score": 0.9335472583770752, "start": 996, "tag": "PASSWORD", "value": "password" }, { "context": "Ti.App.Properties.setString 'instapaper_password', passwordField.value\n win.close()\n else\n dialo", "end": 1207, "score": 0.9642949104309082, "start": 1199, "tag": "PASSWORD", "value": "password" } ]
Resources/config_instapaper.coffee
naoya/HBFav
5
_ = require '/lib/underscore' Ti.include 'ui.js' Ti.include 'Instapaper.js' view = Ti.UI.createView layout: 'vertical' nameLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "ユーザー名" nameField = Ti.UI.createTextField _($$.form.textInput).extend hintText: 'foo@example.com' value: Ti.App.Properties.getString 'instapaper_username' keyboardType: Ti.UI.KEYBOARD_EMAIL autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE passwordLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "パスワード" passwordField = Ti.UI.createTextField _($$.form.textInput).extend hintText: 'パスワード' value: Ti.App.Properties.getString 'instapaper_password' passwordMask: true autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE view.add nameLabel view.add nameField view.add passwordLabel view.add passwordField win = Ti.UI.currentWindow HBFav.UI.setupConfigWindow win, (e) -> Instapaper.user = username: nameField.value password: passwordField.value Instapaper.authenticate -> if @.status is 200 Ti.App.Properties.setString 'instapaper_username', nameField.value Ti.App.Properties.setString 'instapaper_password', passwordField.value win.close() else dialog = Ti.UI.createAlertDialog title: "Authenticate Failed" message: "StatusCode: #{@.status}" dialog.show() win.add view
61554
_ = require '/lib/underscore' Ti.include 'ui.js' Ti.include 'Instapaper.js' view = Ti.UI.createView layout: 'vertical' nameLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "ユーザー名" nameField = Ti.UI.createTextField _($$.form.textInput).extend hintText: '<EMAIL>' value: Ti.App.Properties.getString 'instapaper_username' keyboardType: Ti.UI.KEYBOARD_EMAIL autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE passwordLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "パスワード" passwordField = Ti.UI.createTextField _($$.form.textInput).extend hintText: 'パスワード' value: Ti.App.Properties.getString 'instapaper_password' passwordMask: true autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE view.add nameLabel view.add nameField view.add passwordLabel view.add passwordField win = Ti.UI.currentWindow HBFav.UI.setupConfigWindow win, (e) -> Instapaper.user = username: nameField.value password: <PASSWORD>Field.value Instapaper.authenticate -> if @.status is 200 Ti.App.Properties.setString 'instapaper_username', nameField.value Ti.App.Properties.setString 'instapaper_password', <PASSWORD>Field.value win.close() else dialog = Ti.UI.createAlertDialog title: "Authenticate Failed" message: "StatusCode: #{@.status}" dialog.show() win.add view
true
_ = require '/lib/underscore' Ti.include 'ui.js' Ti.include 'Instapaper.js' view = Ti.UI.createView layout: 'vertical' nameLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "ユーザー名" nameField = Ti.UI.createTextField _($$.form.textInput).extend hintText: 'PI:EMAIL:<EMAIL>END_PI' value: Ti.App.Properties.getString 'instapaper_username' keyboardType: Ti.UI.KEYBOARD_EMAIL autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE passwordLabel = Ti.UI.createLabel _($$.form.label).extend top: 12 left: 15 text: "パスワード" passwordField = Ti.UI.createTextField _($$.form.textInput).extend hintText: 'パスワード' value: Ti.App.Properties.getString 'instapaper_password' passwordMask: true autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE view.add nameLabel view.add nameField view.add passwordLabel view.add passwordField win = Ti.UI.currentWindow HBFav.UI.setupConfigWindow win, (e) -> Instapaper.user = username: nameField.value password: PI:PASSWORD:<PASSWORD>END_PIField.value Instapaper.authenticate -> if @.status is 200 Ti.App.Properties.setString 'instapaper_username', nameField.value Ti.App.Properties.setString 'instapaper_password', PI:PASSWORD:<PASSWORD>END_PIField.value win.close() else dialog = Ti.UI.createAlertDialog title: "Authenticate Failed" message: "StatusCode: #{@.status}" dialog.show() win.add view
[ { "context": "age\n ###\n A cookie manager based on Peter-Paul Kochs cookie code.\n ###\n get : (key) ->\n ", "end": 836, "score": 0.5052157044410706, "start": 834, "tag": "NAME", "value": "ul" }, { "context": " ###\n A cookie manager based on Peter-Paul Kochs cookie code.\n ###\n get : (key) ->\n na", "end": 841, "score": 0.5066770315170288, "start": 838, "tag": "NAME", "value": "och" } ]
community/server/src/main/coffeescript/ribcage/storage/CookieStorage.coffee
rebaze/neo4j
1
### Copyright (c) 2002-2013 "Neo Technology," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define [], -> class CookieStorage ### A cookie manager based on Peter-Paul Kochs cookie code. ### get : (key) -> nameEQ = "#{key}=" cookieStrings = document.cookie.split(';') for cookieStr in cookieStrings while cookieStr.charAt(0) is ' ' cookieStr = cookieStr.substring(1,cookieStr.length) if cookieStr.indexOf(nameEQ) is 0 return cookieStr.substring(nameEQ.length,cookieStr.length) return null set : (key, value, days=365) -> if days date = new Date() date.setTime(date.getTime()+(days*24*60*60*1000)) expires = "; expires="+date.toGMTString() else expires = "" document.cookie = "#{key}=#{value}#{expires}; path=/" remove : (key) -> @set key, "", -1
30395
### Copyright (c) 2002-2013 "Neo Technology," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define [], -> class CookieStorage ### A cookie manager based on Peter-Pa<NAME> K<NAME>s cookie code. ### get : (key) -> nameEQ = "#{key}=" cookieStrings = document.cookie.split(';') for cookieStr in cookieStrings while cookieStr.charAt(0) is ' ' cookieStr = cookieStr.substring(1,cookieStr.length) if cookieStr.indexOf(nameEQ) is 0 return cookieStr.substring(nameEQ.length,cookieStr.length) return null set : (key, value, days=365) -> if days date = new Date() date.setTime(date.getTime()+(days*24*60*60*1000)) expires = "; expires="+date.toGMTString() else expires = "" document.cookie = "#{key}=#{value}#{expires}; path=/" remove : (key) -> @set key, "", -1
true
### Copyright (c) 2002-2013 "Neo Technology," Network Engine for Objects in Lund AB [http://neotechnology.com] This file is part of Neo4j. Neo4j is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ### define [], -> class CookieStorage ### A cookie manager based on Peter-PaPI:NAME:<NAME>END_PI KPI:NAME:<NAME>END_PIs cookie code. ### get : (key) -> nameEQ = "#{key}=" cookieStrings = document.cookie.split(';') for cookieStr in cookieStrings while cookieStr.charAt(0) is ' ' cookieStr = cookieStr.substring(1,cookieStr.length) if cookieStr.indexOf(nameEQ) is 0 return cookieStr.substring(nameEQ.length,cookieStr.length) return null set : (key, value, days=365) -> if days date = new Date() date.setTime(date.getTime()+(days*24*60*60*1000)) expires = "; expires="+date.toGMTString() else expires = "" document.cookie = "#{key}=#{value}#{expires}; path=/" remove : (key) -> @set key, "", -1
[ { "context": ": Meteor.settings.admin.username\n password: Meteor.settings.admin.password\n profile:\n name: 'Admin'\n Me", "end": 903, "score": 0.9993325471878052, "start": 873, "tag": "PASSWORD", "value": "Meteor.settings.admin.password" } ]
src/server/install.coffee
ArnoldasSid/vilnius-carpool
11
Meteor.startup ()-> Stops._ensureIndex({"loc": "2d" }); Trips._ensureIndex({"fromLoc": "2d" }); Trips._ensureIndex({"toLoc": "2d" }); Trips._ensureIndex({"stops.loc": "2d" }); if Meteor.settings.oauth if Accounts.loginServiceConfiguration.find().count() == 0 da ['install'], 'Creating login configurations' Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.google Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.facebook else console.warn "Run meteor with --settings settings.json option" # Create admin with email in settings if Meteor.settings.admin if Meteor.users.find({"emails.address": Meteor.settings.admin.username}).count() == 0 da ['install'], 'Creating admin user', Meteor.settings.admin Accounts.createUser email: Meteor.settings.admin.username password: Meteor.settings.admin.password profile: name: 'Admin' Meteor.users.update {"emails.address": Meteor.settings.admin.username}, $set: roles: ['root']
192214
Meteor.startup ()-> Stops._ensureIndex({"loc": "2d" }); Trips._ensureIndex({"fromLoc": "2d" }); Trips._ensureIndex({"toLoc": "2d" }); Trips._ensureIndex({"stops.loc": "2d" }); if Meteor.settings.oauth if Accounts.loginServiceConfiguration.find().count() == 0 da ['install'], 'Creating login configurations' Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.google Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.facebook else console.warn "Run meteor with --settings settings.json option" # Create admin with email in settings if Meteor.settings.admin if Meteor.users.find({"emails.address": Meteor.settings.admin.username}).count() == 0 da ['install'], 'Creating admin user', Meteor.settings.admin Accounts.createUser email: Meteor.settings.admin.username password: <PASSWORD> profile: name: 'Admin' Meteor.users.update {"emails.address": Meteor.settings.admin.username}, $set: roles: ['root']
true
Meteor.startup ()-> Stops._ensureIndex({"loc": "2d" }); Trips._ensureIndex({"fromLoc": "2d" }); Trips._ensureIndex({"toLoc": "2d" }); Trips._ensureIndex({"stops.loc": "2d" }); if Meteor.settings.oauth if Accounts.loginServiceConfiguration.find().count() == 0 da ['install'], 'Creating login configurations' Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.google Accounts.loginServiceConfiguration.insert Meteor.settings.oauth.facebook else console.warn "Run meteor with --settings settings.json option" # Create admin with email in settings if Meteor.settings.admin if Meteor.users.find({"emails.address": Meteor.settings.admin.username}).count() == 0 da ['install'], 'Creating admin user', Meteor.settings.admin Accounts.createUser email: Meteor.settings.admin.username password: PI:PASSWORD:<PASSWORD>END_PI profile: name: 'Admin' Meteor.users.update {"emails.address": Meteor.settings.admin.username}, $set: roles: ['root']
[ { "context": "ne) ->\n account = new Account\n username: \"12345\"\n password: \"testy\"\n\n account.save (error", "end": 392, "score": 0.9996237754821777, "start": 387, "tag": "USERNAME", "value": "12345" }, { "context": " Account\n username: \"12345\"\n password: \"testy\"\n\n account.save (error) ->\n if error\n ", "end": 416, "score": 0.9991932511329651, "start": 411, "tag": "PASSWORD", "value": "testy" }, { "context": "\", (next) ->\n Account.findOne\n username: \"12345\"\n , (err, account) ->\n account.username.s", "end": 646, "score": 0.9996038675308228, "start": 641, "tag": "USERNAME", "value": "12345" }, { "context": "r, account) ->\n account.username.should.eql \"12345\"\n console.log \"username: \", account.username", "end": 712, "score": 0.9996024966239929, "start": 707, "tag": "USERNAME", "value": "12345" } ]
test/account.test.coffee
chriscx/Disko
0
should = require 'should' mongoose = require 'mongoose' Account = require('../app/models/account').Account describe 'Account', -> before (done) -> unless mongoose.connection.readyState mongoose.connect 'mongodb://localhost/disko_dev', null, -> done() after (done) -> mongoose.disconnect done beforeEach (done) -> account = new Account username: "12345" password: "testy" account.save (error) -> if error console.log "error" + error.message else console.log "no error" done() it "find a user by username", (next) -> Account.findOne username: "12345" , (err, account) -> account.username.should.eql "12345" console.log "username: ", account.username next() afterEach (done) -> Account.remove {}, -> done()
42956
should = require 'should' mongoose = require 'mongoose' Account = require('../app/models/account').Account describe 'Account', -> before (done) -> unless mongoose.connection.readyState mongoose.connect 'mongodb://localhost/disko_dev', null, -> done() after (done) -> mongoose.disconnect done beforeEach (done) -> account = new Account username: "12345" password: "<PASSWORD>" account.save (error) -> if error console.log "error" + error.message else console.log "no error" done() it "find a user by username", (next) -> Account.findOne username: "12345" , (err, account) -> account.username.should.eql "12345" console.log "username: ", account.username next() afterEach (done) -> Account.remove {}, -> done()
true
should = require 'should' mongoose = require 'mongoose' Account = require('../app/models/account').Account describe 'Account', -> before (done) -> unless mongoose.connection.readyState mongoose.connect 'mongodb://localhost/disko_dev', null, -> done() after (done) -> mongoose.disconnect done beforeEach (done) -> account = new Account username: "12345" password: "PI:PASSWORD:<PASSWORD>END_PI" account.save (error) -> if error console.log "error" + error.message else console.log "no error" done() it "find a user by username", (next) -> Account.findOne username: "12345" , (err, account) -> account.username.should.eql "12345" console.log "username: ", account.username next() afterEach (done) -> Account.remove {}, -> done()