aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-05-25 16:59:52 -0400
committerJames McCoy <jamessan@jamessan.com>2016-05-25 17:13:05 -0400
commitbc306ab5aa0d2ee7a4653cb1d47615a3f04478a1 (patch)
treeba9a822c8bde433c34f4ea5282cce8b9cb500abd /runtime
parent2115fcdfd5a6b32b62dcd280c59843437c4702d6 (diff)
downloadrneovim-bc306ab5aa0d2ee7a4653cb1d47615a3f04478a1.tar.gz
rneovim-bc306ab5aa0d2ee7a4653cb1d47615a3f04478a1.tar.bz2
rneovim-bc306ab5aa0d2ee7a4653cb1d47615a3f04478a1.zip
vim-patch:7.4.1096
Problem: Need several lines to verify a command produces an error. Solution: Add assert_fails(). (suggested by Nikolay Pavlov) Make the quickfix alloc test actually work. https://github.com/vim/vim/commit/a260b87d9da17f605666630f18c1ed909c2b8bae
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 8b23d2ff5f..bda7a4b910 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1789,6 +1789,7 @@ argv({nr}) String {nr} entry of the argument list
argv() List the argument list
assert_equal({exp}, {act} [, {msg}]) none assert {exp} equals {act}
assert_exception({error} [, {msg}]) none assert {error} is in v:exception
+assert_fails( {cmd} [, {error}]) none assert {cmd} fails
assert_false({actual} [, {msg}]) none assert {actual} is false
assert_true({actual} [, {msg}]) none assert {actual} is true
asin({expr}) Float arc sine of {expr}
@@ -2263,6 +2264,11 @@ assert_exception({error} [, {msg}]) *assert_exception()*
call assert_exception('E492:')
endtry
+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 |v:errmsg|.
+
assert_false({actual} [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
|v:errors|, like with |assert_equal()|.