Mercurial > vim
view src/testdir/check.vim @ 17410:5f5c552c1acb
Added tag v8.1.1703 for changeset e24bbd061233d8d27ed38c10210b39d955f0a8e0
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 16 Jul 2019 21:30:06 +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