1- *testing.txt* For Vim version 9.1. Last change: 2024 Jul 17
1+ *testing.txt* For Vim version 9.1. Last change: 2024 Jul 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -506,8 +506,8 @@ assert_equal({expected}, {actual} [, {msg}])
506506 added to | v:errors | and 1 is returned. Otherwise zero is
507507 returned. | assert-return |
508508 The error is in the form "Expected {expected} but got
509- {actual} ". When {msg} is present it is prefixed to that, along
510- with the location of the assert when run from a script.
509+ {actual} ". When {msg} is present it is prefixed to that,
510+ along with the location of the assert when run from a script.
511511
512512 There is no automatic conversion, the String "4" is different
513513 from the Number 4. And the number 4 is different from the
@@ -562,19 +562,19 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
562562 When {error} is a string it must be found literally in the
563563 first reported error. Most often this will be the error code,
564564 including the colon, e.g. "E123:". >
565- assert_fails('bad cmd', 'E987:')
565+ call assert_fails('bad cmd', 'E987:')
566566<
567567 When {error} is a | List | with one or two strings, these are
568568 used as patterns. The first pattern is matched against the
569569 first reported error: >
570- assert_fails('cmd', ['E987:.*expected bool'])
570+ call assert_fails('cmd', ['E987:.*expected bool'])
571571< The second pattern, if present, is matched against the last
572572 reported error.
573573 If there is only one error then both patterns must match. This
574574 can be used to check that there is only one error.
575575 To only match the last error use an empty string for the first
576576 error: >
577- assert_fails('cmd', ['', 'E987:'])
577+ call assert_fails('cmd', ['', 'E987:'])
578578<
579579 If {msg} is empty then it is not used. Do this to get the
580580 default message when passing the {lnum} argument.
@@ -600,8 +600,8 @@ assert_false({actual} [, {msg}]) *assert_false()*
600600 When {actual} is not false an error message is added to
601601 | v:errors | , like with | assert_equal() | .
602602 The error is in the form "Expected False but got {actual} ".
603- When {msg} is present it is prepended to that, along
604- with the location of the assert when run from a script.
603+ When {msg} is present it is prefixed to that, along with the
604+ location of the assert when run from a script.
605605 Also see | assert-return | .
606606
607607 A value is false when it is zero. When {actual} is not a
@@ -639,9 +639,9 @@ assert_match({pattern}, {actual} [, {msg}])
639639 Use both to match the whole text.
640640
641641 Example: >
642- assert_match('^f.*o$', 'foobar')
642+ call assert_match('^f.*o$', 'foobar')
643643< Will result in a string to be added to | v:errors | :
644- test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~
644+ test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~
645645
646646 Can also be used as a | method | : >
647647 getFile()->assert_match('foo.*')
@@ -696,8 +696,8 @@ assert_true({actual} [, {msg}]) *assert_true()*
696696 Also see | assert-return | .
697697 A value is TRUE when it is a non-zero number. When {actual}
698698 is not a number the assert fails.
699- When {msg} is given it precedes the default message, along
700- with the location of the assert when run from a script.
699+ When {msg} is given it is prefixed to the default message,
700+ along with the location of the assert when run from a script.
701701
702702 Can also be used as a | method | : >
703703 GetResult()->assert_true()
0 commit comments