Mercurial > vim
view src/testdir/test_version.vim @ 26618:b531c26f728b v8.2.3838
patch 8.2.3838: cannot use script-local function for setting *func options
Commit: https://github.com/vim/vim/commit/db1a410b610b2c1941311acc57dcc4afec20720e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Fri Dec 17 16:21:20 2021 +0000
patch 8.2.3838: cannot use script-local function for setting *func options
Problem: Cannot use script-local function for setting *func options.
Solution: Use the script context. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9362)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 Dec 2021 17:30:04 +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