To: vim_dev@googlegroups.com Subject: Patch 8.2.2060 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2060 Problem: Check for features implemented with "if". Solution: Use the Check commands. (Ken Takata, closes #7383) Files: src/testdir/test_autocmd.vim, src/testdir/test_compiler.vim, src/testdir/test_delete.vim, src/testdir/test_diffmode.vim, src/testdir/test_expr.vim, src/testdir/test_fold.vim *** ../vim-8.2.2059/src/testdir/test_autocmd.vim 2020-11-26 20:33:56.856583887 +0100 --- src/testdir/test_autocmd.vim 2020-11-27 19:08:55.155187240 +0100 *************** *** 1689,1697 **** endfunc func Test_Filter_noshelltemp() ! if !executable('cat') ! return ! endif enew! call setline(1, ['a', 'b', 'c', 'd']) --- 1689,1695 ---- endfunc func Test_Filter_noshelltemp() ! CheckExecutable cat enew! call setline(1, ['a', 'b', 'c', 'd']) *** ../vim-8.2.2059/src/testdir/test_compiler.vim 2020-11-23 21:39:11.406594652 +0100 --- src/testdir/test_compiler.vim 2020-11-27 19:08:55.155187240 +0100 *************** *** 4,12 **** source shared.vim func Test_compiler() ! if !executable('perl') ! return ! endif CheckFeature quickfix " $LANG changes the output of Perl. --- 4,10 ---- source shared.vim func Test_compiler() ! CheckExecutable perl CheckFeature quickfix " $LANG changes the output of Perl. *** ../vim-8.2.2059/src/testdir/test_delete.vim 2020-08-12 18:50:31.875655822 +0200 --- src/testdir/test_delete.vim 2020-11-27 19:08:55.159187227 +0100 *************** *** 1,5 **** --- 1,7 ---- " Test for delete(). + source check.vim + func Test_file_delete() split Xfile call setline(1, ['a', 'b']) *************** *** 41,49 **** endfunc func Test_symlink_delete() ! if !has('unix') ! return ! endif split Xfile call setline(1, ['a', 'b']) wq --- 43,49 ---- endfunc func Test_symlink_delete() ! CheckUnix split Xfile call setline(1, ['a', 'b']) wq *************** *** 56,64 **** endfunc func Test_symlink_dir_delete() ! if !has('unix') ! return ! endif call mkdir('Xdir1') silent !ln -s Xdir1 Xlink call assert_true(isdirectory('Xdir1')) --- 56,62 ---- endfunc func Test_symlink_dir_delete() ! CheckUnix call mkdir('Xdir1') silent !ln -s Xdir1 Xlink call assert_true(isdirectory('Xdir1')) *************** *** 70,78 **** endfunc func Test_symlink_recursive_delete() ! if !has('unix') ! return ! endif call mkdir('Xdir3') call mkdir('Xdir3/subdir') call mkdir('Xdir4') --- 68,74 ---- endfunc func Test_symlink_recursive_delete() ! CheckUnix call mkdir('Xdir3') call mkdir('Xdir3/subdir') call mkdir('Xdir4') *** ../vim-8.2.2059/src/testdir/test_diffmode.vim 2020-11-05 19:06:55.739582600 +0100 --- src/testdir/test_diffmode.vim 2020-11-27 19:08:55.159187227 +0100 *************** *** 621,629 **** endfunc func Test_diffexpr() ! if !executable('diff') ! return ! endif func DiffExpr() " Prepent some text to check diff type detection --- 621,627 ---- endfunc func Test_diffexpr() ! CheckExecutable diff func DiffExpr() " Prepent some text to check diff type detection *** ../vim-8.2.2059/src/testdir/test_expr.vim 2020-10-04 16:06:00.513884339 +0200 --- src/testdir/test_expr.vim 2020-11-27 19:08:55.159187227 +0100 *************** *** 543,551 **** " Test for command-line completion of expressions func Test_expr_completion() ! if !has('cmdline_compl') ! return ! endif for cmd in [ \ 'let a = ', \ 'const a = ', --- 543,549 ---- " Test for command-line completion of expressions func Test_expr_completion() ! CheckFeature cmdline_compl for cmd in [ \ 'let a = ', \ 'const a = ', *** ../vim-8.2.2059/src/testdir/test_fold.vim 2020-11-10 18:23:47.870506514 +0100 --- src/testdir/test_fold.vim 2020-11-27 19:08:55.159187227 +0100 *************** *** 95,103 **** endfunc func Test_manual_fold_with_filter() ! if !executable('cat') ! return ! endif for type in ['manual', 'marker'] exe 'set foldmethod=' . type new --- 95,101 ---- endfunc func Test_manual_fold_with_filter() ! CheckExecutable cat for type in ['manual', 'marker'] exe 'set foldmethod=' . type new *** ../vim-8.2.2059/src/version.c 2020-11-27 19:01:25.872894362 +0100 --- src/version.c 2020-11-27 19:09:31.075052847 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2060, /**/ -- A mathematician is a device for turning coffee into theorems. Paul Erdos A computer programmer is a device for turning coffee into bugs. Bram Moolenaar /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///