mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using NUnit.Framework;
|
|
using Flow.Launcher.Plugin.Url;
|
|
|
|
namespace Flow.Launcher.Test
|
|
{
|
|
[TestFixture]
|
|
public class UrlPluginTest
|
|
{
|
|
[Test]
|
|
public void URLMatchTest()
|
|
{
|
|
var plugin = new Main();
|
|
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);
|
|
|
|
|
|
Assert.That(plugin.IsURL("wwww"), Is.False);
|
|
Assert.That(plugin.IsURL("wwww.c"), Is.False);
|
|
Assert.That(plugin.IsURL("wwww.c"), Is.False);
|
|
}
|
|
}
|
|
}
|