mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.0427: it is not possible to check for a typo in a feature name
Problem: It is not possible to check for a typo in a feature name. Solution: Add an extra argument to has().
This commit is contained in:
@@ -20,6 +20,14 @@ func Test_00_bufexists()
|
||||
call assert_equal(0, bufexists('Xfoo'))
|
||||
endfunc
|
||||
|
||||
func Test_has()
|
||||
call assert_equal(1, has('eval'))
|
||||
call assert_equal(1, has('eval', 1))
|
||||
|
||||
call assert_equal(0, has('nonexistent'))
|
||||
call assert_equal(0, has('nonexistent', 1))
|
||||
endfunc
|
||||
|
||||
func Test_empty()
|
||||
call assert_equal(1, empty(''))
|
||||
call assert_equal(0, empty('a'))
|
||||
@@ -1586,7 +1594,7 @@ func Test_confirm()
|
||||
call assert_equal(2, a)
|
||||
|
||||
" confirm() should return 0 when pressing CTRL-C.
|
||||
call feedkeys("\<C-c>", 'L')
|
||||
call feedkeys("\<C-C>", 'L')
|
||||
let a = confirm('Are you sure?', "&Yes\n&No")
|
||||
call assert_equal(0, a)
|
||||
|
||||
|
Reference in New Issue
Block a user