test: move trim to global helpers

This commit is contained in:
Said Al Attrach
2019-03-30 18:14:20 +01:00
parent a9df3fa5d2
commit 2bf18e7843
4 changed files with 13 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ local neq = global_helpers.neq
local map = global_helpers.map
local eq = global_helpers.eq
local ok = global_helpers.ok
local trim = global_helpers.trim
-- C constants.
local NULL = ffi.cast('void*', 0)
@@ -120,10 +121,6 @@ local deinit = only_separate(function()
end
end)
local function trim(s)
return s:match('^%s*(.*%S)') or ''
end
-- a Set that keeps around the lines we've already seen
local cdefs_init = Set:new()
local cdefs_mod = nil