aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/ex_cmds/dict_notifications_spec.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/ex_cmds/dict_notifications_spec.lua b/test/functional/ex_cmds/dict_notifications_spec.lua
index 3e6c248411..6830587961 100644
--- a/test/functional/ex_cmds/dict_notifications_spec.lua
+++ b/test/functional/ex_cmds/dict_notifications_spec.lua
@@ -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'))