aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-07-08 14:09:10 -0400
committerJames McCoy <jamessan@jamessan.com>2016-07-23 20:42:46 -0400
commit452707e0b0bb6927350d2a68485a5453c214610b (patch)
tree8828900cc312e1e6bd2b1f53e4ed92dc30edd79f /runtime
parentf1d912c584c10f92fe0710e3a907c3d519fbe7d8 (diff)
downloadrneovim-452707e0b0bb6927350d2a68485a5453c214610b.tar.gz
rneovim-452707e0b0bb6927350d2a68485a5453c214610b.tar.bz2
rneovim-452707e0b0bb6927350d2a68485a5453c214610b.zip
vim-patch:7.4.1703
Problem: Can't assert for not equal and not matching. Solution: Add assert_notmatch() and assert_notequal(). https://github.com/vim/vim/commit/b50e5f56861deb867478997397f7c784a7043233
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7b6a330e94..ba38a140d1 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1784,11 +1784,13 @@ 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_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}
@@ -2302,6 +2304,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()|.