aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-05-09 00:39:17 +0200
committerGitHub <noreply@github.com>2017-05-09 00:39:17 +0200
commit0e873a30f3072dbacfb700f1e331a8c8396f2e1f (patch)
tree557792d454fef510a90975bed4e7d1650ee26c4f /test/helpers.lua
parenta9981e0e7e9439340bb8c0162f860b78d8002559 (diff)
parent5b6d598ca8301682d931539ecd6da6a9fabae569 (diff)
downloadrneovim-0e873a30f3072dbacfb700f1e331a8c8396f2e1f.tar.gz
rneovim-0e873a30f3072dbacfb700f1e331a8c8396f2e1f.tar.bz2
rneovim-0e873a30f3072dbacfb700f1e331a8c8396f2e1f.zip
Merge #4411 from ZyX-I/luaviml'/lua
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index d60d5ba242..7a0e4b8c3c 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -263,6 +263,14 @@ local function which(exe)
end
end
+local function shallowcopy(orig)
+ local copy = {}
+ for orig_key, orig_value in pairs(orig) do
+ copy[orig_key] = orig_value
+ end
+ return copy
+end
+
local function concat_tables(...)
local ret = {}
for i = 1, select('#', ...) do
@@ -311,6 +319,7 @@ return {
check_cores = check_cores,
hasenv = hasenv,
which = which,
+ shallowcopy = shallowcopy,
concat_tables = concat_tables,
dedent = dedent,
}