From 07d15af3d893e5eecc1baffaf47fe512d6218d0b Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 13 Feb 2017 12:37:37 +0100 Subject: CONCAT --- tests/lvm.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/lvm.js') diff --git a/tests/lvm.js b/tests/lvm.js index d11eb9d..40a20bc 100644 --- a/tests/lvm.js +++ b/tests/lvm.js @@ -773,4 +773,26 @@ test('LEN', function (t) { 0, "Program output is correct" ); +}); + + +test('CONCAT', function (t) { + let luaCode = ` + return "hello " .. 2 .. " you" + `, L; + + t.plan(2); + + t.comment("Running following code: \n" + luaCode); + + t.doesNotThrow(function () { + L = getState(luaCode); + VM.luaV_execute(L); + }, "Program executed without errors"); + + t.strictEqual( + L.stack[L.top - 1].value, + "hello 2 you", + "Program output is correct" + ); }); \ No newline at end of file -- cgit v1.2.3-54-g00ecf