comparison src/testdir/test_functions.vim @ 17657:0da9bc55c31a v8.1.1826

patch 8.1.1826: tests use hand coded feature and option checks commit https://github.com/vim/vim/commit/8c5a278fc508da6dfe50e69b6ee734451aa4eafb Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 7 23:07:07 2019 +0200 patch 8.1.1826: tests use hand coded feature and option checks Problem: Tests use hand coded feature and option checks. Solution: Use the commands from check.vim in more tests.
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Aug 2019 23:15:07 +0200
parents f1fd0b0b335c
children 45eca7143d7c
comparison
equal deleted inserted replaced
17656:2adce9da20d8 17657:0da9bc55c31a
1 " Tests for various functions. 1 " Tests for various functions.
2 source shared.vim 2 source shared.vim
3 source check.vim
3 4
4 " Must be done first, since the alternate buffer must be unset. 5 " Must be done first, since the alternate buffer must be unset.
5 func Test_00_bufexists() 6 func Test_00_bufexists()
6 call assert_equal(0, bufexists('does_not_exist')) 7 call assert_equal(0, bufexists('does_not_exist'))
7 call assert_equal(1, bufexists(bufnr('%'))) 8 call assert_equal(1, bufexists(bufnr('%')))
1374 delfunc ExistingFunction 1375 delfunc ExistingFunction
1375 endfunc 1376 endfunc
1376 1377
1377 " Test confirm({msg} [, {choices} [, {default} [, {type}]]]) 1378 " Test confirm({msg} [, {choices} [, {default} [, {type}]]])
1378 func Test_confirm() 1379 func Test_confirm()
1379 if !has('unix') || has('gui_running') 1380 CheckUnix
1380 return 1381 CheckNotGui
1381 endif
1382 1382
1383 call feedkeys('o', 'L') 1383 call feedkeys('o', 'L')
1384 let a = confirm('Press O to proceed') 1384 let a = confirm('Press O to proceed')
1385 call assert_equal(1, a) 1385 call assert_equal(1, a)
1386 1386