From 77ebe85be69d0071097036ecbd277a09b5e805a6 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 25 Feb 2017 00:22:46 +0300 Subject: buffer: Hide one of the asserts from lua parser --- test/unit/helpers.lua | 7 +++++++ test/unit/preprocess.lua | 1 + 2 files changed, 8 insertions(+) (limited to 'test') diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 1bfdd32739..4af078b486 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -79,6 +79,13 @@ local function cimport(...) -- format it (so that the lines are "unique" statements), also filter out -- Objective-C blocks + if os.getenv('NVIM_TEST_PRINT_I') == '1' then + local lnum = 0 + for line in body:gmatch('[^\n]+') do + lnum = lnum + 1 + print(lnum, line) + end + end body = formatc(body) body = filter_complex_blocks(body) diff --git a/test/unit/preprocess.lua b/test/unit/preprocess.lua index 4d819e5f23..363358d134 100644 --- a/test/unit/preprocess.lua +++ b/test/unit/preprocess.lua @@ -124,6 +124,7 @@ function Gcc:init_defines() self:define('_GNU_SOURCE') self:define('INCLUDE_GENERATED_DECLARATIONS') self:define('UNIT_TESTING') + self:define('UNIT_TESTING_LUA_PREPROCESSING') -- Needed for FreeBSD self:define('_Thread_local', nil, '') -- Needed for macOS Sierra -- cgit