Add site-wide search function
This commit is contained in:
@@ -129,9 +129,9 @@ describe 'inventory.coffee', ->
|
||||
inventory.each (stack)-> slugs.push stack.itemSlug.qualified
|
||||
slugs.should.eql [
|
||||
'minecraft__boat'
|
||||
'buildcraft__stone_gear'
|
||||
'minecraft__string'
|
||||
'minecraft__wool'
|
||||
'buildcraft__stone_gear'
|
||||
]
|
||||
|
||||
it 'ignores qualified slugs', ->
|
||||
@@ -143,9 +143,9 @@ describe 'inventory.coffee', ->
|
||||
inventory.each (stack)-> slugs.push stack.itemSlug.qualified
|
||||
slugs.should.eql [
|
||||
'minecraft__boat'
|
||||
'buildcraft__stone_gear'
|
||||
'minecraft__string'
|
||||
'minecraft__wool'
|
||||
'buildcraft__stone_gear'
|
||||
]
|
||||
|
||||
describe 'parse', ->
|
||||
|
||||
@@ -35,20 +35,6 @@ describe 'item_slug.coffee', ->
|
||||
|
||||
describe 'ItemSlug.compare', ->
|
||||
|
||||
it 'sorts qualified slugs first', ->
|
||||
a = new ItemSlug 'alpha'
|
||||
b = new ItemSlug 'bravo', 'charlie'
|
||||
|
||||
ItemSlug.compare(a, b).should.equal +1
|
||||
ItemSlug.compare(b, a).should.equal -1
|
||||
|
||||
it 'sorts by mod when both are qualified', ->
|
||||
a = new ItemSlug 'alpha', 'bravo'
|
||||
b = new ItemSlug 'charlie', 'delta'
|
||||
|
||||
ItemSlug.compare(a, b).should.equal -1
|
||||
ItemSlug.compare(b, a).should.equal +1
|
||||
|
||||
it 'sorts by item when both are qualified in the same mod', ->
|
||||
a = new ItemSlug 'alpha', 'bravo'
|
||||
b = new ItemSlug 'charlie', 'bravo'
|
||||
|
||||
@@ -184,7 +184,7 @@ describe 'mod_version_parser_v1.coffee', ->
|
||||
it 'registers slugs for each output name', ->
|
||||
modVersion = parser.parse baseText + 'extras:Delta, Echo'
|
||||
(s.qualified for s in modVersion._slugs).should.eql [
|
||||
'test__bravo', 'test__delta', 'charlie', 'echo'
|
||||
'test__bravo', 'charlie', 'test__delta', 'echo'
|
||||
]
|
||||
|
||||
it 'does not allow a duplicate "extras" declaration', ->
|
||||
|
||||
Reference in New Issue
Block a user