Skip to content

Commit b294c29

Browse files
committed
test: add test for luafun compatibility
Issue automagically resolved after #33. Closes #74
1 parent d36c4ea commit b294c29

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/integration/pairs_test.lua

+21
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,24 @@ add('test_empty_space', function(g)
365365
]])
366366
t.assert_equals(count, 0)
367367
end)
368+
369+
add('test_luafun_compatipility', function(g)
370+
insert_customers(g,{
371+
{
372+
id = 1, name = "Elizabeth", last_name = "Jackson",
373+
age = 12, city = "New York",
374+
}, {
375+
id = 2, name = "Mary", last_name = "Brown",
376+
age = 46, city = "Los Angeles",
377+
}, {
378+
id = 3, name = "David", last_name = "Smith",
379+
age = 33, city = "Los Angeles",
380+
},
381+
})
382+
local count = g.cluster.main_server.net_box:eval([[
383+
local crud = require('crud')
384+
local count = crud.pairs('customers'):map(function() return 1 end):sum()
385+
return count
386+
]])
387+
t.assert_equals(count, 3)
388+
end)

0 commit comments

Comments
 (0)