vim-patch:7.4.2095

Problem:    Man test fails when run with the GUI.
Solution:   Adjust for different behavior of GUI.  Add assert_inrange().

61c04493b0

Only changes related to assert_inrange() were included, since we have a
distinct man plugin.
This commit is contained in:
James McCoy
2017-02-27 21:02:57 -05:00
parent f3d8bc8b61
commit adc6e636fe
6 changed files with 67 additions and 5 deletions

View File

@@ -235,6 +235,26 @@ describe('assert function:', function()
end)
end)
-- assert_inrange({lower}, {upper}, {actual}[, {msg}])
describe('assert_inrange()', function()
it('should not change v:errors when actual is in range', function()
call('assert_inrange', 7, 7, 7)
call('assert_inrange', 5, 7, 5)
call('assert_inrange', 5, 7, 6)
call('assert_inrange', 5, 7, 7)
expected_empty()
end)
it('should change v:errors when actual is not in range', function()
call('assert_inrange', 5, 7, 4)
call('assert_inrange', 5, 7, 8)
expected_errors({
"Expected range 5 - 7, but got 4",
"Expected range 5 - 7, but got 8",
})
end)
end)
-- assert_exception({cmd}, [, {error}])
describe('assert_exception()', function()
it('should assert thrown exceptions properly', function()