test: do not inject vim module into global helpers

This commit is contained in:
Lewis Russell
2024-01-12 11:28:20 +00:00
parent 2f9ee9b6cf
commit d33e1da9b7
44 changed files with 132 additions and 133 deletions

View File

@@ -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')