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 /src/testdir/test_assert.vim | |
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 'src/testdir/test_assert.vim')
-rw-r--r-- | src/testdir/test_assert.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index d7fb6385f..0ab664ad3 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -105,6 +105,19 @@ func Test_assert_fail_fails() call remove(v:errors, 0) endfunc +func Test_assert_inrange() + call assert_inrange(7, 7, 7) + call assert_inrange(5, 7, 5) + call assert_inrange(5, 7, 6) + call assert_inrange(5, 7, 7) + + call assert_inrange(5, 7, 4) + call assert_match("Expected range 5 - 7, but got 4", v:errors[0]) + call remove(v:errors, 0) + call assert_inrange(5, 7, 8) + call assert_match("Expected range 5 - 7, but got 8", v:errors[0]) + call remove(v:errors, 0) +endfunc func Test_user_is_happy() smile |