Fix string filter generator.

This commit is contained in:
bakpakin
2016-03-05 16:06:56 -05:00
parent 3b4bd9920b
commit 27f881444a
2 changed files with 27 additions and 4 deletions
+22
View File
@@ -111,6 +111,28 @@ describe('tiny-ecs:', function()
end)
it("Can use string filters", function()
local f = tiny.filter('a|b|c')
assert.truthy(f(nil, {
a = true, b = true, c = true
}))
assert.truthy(f(nil, {
a = true
}))
assert.truthy(f(nil, {
b = true
}))
assert.truthy(f(nil, {
c = true
}))
assert.falsy(f(nil, {
x = true, y = true, z = true
}))
end)
end)
describe('World:', function()