aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/scrollback_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-06 17:17:37 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-06 17:19:07 -0700
commit7e1c9598617a140e40a0a22676c0631294617246 (patch)
treee6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/terminal/scrollback_spec.lua
parentaf946046b922dc5d5285a70a23d11916d8389a5d (diff)
downloadrneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.gz
rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.bz2
rneovim-7e1c9598617a140e40a0a22676c0631294617246.zip
test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
Diffstat (limited to 'test/functional/terminal/scrollback_spec.lua')
-rw-r--r--test/functional/terminal/scrollback_spec.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua
index f4441a5396..7413081510 100644
--- a/test/functional/terminal/scrollback_spec.lua
+++ b/test/functional/terminal/scrollback_spec.lua
@@ -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()