From: Vsevolod Stakhov Date: Mon, 2 Mar 2015 14:13:46 +0000 (+0000) Subject: Fix url extraction tests. X-Git-Tag: 0.9.0~577 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b80ca7eb2fd2b7236e50d2297e42f779902384c2;p=rspamd.git Fix url extraction tests. --- diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua index afc4db2f2..9f9643009 100644 --- a/test/lua/unit/url.lua +++ b/test/lua/unit/url.lua @@ -48,14 +48,14 @@ context("URL check functions", function() local cases = { {"test.com text", {"test.com", nil}}, {"mailto:A.User@example.com text", {"example.com", "A.User"}}, - {"http://тест.рф:18 text", {"тест.рф", nil}}, - {"http://user:password@тест.рф:18 text", {"тест.рф", "user"}}, + {"http://Тест.Рф:18 text", {"тест.рф", nil}}, + {"http://user:password@тест2.РФ:18 text", {"тест2.рф", "user"}}, } for _,c in ipairs(cases) do local res = ffi.C.rspamd_url_get_next(pool, c[1], nil) - assert_not_nil(res) + assert_not_nil(res, "cannot parse " .. c[1]) assert_equal(c[2][1], ffi.string(res.host, res.hostlen)) if c[2][2] then