unit tests: helpers.lua: hack to avoid empty popen() result

This commit is contained in:
Justin M. Keyes 2014-09-06 17:08:10 -04:00
parent 7577c31ed0
commit c76feb338a

View File

@ -64,10 +64,15 @@ function cimport(...)
return libnvim
end
-- preprocess the header
local stream = Preprocess.preprocess_stream(unpack(paths))
local body = stream:read("*a")
stream:close()
-- require 'pl.pretty'.dump(paths)
local body = nil
for i=1, 3 do
local stream = Preprocess.preprocess_stream(unpack(paths))
body = stream:read("*a")
stream:close()
if body ~= nil then break end
end
-- require 'pl.pretty'.dump(body)
-- format it (so that the lines are "unique" statements), also filter out
-- Objective-C blocks