Mercurial > vim
diff src/testdir/test_assert.vim @ 13272:abaebba89fd4 v8.0.1510
patch 8.0.1510: cannot test if a command causes a beep
commit https://github.com/vim/vim/commit/b48e96f61c87a64e38e3ac50732c92a84a4833b8
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 13 12:26:14 2018 +0100
patch 8.0.1510: cannot test if a command causes a beep
Problem: Cannot test if a command causes a beep.
Solution: Add assert_beeps().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Feb 2018 12:30:07 +0100 |
parents | 1c4ebbae41d2 |
children | a88c5e12b860 |
line wrap: on
line diff
--- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -111,6 +111,16 @@ func Test_assert_fail_fails() call remove(v:errors, 0) endfunc +func Test_assert_beeps() + new + call assert_beeps('normal h') + + call assert_beeps('normal 0') + call assert_match("command did not beep: normal 0", v:errors[0]) + call remove(v:errors, 0) + bwipe +endfunc + func Test_assert_inrange() call assert_inrange(7, 7, 7) call assert_inrange(5, 7, 5)