mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
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().
This commit is contained in:
@@ -2017,6 +2017,7 @@ argidx() Number current index in the argument list
|
||||
arglistid([{winnr} [, {tabnr}]]) Number argument list id
|
||||
argv({nr}) String {nr} entry of the argument list
|
||||
argv() 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}])
|
||||
@@ -2568,6 +2569,11 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
|
||||
< Without the {nr} argument a |List| with the whole |arglist| is
|
||||
returned.
|
||||
|
||||
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
|
||||
@@ -2600,6 +2606,8 @@ assert_fails({cmd} [, {error}]) *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
|
||||
|
||||
Reference in New Issue
Block a user