diff runtime/doc/eval.txt @ 7593:87e607fb6853 v7.4.1096

commit https://github.com/vim/vim/commit/a260b87d9da17f605666630f18c1ed909c2b8bae Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 15 20:48:22 2016 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Fri, 15 Jan 2016 21:00:06 +0100
parents 9b7de205336d
children 3012eaddb6b2
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1752,6 +1752,7 @@ argv( {nr})			String	{nr} entry of the a
 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}
@@ -2207,6 +2208,11 @@ assert_exception({error} [, {msg}])			*a
 			  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()|.