mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
test, legacy/assert_spec.lua: fix few tests fail
Adjust failing tests to current behavior due to changes in assert_fails behavior by fbd6a86.
This commit is contained in:
@@ -242,9 +242,9 @@ describe('assert function:', function()
|
||||
-- assert_fails({cmd}, [, {error}])
|
||||
describe('assert_fails', function()
|
||||
it('should change v:errors when error does not match v:errmsg', function()
|
||||
eq(1, eval([[assert_fails('xxx', {})]]))
|
||||
command([[call assert_match("Expected {} but got 'E731:", v:errors[0])]])
|
||||
expected_errors({"Expected {} but got 'E731: using Dictionary as a String'"})
|
||||
eq(1, eval([[assert_fails('xxx', 'E12345')]]))
|
||||
command([[call assert_match("Expected 'E12345' but got 'E492:", v:errors[0])]])
|
||||
expected_errors({"Expected 'E12345' but got 'E492: Not an editor command: xxx': xxx"})
|
||||
end)
|
||||
|
||||
it('should not change v:errors when cmd errors', function()
|
||||
@@ -258,9 +258,9 @@ describe('assert function:', function()
|
||||
end)
|
||||
|
||||
it('can specify and get a message about what failed', function()
|
||||
eq(1, eval([[assert_fails('xxx', {}, 'stupid')]]))
|
||||
command([[call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])]])
|
||||
expected_errors({"stupid: Expected {} but got 'E731: using Dictionary as a String'"})
|
||||
eq(1, eval([[assert_fails('xxx', 'E9876', 'stupid')]]))
|
||||
command([[call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0])]])
|
||||
expected_errors({"stupid: Expected 'E9876' but got 'E492: Not an editor command: xxx': stupid"})
|
||||
end)
|
||||
|
||||
it('can specify and get a message even when cmd succeeds', function()
|
||||
|
||||
Reference in New Issue
Block a user