view src/testdir/test_version.vim @ 27843:532a0c5de1ec v8.2.4447

patch 8.2.4447: Vim9: can still use s:var in a compiled function Commit: https://github.com/vim/vim/commit/afa048f0d4b5d63f2192c9ba340a9eb8b0822985 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 22 20:43:36 2022 +0000 patch 8.2.4447: Vim9: can still use s:var in a compiled function Problem: Vim9: can still use s:var in a compiled function. Solution: Disallow using s:var for Vim9 script. (closes https://github.com/vim/vim/issues/9824)
author Bram Moolenaar <Bram@vim.org>
date Tue, 22 Feb 2022 21:45:03 +0100
parents dfdd973cf0c9
children
line wrap: on
line source

" Test :version Ex command

so check.vim
so shared.vim

func Test_version()
  " version should always return the same string.
  let v1 = execute('version')
  let v2 = execute('version')
  call assert_equal(v1, v2)

  call assert_match("^\n\nVIM - Vi IMproved .*", v1)
endfunc

func Test_version_redirect()
  CheckNotGui
  CheckCanRunGui
  CheckUnix

  call RunVim([], [], '--clean -g --version >Xversion 2>&1')
  call assert_match('Features included', readfile('Xversion')->join())

  call delete('Xversion')
endfunc

" vim: shiftwidth=2 sts=2 expandtab