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 e5224349c2..18f47e950b 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -225,6 +225,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 + return { eq = eq, neq = neq, @@ -238,4 +246,5 @@ return { check_cores = check_cores, hasenv = hasenv, which = which, + shallowcopy = shallowcopy, } |