diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-09 11:08:54 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-09 11:08:54 +0000 |
commit | 2130677e50a4ccdf104247640d18c8ca1e6e22c8 (patch) | |
tree | 9e18d270b76c363b0e13d1bdc43f9f11cd42a698 /test | |
parent | 533d7bb3646317e7a71894e3d42608270b7fae46 (diff) | |
download | rspamd-2130677e50a4ccdf104247640d18c8ca1e6e22c8.tar.gz rspamd-2130677e50a4ccdf104247640d18c8ca1e6e22c8.zip |
[Test] Fix string formatting
Diffstat (limited to 'test')
-rw-r--r-- | test/lua/rspamd_assertions.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/lua/rspamd_assertions.lua b/test/lua/rspamd_assertions.lua index 8e483431d..d0590fdcd 100644 --- a/test/lua/rspamd_assertions.lua +++ b/test/lua/rspamd_assertions.lua @@ -39,15 +39,17 @@ local function format_line(level, key, v_expect, v_actual) local prefix if v_expect == v_actual then prefix = string.rep(' ', level * 2 + 1) - return string.format("%s[%s] = %s", prefix, tostring(key), tostring(v_expect)) + return logger.slog("%s[%s] = %s", prefix, key, v_expect) else prefix = string.rep(' ', level * 2) local ret = {} if v_expect then - ret[#ret + 1] = string.format("-%s[%s] = %s: %s", prefix, tostring(key), type(v_expect), tostring(v_expect)) + ret[#ret + 1] = logger.slog("-%s[%s] = %s: %s", prefix, key, + type(v_expect), v_expect) end if v_actual then - ret[#ret + 1] = string.format("+%s[%s] = %s: %s", prefix, tostring(key), type(v_actual), tostring(v_actual)) + ret[#ret + 1] = logger.slog("+%s[%s] = %s: %s", prefix, + (key), type(v_actual), (v_actual)) end return table.concat(ret, "\n") end |