fix tests

This commit is contained in:
bao-qian 2016-05-07 17:04:16 +01:00
parent 3646a7d12d
commit 11ecf20f89

View file

@ -9,24 +9,24 @@ namespace Wox.Test
[Test]
public void URLMatchTest()
{
UrlPlugin urlPlugin = new UrlPlugin();
Assert.IsTrue(urlPlugin.IsURL("http://www.google.com"));
Assert.IsTrue(urlPlugin.IsURL("https://www.google.com"));
Assert.IsTrue(urlPlugin.IsURL("http://google.com"));
Assert.IsTrue(urlPlugin.IsURL("www.google.com"));
Assert.IsTrue(urlPlugin.IsURL("google.com"));
Assert.IsTrue(urlPlugin.IsURL("http://localhost"));
Assert.IsTrue(urlPlugin.IsURL("https://localhost"));
Assert.IsTrue(urlPlugin.IsURL("http://localhost:80"));
Assert.IsTrue(urlPlugin.IsURL("https://localhost:80"));
Assert.IsTrue(urlPlugin.IsURL("http://110.10.10.10"));
Assert.IsTrue(urlPlugin.IsURL("110.10.10.10"));
Assert.IsTrue(urlPlugin.IsURL("ftp://110.10.10.10"));
var plugin = new Main();
Assert.IsTrue(plugin.IsURL("http://www.google.com"));
Assert.IsTrue(plugin.IsURL("https://www.google.com"));
Assert.IsTrue(plugin.IsURL("http://google.com"));
Assert.IsTrue(plugin.IsURL("www.google.com"));
Assert.IsTrue(plugin.IsURL("google.com"));
Assert.IsTrue(plugin.IsURL("http://localhost"));
Assert.IsTrue(plugin.IsURL("https://localhost"));
Assert.IsTrue(plugin.IsURL("http://localhost:80"));
Assert.IsTrue(plugin.IsURL("https://localhost:80"));
Assert.IsTrue(plugin.IsURL("http://110.10.10.10"));
Assert.IsTrue(plugin.IsURL("110.10.10.10"));
Assert.IsTrue(plugin.IsURL("ftp://110.10.10.10"));
Assert.IsFalse(urlPlugin.IsURL("wwww"));
Assert.IsFalse(urlPlugin.IsURL("wwww.c"));
Assert.IsFalse(urlPlugin.IsURL("wwww.c"));
Assert.IsFalse(plugin.IsURL("wwww"));
Assert.IsFalse(plugin.IsURL("wwww.c"));
Assert.IsFalse(plugin.IsURL("wwww.c"));
}
}
}