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:
James McCoy
2017-06-05 23:41:46 -04:00
parent dafc14b969
commit d707b2a171
6 changed files with 15 additions and 11 deletions

View File

@@ -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()