@@ -63,12 +63,11 @@ func TestFind(t *testing.T) {
6363
6464func  TestICANN (t  * testing.T ) {
6565	testCases  :=  map [string ]bool {
66- 		"foo.org" :            true ,
67- 		"foo.co.uk" :          true ,
68- 		"foo.dyndns.org" :     false ,
69- 		"foo.go.dyndns.org" :  false ,
70- 		"foo.blogspot.co.uk" : false ,
71- 		"foo.intranet" :       false ,
66+ 		"foo.org" :           true ,
67+ 		"foo.co.uk" :         true ,
68+ 		"foo.dyndns.org" :    false ,
69+ 		"foo.go.dyndns.org" : false ,
70+ 		"foo.intranet" :      false ,
7271	}
7372	for  domain , want  :=  range  testCases  {
7473		_ , got  :=  PublicSuffix (domain )
@@ -111,16 +110,12 @@ var publicSuffixTestCases = []struct {
111110	// net.ar 
112111	// org.ar 
113112	// tur.ar 
114- 	// blogspot.com.ar (in the PRIVATE DOMAIN section). 
115113	{"ar" , "ar" , true },
116114	{"www.ar" , "ar" , true },
117115	{"nic.ar" , "ar" , true },
118116	{"www.nic.ar" , "ar" , true },
119117	{"com.ar" , "com.ar" , true },
120118	{"www.com.ar" , "com.ar" , true },
121- 	{"blogspot.com.ar" , "blogspot.com.ar" , false },                 // PRIVATE DOMAIN. 
122- 	{"www.blogspot.com.ar" , "blogspot.com.ar" , false },             // PRIVATE DOMAIN. 
123- 	{"www.xxx.yyy.zzz.blogspot.com.ar" , "blogspot.com.ar" , false }, // PRIVATE DOMAIN. 
124119	{"logspot.com.ar" , "com.ar" , true },
125120	{"zlogspot.com.ar" , "com.ar" , true },
126121	{"zblogspot.com.ar" , "com.ar" , true },
@@ -170,20 +165,13 @@ var publicSuffixTestCases = []struct {
170165	// game.tw 
171166	// ebiz.tw 
172167	// club.tw 
173- 	// 網路.tw (xn--zf0ao64a.tw) 
174- 	// 組織.tw (xn--uc0atv.tw) 
175- 	// 商業.tw (xn--czrw28b.tw) 
176- 	// blogspot.tw 
168+ 	// 台灣.tw (xn--kpry57d.tw) 
177169	{"tw" , "tw" , true },
178170	{"aaa.tw" , "tw" , true },
179171	{"www.aaa.tw" , "tw" , true },
180172	{"xn--czrw28b.aaa.tw" , "tw" , true },
181173	{"edu.tw" , "edu.tw" , true },
182174	{"www.edu.tw" , "edu.tw" , true },
183- 	{"xn--czrw28b.edu.tw" , "edu.tw" , true },
184- 	{"xn--czrw28b.tw" , "xn--czrw28b.tw" , true },
185- 	{"www.xn--czrw28b.tw" , "xn--czrw28b.tw" , true },
186- 	{"xn--uc0atv.xn--czrw28b.tw" , "xn--czrw28b.tw" , true },
187175	{"xn--kpry57d.tw" , "tw" , true },
188176
189177	// The .uk rules are: 
@@ -199,7 +187,6 @@ var publicSuffixTestCases = []struct {
199187	// plc.uk 
200188	// police.uk 
201189	// *.sch.uk 
202- 	// blogspot.co.uk (in the PRIVATE DOMAIN section). 
203190	{"uk" , "uk" , true },
204191	{"aaa.uk" , "uk" , true },
205192	{"www.aaa.uk" , "uk" , true },
@@ -210,9 +197,6 @@ var publicSuffixTestCases = []struct {
210197	{"www.sch.uk" , "www.sch.uk" , true },
211198	{"co.uk" , "co.uk" , true },
212199	{"www.co.uk" , "co.uk" , true },
213- 	{"blogspot.co.uk" , "blogspot.co.uk" , false }, // PRIVATE DOMAIN. 
214- 	{"blogspot.nic.uk" , "uk" , true },
215- 	{"blogspot.sch.uk" , "blogspot.sch.uk" , true },
216200
217201	// The .рф rules are 
218202	// рф (xn--p1ai) 
@@ -322,10 +306,10 @@ func TestNumICANNRules(t *testing.T) {
322306	// Check the last ICANN and first Private rules. If the underlying public 
323307	// suffix list changes, we may need to update these hard-coded checks. 
324308	if  got , want  :=  rules [numICANNRules - 1 ], "zuerich" ; got  !=  want  {
325- 		t .Errorf ("last ICANN rule: got %q, wawnt  %q" , got , want )
309+ 		t .Errorf ("last ICANN rule: got %q, want  %q" , got , want )
326310	}
327- 	if  got , want  :=  rules [numICANNRules ], "cc.ua " ; got  !=  want  {
328- 		t .Errorf ("first Private rule: got %q, wawnt  %q" , got , want )
311+ 	if  got , want  :=  rules [numICANNRules ], "co.krd " ; got  !=  want  {
312+ 		t .Errorf ("first Private rule: got %q, want  %q" , got , want )
329313	}
330314}
331315
0 commit comments