Update runtime files

This commit is contained in:
Bram Moolenaar
2023-05-14 18:50:25 +01:00
parent e5d91ba1de
commit b7398fe41c
42 changed files with 2010 additions and 1078 deletions

View File

@ -1,4 +1,4 @@
*testing.txt* For Vim version 9.0. Last change: 2022 Dec 30
*testing.txt* For Vim version 9.0. Last change: 2023 May 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -448,13 +448,14 @@ assert_beeps({cmd}) *assert_beeps()*
assert_equal({expected}, {actual} [, {msg}])
When {expected} and {actual} are not equal an error message is
added to |v:errors| and 1 is returned. Otherwise zero is
returned |assert-return|.
returned. |assert-return|
The error is in the form "Expected {expected} but got
{actual}". When {msg} is present it is prefixed to that.
There is no automatic conversion, the String "4" is different
from the Number 4. And the number 4 is different from the
Float 4.0. The value of 'ignorecase' is not used here, case
always matters.
When {msg} is omitted an error in the form "Expected
{expected} but got {actual}" is produced.
Example: >
assert_equal('foo', 'bar')
< Will result in a string to be added to |v:errors|:
@ -533,11 +534,12 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
assert_false({actual} [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
|v:errors|, like with |assert_equal()|.
The error is in the form "Expected False but got {actual}".
When {msg} is present it is prepended to that.
Also see |assert-return|.
A value is false when it is zero. When {actual} is not a
number the assert fails.
When {msg} is omitted an error in the form
"Expected False but got {actual}" is produced.
Can also be used as a |method|: >
GetResult()->assert_false()
@ -546,14 +548,16 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
This asserts number and |Float| values. When {actual} is lower
than {lower} or higher than {upper} an error message is added
to |v:errors|. Also see |assert-return|.
When {msg} is omitted an error in the form
"Expected range {lower} - {upper}, but got {actual}" is
produced.
The error is in the form "Expected range {lower} - {upper},
but got {actual}". When {msg} is present it is prefixed to
that.
*assert_match()*
assert_match({pattern}, {actual} [, {msg}])
When {pattern} does not match {actual} an error message is
added to |v:errors|. Also see |assert-return|.
The error is in the form "Pattern {pattern} does not match
{actual}". When {msg} is present it is prefixed to that.
{pattern} is used as with |=~|: The matching is always done
like 'magic' was set and 'cpoptions' is empty, no matter what
@ -563,8 +567,6 @@ assert_match({pattern}, {actual} [, {msg}])
Use "^" and "$" to match with the start and end of the text.
Use both to match the whole text.
When {msg} is omitted an error in the form
"Pattern {pattern} does not match {actual}" is produced.
Example: >
assert_match('^f.*o$', 'foobar')
< Will result in a string to be added to |v:errors|:
@ -614,8 +616,7 @@ assert_true({actual} [, {msg}]) *assert_true()*
Also see |assert-return|.
A value is TRUE when it is a non-zero number. When {actual}
is not a number the assert fails.
When {msg} is omitted an error in the form "Expected True but
got {actual}" is produced.
When {msg} is given it precedes the default message.
Can also be used as a |method|: >
GetResult()->assert_true()