mirror_frr/tests/lib/script1.lua
Donald Lee 4535b6113c tests: Add test for calling Lua function
Signed-off-by: Donald Lee <dlqs@gmx.com>
2021-07-18 06:32:03 +08:00

21 lines
236 B
Lua

function foo(a, b)
a = a + b
return {
a = a,
b = b,
}
end
function fact(n)
function helper(m)
if m == 0 then
return 1
else
return m * helper(m - 1)
end
end
return {
n = helper(n)
}
end