comparison 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
comparison
equal deleted inserted replaced
17619:f9976baad617 17620:072efa9ca875
1 *testing.txt* For Vim version 8.1. Last change: 2019 Jul 28 1 *testing.txt* For Vim version 8.1. Last change: 2019 Aug 04
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
220 Example: > 220 Example: >
221 assert_equal('foo', 'bar') 221 assert_equal('foo', 'bar')
222 < Will result in a string to be added to |v:errors|: 222 < Will result in a string to be added to |v:errors|:
223 test.vim line 12: Expected 'foo' but got 'bar' ~ 223 test.vim line 12: Expected 'foo' but got 'bar' ~
224 224
225 *assert_equalfile()* 225 Can also be used as a |method|: >
226 mylist->assert_equal([1, 2, 3])
227
228
229 < *assert_equalfile()*
226 assert_equalfile({fname-one}, {fname-two}) 230 assert_equalfile({fname-one}, {fname-two})
227 When the files {fname-one} and {fname-two} do not contain 231 When the files {fname-one} and {fname-two} do not contain
228 exactly the same text an error message is added to |v:errors|. 232 exactly the same text an error message is added to |v:errors|.
229 Also see |assert-return|. 233 Also see |assert-return|.
230 When {fname-one} or {fname-two} does not exist the error will 234 When {fname-one} or {fname-two} does not exist the error will
292 assert_notequal({expected}, {actual} [, {msg}]) 296 assert_notequal({expected}, {actual} [, {msg}])
293 The opposite of `assert_equal()`: add an error message to 297 The opposite of `assert_equal()`: add an error message to
294 |v:errors| when {expected} and {actual} are equal. 298 |v:errors| when {expected} and {actual} are equal.
295 Also see |assert-return|. 299 Also see |assert-return|.
296 300
297 *assert_notmatch()* 301 Can also be used as a |method|: >
302 mylist->assert_notequal([1, 2, 3])
303
304 < *assert_notmatch()*
298 assert_notmatch({pattern}, {actual} [, {msg}]) 305 assert_notmatch({pattern}, {actual} [, {msg}])
299 The opposite of `assert_match()`: add an error message to 306 The opposite of `assert_match()`: add an error message to
300 |v:errors| when {pattern} matches {actual}. 307 |v:errors| when {pattern} matches {actual}.
301 Also see |assert-return|. 308 Also see |assert-return|.
302 309