diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-09-11 05:06:58 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-09-11 05:06:58 -0400 |
commit | 1da3398095b81a1f579a2d8d19864fdad8de0bde (patch) | |
tree | 53b6764cd02f55d11ff6f6f56a91d358b367ea7d /test/unit/preprocess.lua | |
parent | 7577c31ed08b0f4e1426f9e6a1da7d5fd55440bb (diff) | |
parent | 99a9161bace8200aa611f6feefcc2ac3eda93251 (diff) | |
download | rneovim-1da3398095b81a1f579a2d8d19864fdad8de0bde.tar.gz rneovim-1da3398095b81a1f579a2d8d19864fdad8de0bde.tar.bz2 rneovim-1da3398095b81a1f579a2d8d19864fdad8de0bde.zip |
Merge pull request #1144 from justinmk/fixtests
fix unittest issues with busted 2.x
Diffstat (limited to 'test/unit/preprocess.lua')
-rw-r--r-- | test/unit/preprocess.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/preprocess.lua b/test/unit/preprocess.lua index 2405270328..f17c7ba666 100644 --- a/test/unit/preprocess.lua +++ b/test/unit/preprocess.lua @@ -23,7 +23,7 @@ table.insert(ccs, {path = "/usr/bin/env clang", type = "clang"}) table.insert(ccs, {path = "/usr/bin/env icc", type = "gcc"}) local quote_me = '[^%w%+%-%=%@%_%/]' -- complement (needn't quote) -function shell_quote(str) +local function shell_quote(str) if string.find(str, quote_me) or str == '' then return "'" .. string.gsub(str, "'", [['"'"']]) .. "'" else @@ -32,7 +32,7 @@ function shell_quote(str) end -- parse Makefile format dependencies into a Lua table -function parse_make_deps(deps) +local function parse_make_deps(deps) -- remove line breaks and line concatenators deps = deps:gsub("\n", ""):gsub("\\", "") -- remove the Makefile "target:" element @@ -70,7 +70,7 @@ end -- produces: -- #include "vim.h" -- #include "memory.h" -function headerize(headers, global) +local function headerize(headers, global) local pre = '"' local post = pre if global then @@ -166,7 +166,7 @@ local type_to_class = { -- find the best cc. If os.exec causes problems on windows (like popping up -- a console window) we might consider using something like this: -- http://scite-ru.googlecode.com/svn/trunk/pack/tools/LuaLib/shell.html#exec -function find_best_cc(ccs) +local function find_best_cc(ccs) for _, meta in pairs(ccs) do local version = io.popen(tostring(meta.path) .. " -v 2>&1") version:close() |