aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-18 16:00:06 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-05-18 21:07:30 +0200
commit9d7aaf7149a5543b1ddfc89fb506a1019bec3ffb (patch)
tree7e2183f0b19b705484b1ec5edb9d9230cb0465a7 /test/functional/helpers.lua
parentfd04877eb087b64d744a20db643f3abd630c70aa (diff)
downloadrneovim-9d7aaf7149a5543b1ddfc89fb506a1019bec3ffb.tar.gz
rneovim-9d7aaf7149a5543b1ddfc89fb506a1019bec3ffb.tar.bz2
rneovim-9d7aaf7149a5543b1ddfc89fb506a1019bec3ffb.zip
lua/shared: move table util funcs to vim.shared
Use `tbl_` prefix for all table-util functions. Specify in the function docstring if it expects a list-like or map-like table.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index d0dd634c8c..35084f6cff 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -15,7 +15,7 @@ local dedent = global_helpers.dedent
local eq = global_helpers.eq
local ok = global_helpers.ok
local sleep = global_helpers.sleep
-local table_contains = global_helpers.table_contains
+local tbl_contains = global_helpers.tbl_contains
local write_file = global_helpers.write_file
local start_dir = lfs.currentdir()
@@ -165,7 +165,7 @@ local function expect_msg_seq(...)
error(cat_err(final_error,
string.format('got %d messages (ignored %d), expected %d',
#actual_seq, nr_ignored, #expected_seq)))
- elseif table_contains(ignore, msg_type) then
+ elseif tbl_contains(ignore, msg_type) then
nr_ignored = nr_ignored + 1
else
table.insert(actual_seq, msg)
@@ -339,9 +339,9 @@ local function remove_args(args, args_rm)
end
local last = ''
for _, arg in ipairs(args) do
- if table_contains(skip_following, last) then
+ if tbl_contains(skip_following, last) then
last = ''
- elseif table_contains(args_rm, arg) then
+ elseif tbl_contains(args_rm, arg) then
last = arg
else
table.insert(new_args, arg)