summaryrefslogtreecommitdiff
path: root/runtime/doc/testing.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-21 22:50:07 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-21 22:50:07 +0200
commite49fbff384e45dd17fed72321c26937edf6de16b (patch)
tree07f2db66848b5d23b6311be43f6dc50995096d1f /runtime/doc/testing.txt
parent00b0d6d8dc2c04b3cb26ea3c3d58527939f01af6 (diff)
downloadvim-git-e49fbff384e45dd17fed72321c26937edf6de16b.tar.gz
patch 8.1.1909: more functions can be used as methodsv8.1.1909
Problem: More functions can be used as methods. Solution: Make a few more functions usable as a method.
Diffstat (limited to 'runtime/doc/testing.txt')
-rw-r--r--runtime/doc/testing.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index 84aeb5783..f2f72bdaf 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -238,6 +238,10 @@ assert_equalfile({fname-one}, {fname-two})
mention that.
Mainly useful with |terminal-diff|.
+ Can also be used as a |method|: >
+ GetLog()->assert_equalfile('expected.log')
+
+
assert_exception({error} [, {msg}]) *assert_exception()*
When v:exception does not contain the string {error} an error
message is added to |v:errors|. Also see |assert-return|.
@@ -322,10 +326,15 @@ assert_notmatch({pattern}, {actual} [, {msg}])
Can also be used as a |method|: >
getFile()->assert_notmatch('bar.*')
+
assert_report({msg}) *assert_report()*
Report a test failure directly, using {msg}.
Always returns one.
+ Can also be used as a |method|: >
+ GetMessage()->assert_report()
+
+
assert_true({actual} [, {msg}]) *assert_true()*
When {actual} is not true an error message is added to
|v:errors|, like with |assert_equal()|.