view src/testdir/check.vim @ 17588:1348696d07cd v8.1.1791

patch 8.1.1791: 'completeslash' also applies to globpath() commit https://github.com/vim/vim/commit/50f91d22bd81819d5d946f6c38252c7922120ec6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 2 19:52:15 2019 +0200 patch 8.1.1791: 'completeslash' also applies to globpath() Problem: 'completeslash' also applies to globpath(). Solution: Add the WILD_IGNORE_COMPLETESLASH flag. (test by Yasuhiro Matsumoto, closes #4760)
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Aug 2019 20:00:07 +0200
parents 4a22102fda8f
children d7708560b77c
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

" Command to check for running on MS-Windows
command CheckMSWindows call CheckMSWindows()
func CheckMSWindows()
  if !has('win32')
    throw 'Skipped: only works on MS-Windows'
  endif
endfunc

" Command to check for running on Unix
command CheckUnix call CheckUnix()
func CheckUnix()
  if !has('unix')
    throw 'Skipped: only works on Unix'
  endif
endfunc