diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-23 15:35:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-23 15:35:35 +0200 |
commit | 61c04493b00f85d0b97436260a9ef9ab82143b78 (patch) | |
tree | 63112a3a41bb8d731093b0f6ba217e0da1d13359 /runtime | |
parent | 4658228262f491fcb582d531d4e8e5754b0d5e83 (diff) | |
download | vim-git-61c04493b00f85d0b97436260a9ef9ab82143b78.tar.gz |
patch 7.4.2095v7.4.2095
Problem: Man test fails when run with the GUI.
Solution: Adjust for different behavior of GUI. Add assert_inrange().
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 20 |
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|: |