diff options
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index a774a67df3..66724f6a78 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -54,6 +54,9 @@ end local function ok(res) return assert.is_true(res) end +local function near(actual, expected, tolerance) + return assert.is.near(actual, expected, tolerance) +end local function matches(pat, actual) if nil ~= string.match(actual, pat) then return true @@ -694,6 +697,7 @@ local module = { map = map, matches = matches, mergedicts_copy = mergedicts_copy, + near = near, neq = neq, ok = ok, popen_r = popen_r, |