commit 43fda17: [CritFix] Fix test assertion method
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun Sep 13 22:56:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-09-13 23:47:45 +0100
URL: https://github.com/rspamd/rspamd/commit/43fda17dce4ec0abc041201d8dcc4269e887d246
[CritFix] Fix test assertion method
---
test/lua/rspamd_assertions.lua | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/lua/rspamd_assertions.lua b/test/lua/rspamd_assertions.lua
index ac68cfc0a..72e79c4d4 100644
--- a/test/lua/rspamd_assertions.lua
+++ b/test/lua/rspamd_assertions.lua
@@ -18,7 +18,11 @@ local function rspamd_assert_table_equals(tbl)
end
local function rspamd_assert_table_equals_sorted(tbl)
- return util.table_cmp(table.sort(tbl.expect), table.sort(tbl.actual))
+ local expect = util.deepcopy(tbl.expect)
+ local actual = util.deepcopy(tbl.actual)
+ table.sort(expect)
+ table.sort(actual)
+ return util.table_cmp(expect, actual)
end
local function table_keys_sorted(t)
More information about the Commits
mailing list