summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index fa3c756a7..11cd8bbaf 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Jul 22
+*eval.txt* For Vim version 7.4. Last change: 2016 Jul 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1947,6 +1947,8 @@ assert_equal({exp}, {act} [, {msg}]) none assert {exp} is equal to {act}
assert_exception({error} [, {msg}]) none assert {error} is in v:exception
assert_fails({cmd} [, {error}]) none assert {cmd} fails
assert_false({actual} [, {msg}]) none assert {actual} is false
+assert_inrange({lower}, {upper}, {actual} [, {msg}])
+ none assert {actual} is inside the range
assert_match({pat}, {text} [, {msg}]) none assert {pat} matches {text}
assert_notequal({exp}, {act} [, {msg}]) none assert {exp} is not equal {act}
assert_notmatch({pat}, {text} [, {msg}]) none assert {pat} not matches {text}
@@ -2478,8 +2480,16 @@ assert_false({actual} [, {msg}]) *assert_false()*
|v:errors|, like with |assert_equal()|.
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.
+ When {msg} is omitted an error in the form
+ "Expected False but got {actual}" is produced.
+
+assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
+ This asserts number values. When {actual} is lower than
+ {lower} or higher than {upper} an error message is added to
+ |v:errors|.
+ When {msg} is omitted an error in the form
+ "Expected range {lower} - {upper}, but got {actual}" is
+ produced.
*assert_match()*
assert_match({pattern}, {actual} [, {msg}])
@@ -2494,8 +2504,8 @@ 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.
+ 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|: