aboutsummaryrefslogtreecommitdiff
path: root/runtime
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 /runtime
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 'runtime')
-rw-r--r--runtime/doc/eval.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 9e2994ae2e..454013ac73 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1966,6 +1966,7 @@ argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id
argv({nr} [, {winid}]) String {nr} entry of the argument list
argv([-1, {winid}]) List the argument list
+assert_beeps({cmd}) none assert {cmd} causes a beep
assert_equal({exp}, {act} [, {msg}])
none assert {exp} is equal to {act}
assert_exception({error} [, {msg}])
@@ -2479,6 +2480,11 @@ argv([{nr} [, {winid}])
The {winid} argument specifies the window ID, see |argc()|.
+assert_beeps({cmd}) *assert_beeps()*
+ Run {cmd} and add an error message to |v:errors| if it does
+ NOT produce a beep or visual bell.
+ Also see |assert_fails()|.
+
*assert_equal()*
assert_equal({expected}, {actual}, [, {msg}])
When {expected} and {actual} are not equal an error message is
@@ -2511,6 +2517,8 @@ assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce an error.
When {error} is given it must match in |v:errmsg|.
+ Note that beeping is not considered an error, and some failing
+ commands only beep. Use |assert_beeps()| for those.
assert_false({actual} [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to