API: nvim_unsubscribe(): Handle unknown events #8745

close #8745
This commit is contained in:
Daniel Hahler
2018-07-14 18:23:08 +02:00
committed by Justin M. Keyes
parent 10e885bdfc
commit 643ef257b3
2 changed files with 12 additions and 0 deletions

View File

@@ -65,4 +65,11 @@ describe('notify', function()
eq(nest_level, act_nest_level)
end)
end)
it('unsubscribe non-existing event #8745', function()
nvim('subscribe', 'event1')
nvim('unsubscribe', 'doesnotexist')
nvim('unsubscribe', 'event1')
eq(2, eval('1+1')) -- Still alive?
end)
end)