Mercurial > vim
diff runtime/doc/testing.txt @ 17620:072efa9ca875 v8.1.1807
patch 8.1.1807: more functions can be used as a method
commit https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 4 15:04:10 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Aug 2019 15:15:06 +0200 |
parents | 2704c4e3e20a |
children | 68ea27d26d5b |
line wrap: on
line diff
--- a/runtime/doc/testing.txt +++ b/runtime/doc/testing.txt @@ -1,4 +1,4 @@ -*testing.txt* For Vim version 8.1. Last change: 2019 Jul 28 +*testing.txt* For Vim version 8.1. Last change: 2019 Aug 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -222,7 +222,11 @@ assert_equal({expected}, {actual} [, {ms < 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|. @@ -294,7 +298,10 @@ assert_notequal({expected}, {actual} [, |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}.