test: Eliminate expect_err

Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
This commit is contained in:
Justin M. Keyes
2019-09-06 17:17:37 -07:00
parent af946046b9
commit 7e1c959861
21 changed files with 214 additions and 216 deletions

View File

@ -10,8 +10,8 @@ local wait = helpers.wait
local retry = helpers.retry
local curbufmeths = helpers.curbufmeths
local nvim = helpers.nvim
local expect_err = helpers.expect_err
local feed_data = thelpers.feed_data
local pcall_err = helpers.pcall_err
describe(':terminal scrollback', function()
local screen
@ -455,8 +455,10 @@ describe("'scrollback' option", function()
end)
it('error if set to invalid value', function()
expect_err('E474:', command, 'set scrollback=-2')
expect_err('E474:', command, 'set scrollback=100001')
eq('Vim(set):E474: Invalid argument: scrollback=-2',
pcall_err(command, 'set scrollback=-2'))
eq('Vim(set):E474: Invalid argument: scrollback=100001',
pcall_err(command, 'set scrollback=100001'))
end)
it('defaults to -1 on normal buffers', function()