From c8c5af5a7a53f015c2836d911511a8fec4676ff9 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 14 May 2015 04:46:31 -0300 Subject: test: Ensure proper initialization in unit/helpers.lua Remove helpers.vim_init and simply perform the required initialization in helpers.lua. --- test/unit/helpers.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'test/unit/helpers.lua') diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 708e7a94ab..5bcc661226 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -136,15 +136,11 @@ end -- initialize some global variables, this is still necessary to unit test -- functions that rely on global state. -local function vim_init() - if vim_init_called ~= nil then - return - end +do local main = cimport('./src/nvim/main.h') local time = cimport('./src/nvim/os/time.h') time.time_init() main.early_init() - vim_init_called = true end -- C constants. @@ -167,7 +163,6 @@ return { lib = libnvim, cstr = cstr, to_cstr = to_cstr, - vim_init = vim_init, NULL = NULL, OK = OK, FAIL = FAIL -- cgit