docs: api, pack, events, develop

This commit is contained in:
Justin M. Keyes
2025-06-18 13:39:35 +02:00
parent 54cde0674b
commit 58df501913
27 changed files with 169 additions and 198 deletions

View File

@ -74,23 +74,12 @@ describe('vim.system', function()
end)
it('can set environment', function()
eq(
'TESTVAL',
system(
{ n.testprg('printenv-test'), 'TEST' },
{ env = { TEST = 'TESTVAL' }, text = true }
).stdout
)
end)
local function test_env(opt)
eq('TESTVAL', system({ n.testprg('printenv-test'), 'TEST' }, opt).stdout)
end
it('can set environment with clear_env = true', function()
eq(
'TESTVAL',
system(
{ n.testprg('printenv-test'), 'TEST' },
{ clear_env = true, env = { TEST = 'TESTVAL' }, text = true }
).stdout
)
test_env({ env = { TEST = 'TESTVAL' }, text = true })
test_env({ clear_env = true, env = { TEST = 'TESTVAL' }, text = true })
end)
it('can set environment with clear_env = true and env = nil', function()

View File

@ -5,7 +5,7 @@
-- null_spec.lua
-- operators_spec.lua
--
-- Tests for the Vimscript |builtin-functions| library should live in:
-- Tests for the Vimscript |vimscript-functions| library should live in:
-- test/functional/vimscript/<funcname>_spec.lua
-- test/functional/vimscript/functions_spec.lua

View File

@ -1,4 +1,4 @@
-- Tests for misc Vimscript |builtin-functions|.
-- Tests for misc Vimscript |vimscript-functions|.
--
-- If a function is non-trivial, consider moving its spec to:
-- test/functional/vimscript/<funcname>_spec.lua