From: Vsevolod Stakhov Date: Fri, 18 Sep 2020 14:44:35 +0000 (+0100) Subject: [Test] Add some tests for IDNA dots in urls X-Git-Tag: 2.6~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37f19ff44db4601bea40fef01db776c312e48ea1;p=thirdparty%2Frspamd.git [Test] Add some tests for IDNA dots in urls --- diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua index 9647db79b7..bd5fc062c1 100644 --- a/test/lua/unit/url.lua +++ b/test/lua/unit/url.lua @@ -118,6 +118,21 @@ context("URL check functions", function() {"http:www.twitter.com#test", true, { host = 'www.twitter.com', fragment = 'test' }}, + {"http://example。com#test", true, { + host = 'example.com', fragment = 'test' + }}, + {"http://hoho.example。com#test", true, { + host = 'hoho.example.com', fragment = 'test' + }}, + {"http://hoho。example。com#test", true, { + host = 'hoho.example.com', fragment = 'test' + }}, + {"http://hoho.example。com#test", true, { + host = 'hoho.example.com', fragment = 'test' + }}, + {"http://hehe。example。com#test", true, { + host = 'hehe.example.com', fragment = 'test' + }}, } -- Some cases from https://code.google.com/p/google-url/source/browse/trunk/src/url_canon_unittest.cc