This commit is contained in:
Daniel Hahler 2019-11-29 09:49:32 +01:00 committed by Jan Edmund Lazo
parent 7268d49c50
commit aca002e7d5
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -375,16 +375,22 @@ describe('VimL dictionary notifications', function()
source([[
let g:d = {}
function! W(...)
call dictwatcherdel(g:d, '*', function('W'))
function! W1(...)
" Delete current and following watcher.
call dictwatcherdel(g:d, '*', function('W1'))
call dictwatcherdel(g:d, '*', function('W2'))
try
call dictwatcherdel({}, 'meh', function('tr'))
catch
let g:exc = v:exception
endtry
endfunction
call dictwatcheradd(g:d, '*', function('W1'))
function! W2(...)
endfunction
call dictwatcheradd(g:d, '*', function('W2'))
call dictwatcheradd(g:d, '*', function('W'))
let g:d.foo = 23
]])
eq(23, eval('g:d.foo'))