vim-patch:8.0.1510: cannot assert beep #9938

Problem:    Cannot test if a command causes a beep.
Solution:   Add assert_beeps().
b48e96f61c
This commit is contained in:
Jan Edmund Lazo
2019-04-25 08:31:33 -04:00
committed by Justin M. Keyes
parent 24a9516ff4
commit 9d77a07686
7 changed files with 47 additions and 2 deletions

View File

@@ -18,6 +18,15 @@ describe('assert function:', function()
clear()
end)
describe('assert_beeps', function()
it('works', function()
call('assert_beeps', 'normal h')
expected_empty()
call('assert_beeps', 'normal 0')
expected_errors({'command did not beep: normal 0'})
end)
end)
-- assert_equal({expected}, {actual}, [, {msg}])
describe('assert_equal', function()
it('should not change v:errors when expected is equal to actual', function()