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.
|
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
local t = require('test.testutil')
|
|
|
|
local n = require('test.functional.testnvim')()
|
2021-09-17 09:16:40 -07:00
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
local clear = n.clear
|
|
|
|
local eval = n.eval
|
2024-04-08 02:03:20 -07:00
|
|
|
local matches = t.matches
|
|
|
|
local is_os = t.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)
|