From 29975e1ce839098e7e55b0cd25d788f0c96555ba Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 3 Feb 2017 11:51:39 +0100 Subject: MOVE --- tests/lvm.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/lvm.js b/tests/lvm.js index 6ee348d..ffd128d 100644 --- a/tests/lvm.js +++ b/tests/lvm.js @@ -58,6 +58,30 @@ test('LOADK, RETURN', function (t) { vm.execute(); }, "Program executed without errors"); + t.strictEqual( + vm.L.stack[0].value, + "hello world", + "Program output is correct" + ); +}); + + +test('MOV', function (t) { + let luaCode = ` + local a = "hello world" + local b = a + return b + `, vm; + + t.plan(1); + + t.comment("Running following code: \n" + luaCode); + + // t.doesNotThrow(function () { + vm = getVM(luaCode); + vm.execute(); + // }, "Program executed without errors"); + t.strictEqual( vm.L.stack[0].value, "hello world", -- cgit v1.2.3-70-g09d2