test_version.vim 572 B

123456789101112131415161718192021222324252627
  1. " Test :version Ex command
  2. so check.vim
  3. so shared.vim
  4. func Test_version()
  5. " version should always return the same string.
  6. let v1 = execute('version')
  7. let v2 = execute('version')
  8. call assert_equal(v1, v2)
  9. call assert_match("^\n\nNVIM v[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+.*", v1)
  10. endfunc
  11. func Test_version_redirect()
  12. CheckNotGui
  13. CheckCanRunGui
  14. CheckUnix
  15. call RunVim([], [], '--clean -g --version >Xversion 2>&1')
  16. call assert_match('Features included', readfile('Xversion')->join())
  17. call delete('Xversion')
  18. endfunc
  19. " vim: shiftwidth=2 sts=2 expandtab