From 0f36dc9a5582091fed54bb2f790b629d8737141e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 10 Aug 2023 13:32:02 +0100 Subject: [Minor] Treat last dot specially --- test/lua/unit/url.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/lua/unit') diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua index e2daa7771..52b88d25a 100644 --- a/test/lua/unit/url.lua +++ b/test/lua/unit/url.lua @@ -148,6 +148,16 @@ context("URL check functions", function() host = "63.143.41.164", path = "pro/au.html", } }, + { + "http://localhost", true, { + host = "localhost", + tld = "localhost", + } }, + { + "http://localhost.", true, { + host = "localhost.", + tld = "localhost", + } }, } -- Some cases from https://code.google.com/p/google-url/source/browse/trunk/src/url_canon_unittest.cc -- cgit v1.2.3