aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/assert_spec.lua
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-25 08:31:33 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-04-25 14:31:33 +0200
commit9d77a0768697aced470c72ba71d0e04cf45f0fd0 (patch)
tree26d7504ad4d4133ff1cead5d251eab7d1e9e0380 /test/functional/legacy/assert_spec.lua
parent24a9516ff41b69e649f0dac131ad20efbe19eb4b (diff)
downloadrneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.tar.gz
rneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.tar.bz2
rneovim-9d77a0768697aced470c72ba71d0e04cf45f0fd0.zip
vim-patch:8.0.1510: cannot assert beep #9938
Problem: Cannot test if a command causes a beep. Solution: Add assert_beeps(). https://github.com/vim/vim/commit/b48e96f61c87a64e38e3ac50732c92a84a4833b8
Diffstat (limited to 'test/functional/legacy/assert_spec.lua')
-rw-r--r--test/functional/legacy/assert_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index 10703465aa..8df2d89b70 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -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()