2015-10-30 23:17:34 +00:00
|
|
|
|
using NUnit.Framework;
|
2020-04-21 09:12:17 +00:00
|
|
|
|
using Flow.Launcher.Plugin.Url;
|
2014-12-15 16:07:12 +00:00
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Test
|
2014-12-15 16:07:12 +00:00
|
|
|
|
{
|
|
|
|
|
|
[TestFixture]
|
|
|
|
|
|
public class UrlPluginTest
|
|
|
|
|
|
{
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
public void URLMatchTest()
|
|
|
|
|
|
{
|
2016-05-07 16:04:16 +00:00
|
|
|
|
var plugin = new Main();
|
2024-03-26 20:15:59 +00:00
|
|
|
|
Assert.That(plugin.IsURL("http://www.google.com"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("https://www.google.com"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("http://google.com"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("www.google.com"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("google.com"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("http://localhost"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("https://localhost"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("http://localhost:80"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("https://localhost:80"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("http://110.10.10.10"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("110.10.10.10"), Is.True);
|
|
|
|
|
|
Assert.That(plugin.IsURL("ftp://110.10.10.10"), Is.True);
|
2014-12-15 16:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
2024-03-26 20:15:59 +00:00
|
|
|
|
Assert.That(plugin.IsURL("wwww"), Is.False);
|
|
|
|
|
|
Assert.That(plugin.IsURL("wwww.c"), Is.False);
|
|
|
|
|
|
Assert.That(plugin.IsURL("wwww.c"), Is.False);
|
2014-12-15 16:07:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|