Mercurial > vim
view src/testdir/check.vim @ 17394:969a28736055
Added tag v8.1.1695 for changeset 372f2eaa544ae8d191a6c9afc34b43d61d90bb16
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 15 Jul 2019 20:45:08 +0200 |
parents | 8e9e9124c7a2 |
children | 4a22102fda8f |
line wrap: on
line source
" Command to check for the presence of a feature. command -nargs=1 CheckFeature call CheckFeature(<f-args>) func CheckFeature(name) if !has(a:name) throw 'Skipped: ' .. a:name .. ' feature missing' endif endfunc " Command to check for the presence of a working option. command -nargs=1 CheckOption call CheckOption(<f-args>) func CheckOption(name) if !exists('+' .. a:name) throw 'Skipped: ' .. a:name .. ' option not supported' endif endfunc " Command to check for the presence of a function. command -nargs=1 CheckFunction call CheckFunction(<f-args>) func CheckFunction(name) if !exists('*' .. a:name) throw 'Skipped: ' .. a:name .. ' function missing' endif endfunc