Explorar o código

more test case

v2ray %!s(int64=10) %!d(string=hai) anos
pai
achega
164465e60d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app/router/rules/json/fieldrule_test.go

+ 3 - 0
app/router/rules/json/fieldrule_test.go

@@ -119,4 +119,7 @@ func TestDomainNotMatchingDomain(t *testing.T) {
 	rule := parseRule([]byte(rawJson))
 	dest := v2net.NewTCPDestination(v2net.DomainAddress("baidu.com", 80))
 	assert.Bool(rule.Apply(dest)).IsFalse()
+
+	dest = v2net.NewTCPDestination(v2net.DomainAddress("www.google.com", 80))
+	assert.Bool(rule.Apply(dest)).IsTrue()
 }