浏览代码

more test case

v2ray 10 年之前
父节点
当前提交
164465e60d
共有 1 个文件被更改,包括 3 次插入0 次删除
  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))
 	rule := parseRule([]byte(rawJson))
 	dest := v2net.NewTCPDestination(v2net.DomainAddress("baidu.com", 80))
 	dest := v2net.NewTCPDestination(v2net.DomainAddress("baidu.com", 80))
 	assert.Bool(rule.Apply(dest)).IsFalse()
 	assert.Bool(rule.Apply(dest)).IsFalse()
+
+	dest = v2net.NewTCPDestination(v2net.DomainAddress("www.google.com", 80))
+	assert.Bool(rule.Apply(dest)).IsTrue()
 }
 }