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 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, } |