mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
test: do not inject vim module into global helpers
This commit is contained in:
@@ -73,7 +73,7 @@ describe('vim.secure', function()
|
||||
|
||||
local trust = helpers.read_file(funcs.stdpath('state') .. pathsep .. 'trust')
|
||||
eq(string.format('! %s', cwd .. pathsep .. 'Xfile'), vim.trim(trust))
|
||||
eq(helpers.NIL, exec_lua([[return vim.secure.read('Xfile')]]))
|
||||
eq(vim.NIL, exec_lua([[return vim.secure.read('Xfile')]]))
|
||||
|
||||
os.remove(funcs.stdpath('state') .. pathsep .. 'trust')
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('vim.secure', function()
|
||||
local hash = funcs.sha256(helpers.read_file('Xfile'))
|
||||
trust = helpers.read_file(funcs.stdpath('state') .. pathsep .. 'trust')
|
||||
eq(string.format('%s %s', hash, cwd .. pathsep .. 'Xfile'), vim.trim(trust))
|
||||
eq(helpers.NIL, exec_lua([[vim.secure.read('Xfile')]]))
|
||||
eq(vim.NIL, exec_lua([[vim.secure.read('Xfile')]]))
|
||||
|
||||
os.remove(funcs.stdpath('state') .. pathsep .. 'trust')
|
||||
|
||||
|
Reference in New Issue
Block a user