mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
vim-patch:7.4.1567
Problem: Crash in assert_fails().
Solution: Check for NULL. (Dominique Pelle) Add a test.
1abb502635
This commit is contained in:
@@ -142,4 +142,22 @@ describe('assert function:', function()
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
-- assert_fails({cmd}, [, {error}])
|
||||
describe('assert_fails', function()
|
||||
it('should change v:errors when error does not match v:errmsg', function()
|
||||
execute([[call assert_fails('xxx', {})]])
|
||||
expected_errors({"Expected {} but got 'E731: using Dictionary as a String'"})
|
||||
end)
|
||||
|
||||
it('should not change v:errors when cmd errors', function()
|
||||
call('assert_fails', 'NonexistentCmd')
|
||||
expected_empty()
|
||||
end)
|
||||
|
||||
it('should change v:errors when cmd succeeds', function()
|
||||
call('assert_fails', 'call empty("")')
|
||||
expected_errors({'command did not fail: call empty("")'})
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user