Mercurial > vim
comparison runtime/doc/testing.txt @ 20679:1af1d8ff2aa8 v8.2.0893
patch 8.2.0893: assert_equalfile() does not take a third argument
Commit: https://github.com/vim/vim/commit/fb517bac2384798bb5142ed1f75f965f93984c0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 3 19:55:35 2020 +0200
patch 8.2.0893: assert_equalfile() does not take a third argument
Problem: Assert_equalfile() does not take a third argument.
Solution: Implement the third argument. (Gary Johnson)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 03 Jun 2020 20:00:04 +0200 |
parents | 1908e92b02fd |
children | 661eb972cb22 |
comparison
equal
deleted
inserted
replaced
20678:f5bc9724bf64 | 20679:1af1d8ff2aa8 |
---|---|
261 test.vim line 12: Expected 'foo' but got 'bar' ~ | 261 test.vim line 12: Expected 'foo' but got 'bar' ~ |
262 | 262 |
263 Can also be used as a |method|: > | 263 Can also be used as a |method|: > |
264 mylist->assert_equal([1, 2, 3]) | 264 mylist->assert_equal([1, 2, 3]) |
265 | 265 |
266 | |
267 < *assert_equalfile()* | 266 < *assert_equalfile()* |
268 assert_equalfile({fname-one}, {fname-two}) | 267 assert_equalfile({fname-one}, {fname-two} [, {msg}]) |
269 When the files {fname-one} and {fname-two} do not contain | 268 When the files {fname-one} and {fname-two} do not contain |
270 exactly the same text an error message is added to |v:errors|. | 269 exactly the same text an error message is added to |v:errors|. |
271 Also see |assert-return|. | 270 Also see |assert-return|. |
272 When {fname-one} or {fname-two} does not exist the error will | 271 When {fname-one} or {fname-two} does not exist the error will |
273 mention that. | 272 mention that. |
274 Mainly useful with |terminal-diff|. | 273 Mainly useful with |terminal-diff|. |
275 | 274 |
276 Can also be used as a |method|: > | 275 Can also be used as a |method|: > |
277 GetLog()->assert_equalfile('expected.log') | 276 GetLog()->assert_equalfile('expected.log') |
278 | |
279 | 277 |
280 assert_exception({error} [, {msg}]) *assert_exception()* | 278 assert_exception({error} [, {msg}]) *assert_exception()* |
281 When v:exception does not contain the string {error} an error | 279 When v:exception does not contain the string {error} an error |
282 message is added to |v:errors|. Also see |assert-return|. | 280 message is added to |v:errors|. Also see |assert-return|. |
283 This can be used to assert that a command throws an exception. | 281 This can be used to assert that a command throws an exception. |