aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/buf_functions_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/eval/buf_functions_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/eval/buf_functions_spec.lua')
-rw-r--r--test/functional/eval/buf_functions_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/eval/buf_functions_spec.lua b/test/functional/eval/buf_functions_spec.lua
index 380ccfb5d5..37f4c89bfd 100644
--- a/test/functional/eval/buf_functions_spec.lua
+++ b/test/functional/eval/buf_functions_spec.lua
@@ -15,7 +15,7 @@ local curwinmeths = helpers.curwinmeths
local curtabmeths = helpers.curtabmeths
local get_pathsep = helpers.get_pathsep
local rmdir = helpers.rmdir
-local expect_err = helpers.expect_err
+local pcall_err = helpers.pcall_err
local fname = 'Xtest-functional-eval-buf_functions'
local fname2 = fname .. '.2'
@@ -297,8 +297,8 @@ describe('setbufvar() function', function()
eq('Vim(call):E461: Illegal variable name: b:',
exc_exec('call setbufvar(1, "", 0)'))
eq(true, bufmeths.get_var(buf1, 'number'))
- expect_err('Vim:E46: Cannot change read%-only variable "b:changedtick"',
- funcs.setbufvar, 1, 'changedtick', true)
+ eq('Vim:E46: Cannot change read-only variable "b:changedtick"',
+ pcall_err(funcs.setbufvar, 1, 'changedtick', true))
eq(2, funcs.getbufvar(1, 'changedtick'))
end)
end)