Mercurial > vim
view src/testdir/check.vim @ 17262:041156ce1d22 v8.1.1630
patch 8.1.1630: various small problems
commit https://github.com/vim/vim/commit/e809a4ed3014fbf717c936c727291b5f038829a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 4 17:35:05 2019 +0200
patch 8.1.1630: various small problems
Problem: Various small problems.
Solution: Various small improvements.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Jul 2019 17:45:04 +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