diff --git a/app/dns/script_test.go b/app/dns/script_test.go index a3849deb1..64070305f 100644 --- a/app/dns/script_test.go +++ b/app/dns/script_test.go @@ -48,7 +48,7 @@ assert(by_id.primary and by_id.fallback, "primary and fallback DNS servers are r function handleDNSQuery(q) local answer = by_id.primary:query(q) - if not answer.error and us_ips:AnyMatch(answer.ips) then + if not answer.error and us_ips:anyMatch(answer.ips) then return answer end return by_id.fallback:query(q) diff --git a/common/geodata/lua_test.go b/common/geodata/lua_test.go index b1ecf8804..524dbfeb1 100644 --- a/common/geodata/lua_test.go +++ b/common/geodata/lua_test.go @@ -16,12 +16,12 @@ func TestLuaIPMatcherAcceptsNativeIP(t *testing.T) { L.SetGlobal("ip", ip) if err := L.DoString(` local matcher = require("xray.geodata").ipMatcher({"127.0.0.0/8"}) - assert(matcher:Match(ip)) - assert(matcher:AnyMatch({ip})) - assert(matcher:Matches({ip})) - local matched, unmatched = matcher:FilterIPs({ip}) + assert(matcher:match(ip)) + assert(matcher:anyMatch({ip})) + assert(matcher:matches({ip})) + local matched, unmatched = matcher:filterIPs({ip}) assert(#matched == 1 and #unmatched == 0) - assert(matcher:Match(matched[1])) + assert(matcher:match(matched[1])) `); err != nil { t.Fatal(err) } @@ -33,9 +33,9 @@ func TestLuaDomainMatcherUsesNativeMatcher(t *testing.T) { RegisterLua(L) if err := L.DoString(` local matcher = require("xray.geodata").domainMatcher({"example.com"}) - assert(matcher:MatchAny("example.com")) - assert(matcher:MatchAny("www.example.com")) - assert(#(matcher:Match("www.example.com")) == 1) + assert(matcher:matchAny("example.com")) + assert(matcher:matchAny("www.example.com")) + assert(#(matcher:match("www.example.com")) == 1) `); err != nil { t.Fatal(err) }