diff --git a/nselib/unittest.lua b/nselib/unittest.lua index 607869218..88f930cb5 100644 --- a/nselib/unittest.lua +++ b/nselib/unittest.lua @@ -348,7 +348,7 @@ end -- distinguishability otherwise. identical = function(a, b) return function(suite) - function identical(val1, val2, path) + local function _identical(val1, val2, path) local table_size = function(tbl) local count = 0 for k in pairs(tbl) do @@ -381,7 +381,7 @@ identical = function(a, b) for k,v in pairs(val1) do -- Check that the key's value is identical in both tables, passing -- along the path of keys we have taken to get here. - local status, note = identical(val1[k], val2[k], string.format('%s["%s"]', path, k)) + local status, note = _identical(val1[k], val2[k], string.format('%s["%s"]', path, k)) if not status then return false, note end @@ -390,7 +390,7 @@ identical = function(a, b) return true end - return identical(a, b, "") + return _identical(a, b, "") end end