aboutsummaryrefslogtreecommitdiff
path: root/test/unit/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-09-06 17:08:10 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-09-11 05:17:52 +0000
commitc76feb338a14a0e6dea494c18fb2d22f474cfc0e (patch)
treecdd5d5391eee13121d3c7125a852730e171deca3 /test/unit/helpers.lua
parent7577c31ed08b0f4e1426f9e6a1da7d5fd55440bb (diff)
downloadrneovim-c76feb338a14a0e6dea494c18fb2d22f474cfc0e.tar.gz
rneovim-c76feb338a14a0e6dea494c18fb2d22f474cfc0e.tar.bz2
rneovim-c76feb338a14a0e6dea494c18fb2d22f474cfc0e.zip
unit tests: helpers.lua: hack to avoid empty popen() result
Diffstat (limited to 'test/unit/helpers.lua')
-rw-r--r--test/unit/helpers.lua13
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