aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-01-03 17:37:18 +0300
committerZyX <kp-pav@yandex.ru>2017-01-03 22:54:55 +0300
commit937b6fac8fecb701895b2c4151a864861aaf03f4 (patch)
tree21956b1642c8c018feaa26f88c2c5a3f91cf2d08
parentb38e7254280ea87ab7f5757709a22aa42da16b03 (diff)
downloadrneovim-937b6fac8fecb701895b2c4151a864861aaf03f4.tar.gz
rneovim-937b6fac8fecb701895b2c4151a864861aaf03f4.tar.bz2
rneovim-937b6fac8fecb701895b2c4151a864861aaf03f4.zip
unittest: Fix linter errors
-rw-r--r--test/unit/helpers.lua2
-rw-r--r--test/unit/preprocess.lua9
2 files changed, 3 insertions, 8 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index 1e97fc9793..a485a875ab 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -68,7 +68,7 @@ local function cimport(...)
return libnvim
end
- local body = nil
+ local body
body, previous_defines = Preprocess.preprocess(previous_defines, unpack(paths))
-- format it (so that the lines are "unique" statements), also filter out
diff --git a/test/unit/preprocess.lua b/test/unit/preprocess.lua
index a2c6b1712a..8c2a5c73e5 100644
--- a/test/unit/preprocess.lua
+++ b/test/unit/preprocess.lua
@@ -1,12 +1,8 @@
-- helps managing loading different headers into the LuaJIT ffi. Untested on
-- windows, will probably need quite a bit of adjustment to run there.
-local global_helpers = require('test.helpers')
-
local ffi = require("ffi")
-local tmpname = global_helpers.tmpname
-
local ccs = {}
local env_cc = os.getenv("CC")
@@ -83,7 +79,7 @@ local function headerize(headers, global)
end
local formatted = {}
- for i, hdr in ipairs(headers) do
+ for _, hdr in ipairs(headers) do
formatted[#formatted + 1] = "#include " ..
tostring(pre) ..
tostring(hdr) ..
@@ -101,7 +97,6 @@ local Gcc = {
function Gcc:define(name, args, val)
local define = '-D' .. name
- local quoted_define = ''
if args ~= nil then
define = define .. '(' .. table.concat(args, ',') .. ')'
end
@@ -116,7 +111,7 @@ function Gcc:undefine(name)
'-U' .. name)
end
-function Gcc:init_defines(name)
+function Gcc:init_defines()
-- preprocessor flags that will hopefully make the compiler produce C
-- declarations that the LuaJIT ffi understands.
self:define('aligned', {'ARGS'}, '')