diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-06 17:09:47 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-12 22:35:20 +0100 |
commit | 003c8acc8a9863932430bfb51bee8403b964c19b (patch) | |
tree | c7f47d87cbc6152a25dbaeffea225842ffc8306b /runtime/doc/testing.txt | |
parent | e6be6c307a832d661d2a6269ad2d322e4bf5e9cc (diff) | |
download | rneovim-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.txt | 10 |
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}. |