aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-03 11:51:39 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-03 11:51:39 +0100
commit29975e1ce839098e7e55b0cd25d788f0c96555ba (patch)
tree81b2e984240fcbc47422cd00bc6696cfd91b20b8 /tests
parent3e7c7039680f80f3fa90cf357e5448d42397ea16 (diff)
downloadfengari-29975e1ce839098e7e55b0cd25d788f0c96555ba.tar.gz
fengari-29975e1ce839098e7e55b0cd25d788f0c96555ba.tar.bz2
fengari-29975e1ce839098e7e55b0cd25d788f0c96555ba.zip
MOVE
Diffstat (limited to 'tests')
-rw-r--r--tests/lvm.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lvm.js b/tests/lvm.js
index 6ee348d..ffd128d 100644
--- a/tests/lvm.js
+++ b/tests/lvm.js
@@ -63,4 +63,28 @@ test('LOADK, RETURN', function (t) {
"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",
+ "Program output is correct"
+ );
}); \ No newline at end of file