mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
unit tests: initialize everything
This commit is contained in:
parent
f6088e79b0
commit
99a9161bac
@ -9,11 +9,6 @@ local buffer = helpers.cimport("./src/nvim/buffer.h")
|
|||||||
local window = helpers.cimport("./src/nvim/window.h")
|
local window = helpers.cimport("./src/nvim/window.h")
|
||||||
local option = helpers.cimport("./src/nvim/option.h")
|
local option = helpers.cimport("./src/nvim/option.h")
|
||||||
|
|
||||||
--{ Initialize the options needed for interacting with buffers
|
|
||||||
window.win_alloc_first()
|
|
||||||
option.set_init_1()
|
|
||||||
--}
|
|
||||||
|
|
||||||
describe('buffer functions', function()
|
describe('buffer functions', function()
|
||||||
|
|
||||||
local buflist_new = function(file, flags)
|
local buflist_new = function(file, flags)
|
||||||
|
@ -127,8 +127,25 @@ local function vim_init()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- import os_unix.h for mch_early_init(), which initializes some globals
|
-- import os_unix.h for mch_early_init(), which initializes some globals
|
||||||
local os = cimport('./src/nvim/os_unix.h')
|
local all = cimport('./src/nvim/os_unix.h',
|
||||||
os.mch_early_init()
|
'./src/nvim/misc1.h',
|
||||||
|
'./src/nvim/eval.h',
|
||||||
|
'./src/nvim/os_unix.h',
|
||||||
|
'./src/nvim/option.h',
|
||||||
|
'./src/nvim/ex_cmds2.h',
|
||||||
|
'./src/nvim/window.h',
|
||||||
|
'./src/nvim/ops.h',
|
||||||
|
'./src/nvim/normal.h',
|
||||||
|
'./src/nvim/mbyte.h')
|
||||||
|
all.mch_early_init()
|
||||||
|
all.mb_init()
|
||||||
|
all.eval_init()
|
||||||
|
all.init_normal_cmds()
|
||||||
|
all.win_alloc_first()
|
||||||
|
all.init_yank()
|
||||||
|
all.init_homedir()
|
||||||
|
all.set_init_1()
|
||||||
|
all.set_lang_var()
|
||||||
vim_init_called = true
|
vim_init_called = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -24,11 +24,7 @@ local NULL = ffi.cast('void *', 0)
|
|||||||
|
|
||||||
describe('shell functions', function()
|
describe('shell functions', function()
|
||||||
setup(function()
|
setup(function()
|
||||||
-- the logging functions are complain if I don't do this
|
|
||||||
shell.init_homedir()
|
|
||||||
|
|
||||||
shell.event_init()
|
shell.event_init()
|
||||||
|
|
||||||
-- os_system() can't work when the p_sh and p_shcf variables are unset
|
-- os_system() can't work when the p_sh and p_shcf variables are unset
|
||||||
shell.p_sh = to_cstr('/bin/bash')
|
shell.p_sh = to_cstr('/bin/bash')
|
||||||
shell.p_shcf = to_cstr('-c')
|
shell.p_shcf = to_cstr('-c')
|
||||||
|
@ -3,11 +3,12 @@ local helpers = require 'test.unit.helpers'
|
|||||||
|
|
||||||
local os = helpers.cimport './src/nvim/os/os.h'
|
local os = helpers.cimport './src/nvim/os/os.h'
|
||||||
local tempfile = helpers.cimport './src/nvim/tempfile.h'
|
local tempfile = helpers.cimport './src/nvim/tempfile.h'
|
||||||
-- os.mch_early_init
|
|
||||||
|
helpers.vim_init()
|
||||||
|
|
||||||
describe('tempfile related functions', function()
|
describe('tempfile related functions', function()
|
||||||
after_each(function()
|
after_each(function()
|
||||||
-- tempfile.vim_deltempdir()
|
tempfile.vim_deltempdir()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local vim_gettempdir = function()
|
local vim_gettempdir = function()
|
||||||
|
Loading…
Reference in New Issue
Block a user