mirror of
https://github.com/neovim/neovim.git
synced 2026-04-04 22:59:36 +00:00
refactor(vim.version): cleanup
- version.cmp(): assert valid version - add test for loading vim.version (the other tests use shared.lua in the test runner) - reduce test scopes, reword test descriptions
This commit is contained in:
@@ -51,7 +51,10 @@ end
|
||||
-- builtin functions which always should be available
|
||||
require('vim.shared')
|
||||
|
||||
vim._submodules = { inspect = true }
|
||||
vim._submodules = {
|
||||
inspect = true,
|
||||
version = true,
|
||||
}
|
||||
|
||||
-- These are for loading runtime modules in the vim namespace lazily.
|
||||
setmetatable(vim, {
|
||||
@@ -69,9 +72,6 @@ setmetatable(vim, {
|
||||
t[key] = val
|
||||
return t[key]
|
||||
end
|
||||
elseif key == 'version' then
|
||||
t[key] = require('vim.version')
|
||||
return t[key]
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user