mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 09:14:24 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user