diff options
author | James McCoy <jamessan@jamessan.com> | 2017-06-05 23:41:46 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-06-06 06:15:16 -0400 |
commit | d707b2a1711a02307a02684904b12b74cfb2ea32 (patch) | |
tree | 3dcaee4c2304ab906b498d22bb36aafea6b294ed /test/functional/legacy/assert_spec.lua | |
parent | dafc14b9691dfa9af143c0372f84b9288163c30a (diff) | |
download | rneovim-d707b2a1711a02307a02684904b12b74cfb2ea32.tar.gz rneovim-d707b2a1711a02307a02684904b12b74cfb2ea32.tar.bz2 rneovim-d707b2a1711a02307a02684904b12b74cfb2ea32.zip |
vim-patch:8.0.0478
Problem: Tests use assert_true(0) and assert_false(1) to report errors.
Solution: Use assert_report().
https://github.com/vim/vim/commit/37175409d766ce67f2548dffa6d73451379b5737
Diffstat (limited to 'test/functional/legacy/assert_spec.lua')
-rw-r--r-- | test/functional/legacy/assert_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua index d6255d42e7..2f342ec9a3 100644 --- a/test/functional/legacy/assert_spec.lua +++ b/test/functional/legacy/assert_spec.lua @@ -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() |