Add URL path test coverage to UrlPluginTest (#4307)

* Initial plan

* Add test cases for URLs with paths

Co-authored-by: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
This commit is contained in:
Copilot 2026-03-01 13:23:43 +08:00 committed by GitHub
parent ffc9b81d7b
commit f2f14b1397
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,14 @@ namespace Flow.Launcher.Test.Plugins
[TestCase("HTTPS://EXAMPLE.COM")]
[TestCase("EXAMPLE.COM")]
[TestCase("LOCALHOST")]
[TestCase("example.com/path")]
[TestCase("example.com/path/to/resource")]
[TestCase("http://example.com/path")]
[TestCase("https://example.com/path?query=1")]
[TestCase("192.168.1.1/path/to/resource")]
[TestCase("localhost:8080/api/endpoint")]
[TestCase("http://localhost/path")]
[TestCase("[::1]/path")]
public void WhenValidUrlThenIsUrlReturnsTrue(string url)
{
Assert.That(plugin.IsURL(url), Is.True);