aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-19 17:58:54 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-05-19 17:58:54 +0200
commite4c2d85c7729925128746d08883286b75fb097a8 (patch)
treef8b0295997e28da4815302b0222abc12d78b4208 /test/helpers.lua
parente628c011bfb58685e4a4ce7da681afda08989a7f (diff)
downloadrneovim-e4c2d85c7729925128746d08883286b75fb097a8.tar.gz
rneovim-e4c2d85c7729925128746d08883286b75fb097a8.tar.bz2
rneovim-e4c2d85c7729925128746d08883286b75fb097a8.zip
lua/shared: share deepcopy() with test/*
deepcopy() was duplicated in test/helpers.lua
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua25
1 files changed, 0 insertions, 25 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index cc5f05bdee..3311f3ef97 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -336,30 +336,6 @@ local function shallowcopy(orig)
return copy
end
-local deepcopy
-
-local function id(v)
- return v
-end
-
-local deepcopy_funcs = {
- table = function(orig)
- local copy = {}
- for k, v in pairs(orig) do
- copy[deepcopy(k)] = deepcopy(v)
- end
- return copy
- end,
- number = id,
- string = id,
- ['nil'] = id,
- boolean = id,
-}
-
-deepcopy = function(orig)
- return deepcopy_funcs[type(orig)](orig)
-end
-
local REMOVE_THIS = {}
local function mergedicts_copy(d1, d2)
@@ -728,7 +704,6 @@ local module = {
check_logs = check_logs,
concat_tables = concat_tables,
dedent = dedent,
- deepcopy = deepcopy,
dictdiff = dictdiff,
eq = eq,
expect_err = expect_err,