commit 9eff57f: [Test] Fix broken unit tests
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Apr 6 11:42:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-04-06 12:39:36 +0100
URL: https://github.com/rspamd/rspamd/commit/9eff57fae0488bad97ea61aa15ed1f0576395b27 (HEAD -> master)
[Test] Fix broken unit tests
---
test/lua/unit/logger.lua | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/lua/unit/logger.lua b/test/lua/unit/logger.lua
index 29ff4c891..fb04bfde3 100644
--- a/test/lua/unit/logger.lua
+++ b/test/lua/unit/logger.lua
@@ -1,19 +1,19 @@
context("Logger unit tests", function()
test("Logger functions", function()
local log = require "rspamd_logger"
-
+
local cases = {
{'string', 'string'},
{'%1', 'string', 'string'},
- {'%1', '1.100000', 1.1},
+ {'%1', '1.1', 1.1},
{'%1', '1', 1},
{'%1', 'true', true},
{'%1', '{[1] = 1, [2] = test}', {1, 'test'}},
{'%1', '{[k1] = 1, [k2] = test}', {k1=1, k2='test'}},
- {'%1', '{[1] = 1, [2] = 2.100000, [k2] = test}', {1, 2.1, k2='test'}},
+ {'%1', '{[1] = 1, [2] = 2.1, [k2] = test}', {1, 2.1, k2='test'}},
{'%s', 'true', true},
}
-
+
for _,c in ipairs(cases) do
local s
if c[3] then
@@ -22,7 +22,7 @@ context("Logger unit tests", function()
s = log.slog(c[1])
end
assert_equal(s, c[2], string.format("'%s' doesn't match with '%s'",
- c[2], s))
+ c[2], s))
end
end)
end)
\ No newline at end of file
More information about the Commits
mailing list