various small improvements.
lua_func validation in progress.
This commit is contained in:
30
test/validation/items/lua_func/lua_func.lua
Normal file
30
test/validation/items/lua_func/lua_func.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
tm = require("tm")
|
||||
|
||||
local module = {}
|
||||
|
||||
function module.donothing(param)
|
||||
return 0
|
||||
end
|
||||
|
||||
function module.assertparam(param)
|
||||
assert(param)
|
||||
end
|
||||
|
||||
function module.checkglobal(param, index)
|
||||
return tm.gd("lua_data_to_be_returned")[index]
|
||||
end
|
||||
|
||||
function module.should_not_be_called(param)
|
||||
assert(false)
|
||||
end
|
||||
|
||||
function module.echo(param)
|
||||
return param
|
||||
end
|
||||
|
||||
function module.tuple_return(first, second)
|
||||
return first, second
|
||||
end
|
||||
|
||||
|
||||
return module
|
||||
Reference in New Issue
Block a user