aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-13 12:37:37 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-13 12:37:37 +0100
commit07d15af3d893e5eecc1baffaf47fe512d6218d0b (patch)
tree628f967484935802009ab5dfb60e1ffca2a8580d /tests
parent7236b4bf648ba2fffc83d0b031766208a183e52b (diff)
downloadfengari-07d15af3d893e5eecc1baffaf47fe512d6218d0b.tar.gz
fengari-07d15af3d893e5eecc1baffaf47fe512d6218d0b.tar.bz2
fengari-07d15af3d893e5eecc1baffaf47fe512d6218d0b.zip
CONCAT
Diffstat (limited to 'tests')
-rw-r--r--tests/lvm.js22
1 files changed, 22 insertions, 0 deletions
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