summaryrefslogtreecommitdiff
path: root/tests/tests.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-24 15:11:12 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-24 15:11:12 +0200
commit31dcd12f5a9cd6a45e8ad9d1213a8a25d88fe885 (patch)
tree18fae5b71f40278e64ac8733827d2bea7e58d588 /tests/tests.js
parentb9f9cde1c18ace3930be4cb7f6d9527178544d8b (diff)
downloadfengari-31dcd12f5a9cd6a45e8ad9d1213a8a25d88fe885.tar.gz
fengari-31dcd12f5a9cd6a45e8ad9d1213a8a25d88fe885.tar.bz2
fengari-31dcd12f5a9cd6a45e8ad9d1213a8a25d88fe885.zip
Removed useless luac -l from tests
Diffstat (limited to 'tests/tests.js')
-rw-r--r--tests/tests.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/tests.js b/tests/tests.js
index 40bebd8..32efca1 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -15,23 +15,15 @@ const toByteCode = function (luaCode) {
fs.writeSync(luaFile.fd, luaCode);
child_process.execSync(`luac -o ${luaFile.name}.bc ${luaFile.name}`);
- child_process.execSync(`luac -l ${luaFile.name} > ${luaFile.name}.bc.txt`);
-
- bclist = fs.readFileSync(`${luaFile.name}.bc.txt`, 'utf8');
let b = fs.readFileSync(`${luaFile.name}.bc`);
let dv = new DataView(b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength));
- return {
- dataView: dv,
- bclist: bclist
- };
+ return dv;
};
const getState = function(luaCode) {
- var bc = toByteCode(luaCode),
- dv = bc.dataView,
- bcl = bc.bclist;
+ var dv = toByteCode(luaCode);
let L = lauxlib.luaL_newstate();
@@ -41,4 +33,4 @@ const getState = function(luaCode) {
};
module.exports.getState = getState;
-module.exports.toByteCode = toByteCode; \ No newline at end of file
+module.exports.toByteCode = toByteCode;