summaryrefslogtreecommitdiff
path: root/tests/tests.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-02 11:06:38 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-02 11:06:38 +0200
commitf2bb5dee9b90197185dd0367cee98b61b066ae70 (patch)
treeb3222d28e409053e6c6e1036de25c8e5701c9d7d /tests/tests.js
parentd35f4e1dcec1494483a9257b7a2cacb172047c1f (diff)
parent59d5ff59e3b9eacc2b2aa8e92e71f31914d09545 (diff)
downloadfengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.tar.gz
fengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.tar.bz2
fengari-f2bb5dee9b90197185dd0367cee98b61b066ae70.zip
Merge remote-tracking branch 'daurnimator/fix-errors'
Diffstat (limited to 'tests/tests.js')
-rw-r--r--tests/tests.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/tests.js b/tests/tests.js
index 6de0db3..217f1b8 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -4,7 +4,7 @@ const fs = require('fs');
const child_process = require('child_process');
const tmp = require('tmp');
-const BytecodeParser = require("../src/lundump.js");
+const lua = require("../src/lua.js");
const lauxlib = require("../src/lauxlib.js");
const toByteCode = function (luaCode) {
@@ -21,11 +21,9 @@ const toByteCode = function (luaCode) {
};
const getState = function(luaCode) {
- var dv = toByteCode(luaCode);
-
let L = lauxlib.luaL_newstate();
- let p = new BytecodeParser(L, dv).luaU_undump();
+ lauxlib.luaL_loadstring(L, lua.to_luastring(luaCode));
return L;
};