diff options
-rw-r--r-- | test/unit/helpers.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 5ad0766d61..eaf386d9cf 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -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 |