functions_spec.lua 533 B

12345678910111213141516171819202122
  1. -- Tests for misc Vimscript |builtin-functions|.
  2. --
  3. -- If a function is non-trivial, consider moving its spec to:
  4. -- test/functional/vimscript/<funcname>_spec.lua
  5. --
  6. -- Core "eval" tests live in eval_spec.lua.
  7. local t = require('test.testutil')
  8. local n = require('test.functional.testnvim')()
  9. local clear = n.clear
  10. local eval = n.eval
  11. local matches = t.matches
  12. local is_os = t.is_os
  13. before_each(clear)
  14. it('windowsversion()', function()
  15. clear()
  16. matches(is_os('win') and '^%d+%.%d+$' or '^$', eval('windowsversion()'))
  17. end)