mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
unittest: Allow multiple indirect includes
Works by saving all preprocessor defines and reusing them on each run. This also saves NVIM_HEADER_H defines. Saving other defines is needed for defines like `Map(foo, bar)` which are sometimes used to declare types or functions. Saving types or function declarations is not needed because they are recorded as luajit state. Fixes #5857
This commit is contained in:
@@ -219,12 +219,10 @@ local function standalone(...) -- luacheck: ignore
|
||||
Preprocess.add_to_include_path('./../../build/include')
|
||||
Preprocess.add_to_include_path('./../../.deps/usr/include')
|
||||
|
||||
local input = Preprocess.preprocess_stream(arg[1])
|
||||
local raw = input:read('*all')
|
||||
input:close()
|
||||
local raw = Preprocess.preprocess(arg[1])
|
||||
|
||||
if raw == nil then
|
||||
print("ERROR: Preprocess.preprocess_stream():read() returned empty")
|
||||
print("ERROR: Preprocess.preprocess() returned empty")
|
||||
end
|
||||
|
||||
local formatted
|
||||
|
||||
Reference in New Issue
Block a user