diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index d0b1ad552b..a348e75a85 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -256,6 +256,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 @@ -304,6 +312,7 @@ return { check_cores = check_cores, hasenv = hasenv, which = which, + shallowcopy = shallowcopy, concat_tables = concat_tables, dedent = dedent, } |