Add site-wide search function

This commit is contained in:
Andrew Miner
2015-04-05 18:33:51 -07:00
parent b79fa5a148
commit 136ebb4187
19 changed files with 521 additions and 53 deletions
+2 -2
View File
@@ -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', ->
-14
View File
@@ -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', ->