Problem: Check for features implemented with "if".
Solution: Use the Check commands. (Ken Takata, closes #7383)
endfunc
func Test_Filter_noshelltemp()
- if !executable('cat')
- return
- endif
+ CheckExecutable cat
enew!
call setline(1, ['a', 'b', 'c', 'd'])
source shared.vim
func Test_compiler()
- if !executable('perl')
- return
- endif
+ CheckExecutable perl
CheckFeature quickfix
" $LANG changes the output of Perl.
" Test for delete().
+source check.vim
+
func Test_file_delete()
split Xfile
call setline(1, ['a', 'b'])
endfunc
func Test_symlink_delete()
- if !has('unix')
- return
- endif
+ CheckUnix
split Xfile
call setline(1, ['a', 'b'])
wq
endfunc
func Test_symlink_dir_delete()
- if !has('unix')
- return
- endif
+ CheckUnix
call mkdir('Xdir1')
silent !ln -s Xdir1 Xlink
call assert_true(isdirectory('Xdir1'))
endfunc
func Test_symlink_recursive_delete()
- if !has('unix')
- return
- endif
+ CheckUnix
call mkdir('Xdir3')
call mkdir('Xdir3/subdir')
call mkdir('Xdir4')
endfunc
func Test_diffexpr()
- if !executable('diff')
- return
- endif
+ CheckExecutable diff
func DiffExpr()
" Prepent some text to check diff type detection
" Test for command-line completion of expressions
func Test_expr_completion()
- if !has('cmdline_compl')
- return
- endif
+ CheckFeature cmdline_compl
for cmd in [
\ 'let a = ',
\ 'const a = ',
endfunc
func Test_manual_fold_with_filter()
- if !executable('cat')
- return
- endif
+ CheckExecutable cat
for type in ['manual', 'marker']
exe 'set foldmethod=' . type
new
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2060,
/**/
2059,
/**/