summaryrefslogtreecommitdiff
path: root/tests/lvm.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-04 09:01:25 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-04 22:17:24 +0100
commit18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb (patch)
tree3f215ba709174b057ea76b2a8b0fbb2f6ad850e5 /tests/lvm.js
parentb618b835c74a8637e00ba1f4adf6b8884d360d43 (diff)
downloadfengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.tar.gz
fengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.tar.bz2
fengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.zip
CLOSURE, CALL
Diffstat (limited to 'tests/lvm.js')
-rw-r--r--tests/lvm.js22
1 files changed, 22 insertions, 0 deletions
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