Supplement test case, www.google.com should match /google.com/

This commit is contained in:
kenshinx 2018-02-01 18:39:40 +08:00
parent 4b1d61a600
commit dc60b4c9a2
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ func Test_Suffix_Tree(t *testing.T) {
So(found, ShouldEqual, true)
So(v, ShouldEqual, "8.8.8.8")
v, found = root.search(strings.Split("www.google.com", "."))
So(found, ShouldEqual, true)
So(v, ShouldEqual, "8.8.8.8")
v, found = root.search(strings.Split("scholar.google.com", "."))
So(found, ShouldEqual, true)
So(v, ShouldEqual, "208.67.222.222")