diff runtime/doc/eval.txt @ 8831:6f41d68aa68e v7.4.1703

commit https://github.com/vim/vim/commit/b50e5f56861deb867478997397f7c784a7043233 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 3 20:57:20 2016 +0200 patch 7.4.1703 Problem: Can't assert for not equal and not matching. Solution: Add assert_notmatch() and assert_notequal().
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Apr 2016 21:00:05 +0200
parents aba2d0a01290
children 47f17f66da3d
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1801,11 +1801,13 @@ arglistid( [{winnr} [, {tabnr}]])
 				Number	argument list id
 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_equal( {exp}, {act} [, {msg}]) none  assert {exp} is equal to {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_match( {pat}, {text} [, {msg}]) none  assert {pat} matches {text}
+assert_notequal( {exp}, {act} [, {msg}]) none  assert {exp} is not equal {act}
+assert_notmatch( {pat}, {text} [, {msg}]) none  assert {pat} not matches {text}
 assert_true( {actual} [, {msg}])      none  assert {actual} is true
 asin( {expr})			Float	arc sine of {expr}
 atan( {expr})			Float	arc tangent of {expr}
@@ -2338,6 +2340,16 @@ assert_match({pattern}, {actual} [, {msg
 <		Will result in a string to be added to |v:errors|:
 	test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~
 
+							*assert_notequal()*
+assert_notequal({expected}, {actual} [, {msg}])
+		The opposite of `assert_equal()`: add an error message to
+		|v:errors| when {expected} and {actual} are equal.
+
+							*assert_notmatch()*
+assert_notmatch({pattern}, {actual} [, {msg}])
+		The opposite of `assert_match()`: add an error message to
+		|v:errors| when {pattern} matches {actual}.
+
 assert_true({actual} [, {msg}])					*assert_true()*
 		When {actual} is not true an error message is added to
 		|v:errors|, like with |assert_equal()|.