test for more domains

This commit is contained in:
Charles Ewert 2023-06-26 23:45:01 -04:00
parent ac2c1f5f36
commit a2878cc5fb

View File

@ -34,6 +34,7 @@ namespace tests
@params("false", false) @params("false", false)
@params("invalid", false) @params("invalid", false)
@params("localhost", true) @params("localhost", true)
@params("google.com", false)
@params("127.0.0.1", true) @params("127.0.0.1", true)
@params("127.1.1.1", true) @params("127.1.1.1", true)
@params("127.0.0.127", true) @params("127.0.0.127", true)
@ -41,6 +42,10 @@ namespace tests
@params("126.0.0.1", false) @params("126.0.0.1", false)
@params("0:0:0:0:0:0:0:1", true) @params("0:0:0:0:0:0:0:1", true)
@params("::1", true) @params("::1", true)
@params("::2", false)
@params("2001:4860:4860::8888", false)
@params("2001:4860:4860:0:0:0:0:8888", false)
@params("2001:4860:4860:0000:0000:0000:0000:8888", false)
function _(value, expectedassertResult) function _(value, expectedassertResult)
m.assertEqual(isLocalhost(value), expectedassertResult) m.assertEqual(isLocalhost(value), expectedassertResult)
end function end function