aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/testing.txt
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-06 17:09:47 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-08-12 22:35:20 +0100
commit003c8acc8a9863932430bfb51bee8403b964c19b (patch)
treec7f47d87cbc6152a25dbaeffea225842ffc8306b /runtime/doc/testing.txt
parente6be6c307a832d661d2a6269ad2d322e4bf5e9cc (diff)
downloadrneovim-003c8acc8a9863932430bfb51bee8403b964c19b.tar.gz
rneovim-003c8acc8a9863932430bfb51bee8403b964c19b.tar.bz2
rneovim-003c8acc8a9863932430bfb51bee8403b964c19b.zip
vim-patch:8.1.1807: more functions can be used as a method
Problem: More functions can be used as a method. Solution: Add append(), appendbufline(), assert_equal(), etc. Also add the :eval command. https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5 :eval is already ported.
Diffstat (limited to 'runtime/doc/testing.txt')
-rw-r--r--runtime/doc/testing.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index ef8d6b5ea9..eca2025ed7 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -69,7 +69,10 @@ assert_equal({expected}, {actual} [, {msg}])
< Will result in a string to be added to |v:errors|:
test.vim line 12: Expected 'foo' but got 'bar' ~
- *assert_equalfile()*
+ Can also be used as a |method|: >
+ mylist->assert_equal([1, 2, 3])
+
+< *assert_equalfile()*
assert_equalfile({fname-one}, {fname-two})
When the files {fname-one} and {fname-two} do not contain
exactly the same text an error message is added to |v:errors|.
@@ -145,7 +148,10 @@ assert_notequal({expected}, {actual} [, {msg}])
|v:errors| when {expected} and {actual} are equal.
Also see |assert-return|.
- *assert_notmatch()*
+ Can also be used as a |method|: >
+ mylist->assert_notequal([1, 2, 3])
+
+< *assert_notmatch()*
assert_notmatch({pattern}, {actual} [, {msg}])
The opposite of `assert_match()`: add an error message to
|v:errors| when {pattern} matches {actual}.