1
0
Fork 0
mirror of https://github.com/Reuh/candran.git synced 2025-10-27 17:59:30 +00:00
Updated README and tests
This commit is contained in:
Étienne Fildadut 2017-08-23 19:36:51 +02:00
parent 9b809fc8a4
commit 01ff6e6240
2 changed files with 48 additions and 1 deletions

View file

@ -275,6 +275,28 @@ end
return a(2, 3)
]], 5)
-- let variable declaration
test("let variable declaration", [[
let a = {
foo = function()
return type(a)
end
}
return a.foo()
]], "table")
-- continue keyword
test("continue keyword", [[
local a = ""
for i=1, 10 do
if i % 2 == 0 then
continue
end
a = a .. i
end
return a
]], "13579")
-- results
local resultCounter = {}
local testCounter = 0