1- *eval.txt* For Vim version 7.4. Last change: 2016 Jul 22
1+ *eval.txt* For Vim version 7.4. Last change: 2016 Jul 23
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1947,6 +1947,8 @@ assert_equal({exp}, {act} [, {msg}]) none assert {exp} is equal to {act}
19471947assert_exception({error} [, {msg} ]) none assert {error} is in v:exception
19481948assert_fails({cmd} [, {error} ]) none assert {cmd} fails
19491949assert_false({actual} [, {msg} ]) none assert {actual} is false
1950+ assert_inrange({lower} , {upper} , {actual} [, {msg} ])
1951+ none assert {actual} is inside the range
19501952assert_match({pat} , {text} [, {msg} ]) none assert {pat} matches {text}
19511953assert_notequal({exp} , {act} [, {msg} ]) none assert {exp} is not equal {act}
19521954assert_notmatch({pat} , {text} [, {msg} ]) none assert {pat} not matches {text}
@@ -2478,8 +2480,16 @@ assert_false({actual} [, {msg}]) *assert_false()*
24782480 | v:errors | , like with | assert_equal() | .
24792481 A value is false when it is zero. When {actual} is not a
24802482 number the assert fails.
2481- When {msg} is omitted an error in the form "Expected False but
2482- got {actual} " is produced.
2483+ When {msg} is omitted an error in the form
2484+ "Expected False but got {actual} " is produced.
2485+
2486+ assert_inrange({lower} , {upper} , {actual} [, {msg} ]) *assert_inrange()*
2487+ This asserts number values. When {actual} is lower than
2488+ {lower} or higher than {upper} an error message is added to
2489+ | v:errors | .
2490+ When {msg} is omitted an error in the form
2491+ "Expected range {lower} - {upper} , but got {actual} " is
2492+ produced.
24832493
24842494 *assert_match()*
24852495assert_match({pattern} , {actual} [, {msg} ])
@@ -2494,8 +2504,8 @@ assert_match({pattern}, {actual} [, {msg}])
24942504 Use "^" and "$" to match with the start and end of the text.
24952505 Use both to match the whole text.
24962506
2497- When {msg} is omitted an error in the form "Pattern {pattern}
2498- does not match {actual} " is produced.
2507+ When {msg} is omitted an error in the form
2508+ "Pattern {pattern} does not match {actual} " is produced.
24992509 Example: >
25002510 assert_match('^f.*o$', 'foobar')
25012511< Will result in a string to be added to | v:errors | :
0 commit comments