aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-02-25 00:22:46 +0300
committerZyX <kp-pav@yandex.ru>2017-02-25 00:22:46 +0300
commit77ebe85be69d0071097036ecbd277a09b5e805a6 (patch)
treea3340b7ff4b325fe544ede4117f61b44bca1082e /test
parent5f7d8f889cd15b0f98a98675a8ed0fb6500bdbee (diff)
downloadrneovim-77ebe85be69d0071097036ecbd277a09b5e805a6.tar.gz
rneovim-77ebe85be69d0071097036ecbd277a09b5e805a6.tar.bz2
rneovim-77ebe85be69d0071097036ecbd277a09b5e805a6.zip
buffer: Hide one of the asserts from lua parser
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers.lua7
-rw-r--r--test/unit/preprocess.lua1
2 files changed, 8 insertions, 0 deletions
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