From: Vsevolod Stakhov Date: Sat, 6 Apr 2019 11:39:36 +0000 (+0100) Subject: [Test] Fix broken unit tests X-Git-Tag: 1.9.2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eff57fae0488bad97ea61aa15ed1f0576395b27;p=thirdparty%2Frspamd.git [Test] Fix broken unit tests --- diff --git a/test/lua/unit/logger.lua b/test/lua/unit/logger.lua index 29ff4c891c..fb04bfde33 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