From 18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sat, 4 Feb 2017 09:01:25 +0100 Subject: CLOSURE, CALL --- tests/lvm.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/lvm.js b/tests/lvm.js index 1dbff2e..1b4d8c3 100644 --- a/tests/lvm.js +++ b/tests/lvm.js @@ -157,4 +157,26 @@ test('NEWTABLE', function (t) { vm.L.stack[0] instanceof Table, "Program output is correct" ); +}); + + +test('CALL', function (t) { + let luaCode = ` + local f = function (a, b) + return a + b + end + + local c = f(1, 2) + + return c + `, vm; + + t.plan(0); + + t.comment("Running following code: \n" + luaCode); + + // t.doesNotThrow(function () { + vm = getVM(luaCode); + vm.execute(); + // }, "Program executed without errors"); }); \ No newline at end of file -- cgit v1.2.3-54-g00ecf