diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-13 12:26:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-13 12:26:14 +0100 |
commit | b48e96f61c87a64e38e3ac50732c92a84a4833b8 (patch) | |
tree | 170cf91f5865fda3f985328c50b5d009e5296a3b /src/testdir/test_assert.vim | |
parent | 294959528e02403cd7ef6541208835f0c621c63b (diff) | |
download | vim-git-b48e96f61c87a64e38e3ac50732c92a84a4833b8.tar.gz |
patch 8.0.1510: cannot test if a command causes a beepv8.0.1510
Problem: Cannot test if a command causes a beep.
Solution: Add assert_beeps().
Diffstat (limited to 'src/testdir/test_assert.vim')
-rw-r--r-- | src/testdir/test_assert.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index 8359eb11c..29c853409 100644 --- 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) |