aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-03 22:51:45 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-09-06 17:19:07 -0700
commitaf946046b922dc5d5285a70a23d11916d8389a5d (patch)
tree090d68a1dd675b5ad6e99abc829be0daafe2a7d9 /test/functional/helpers.lua
parent638f2b6dee7439de303bea12dec80240617e8034 (diff)
downloadrneovim-af946046b922dc5d5285a70a23d11916d8389a5d.tar.gz
rneovim-af946046b922dc5d5285a70a23d11916d8389a5d.tar.bz2
rneovim-af946046b922dc5d5285a70a23d11916d8389a5d.zip
test: Rename meth_pcall to pcall_err
- Rename `meth_pcall`. - Make `pcall_err` raise an error if the function does not fail. - Add `vim.pesc()` to treat a string as literal where a Lua pattern is expected.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 5ec28dd0c7..d50ecd2e6f 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -687,14 +687,6 @@ function module.skip_fragile(pending_fn, cond)
return false
end
-function module.meth_pcall(...)
- local ret = {pcall(...)}
- if type(ret[2]) == 'string' then
- ret[2] = ret[2]:gsub('^[^:]+:%d+: ', '')
- end
- return ret
-end
-
module.funcs = module.create_callindex(module.call)
module.meths = module.create_callindex(module.nvim)
module.uimeths = module.create_callindex(ui)