mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:8.0.0478
Problem: Tests use assert_true(0) and assert_false(1) to report errors.
Solution: Use assert_report().
37175409d7
This commit is contained in:
@@ -255,6 +255,16 @@ describe('assert function:', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
-- assert_report({msg})
|
||||
describe('assert_report()', function()
|
||||
it('should add a message to v:errors', function()
|
||||
command("call assert_report('something is wrong')")
|
||||
command("call assert_match('something is wrong', v:errors[0])")
|
||||
command('call remove(v:errors, 0)')
|
||||
expected_empty()
|
||||
end)
|
||||
end)
|
||||
|
||||
-- assert_exception({cmd}, [, {error}])
|
||||
describe('assert_exception()', function()
|
||||
it('should assert thrown exceptions properly', function()
|
||||
|
||||
Reference in New Issue
Block a user