2022-01-07 10:28:17 -07:00
|
|
|
-- Tests for misc Vimscript |builtin-functions|.
|
2021-09-17 09:16:40 -07:00
|
|
|
--
|
|
|
|
-- If a function is non-trivial, consider moving its spec to:
|
|
|
|
-- test/functional/vimscript/<funcname>_spec.lua
|
|
|
|
--
|
|
|
|
-- Core "eval" tests live in eval_spec.lua.
|
|
|
|
|
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
|
|
|
|
|
|
|
local clear = helpers.clear
|
|
|
|
local eval = helpers.eval
|
|
|
|
local matches = helpers.matches
|
2022-11-21 17:13:30 -07:00
|
|
|
local is_os = helpers.is_os
|
2021-09-17 09:16:40 -07:00
|
|
|
|
|
|
|
before_each(clear)
|
|
|
|
|
|
|
|
it('windowsversion()', function()
|
|
|
|
clear()
|
2022-11-21 17:13:30 -07:00
|
|
|
matches(is_os('win') and '^%d+%.%d+$' or '^$', eval('windowsversion()'))
|
2021-09-17 09:16:40 -07:00
|
|
|
end)
|