domain_filter_test.go: amend exclusion test data

so all relevant tests get run in TestDomainFilterMatch
This commit is contained in:
Eugene Venter 2021-05-26 11:52:50 +12:00
parent 98171abe96
commit bd83a472e8

View File

@ -40,121 +40,121 @@ type regexDomainFilterTest struct {
var domainFilterTests = []domainFilterTest{ var domainFilterTests = []domainFilterTest{
{ {
[]string{"google.com.", "exaring.de", "inovex.de"}, []string{"google.com.", "exaring.de", "inovex.de"},
[]string{""}, []string{},
[]string{"google.com", "exaring.de", "inovex.de"}, []string{"google.com", "exaring.de", "inovex.de"},
true, true,
}, },
{ {
[]string{"google.com.", "exaring.de", "inovex.de"}, []string{"google.com.", "exaring.de", "inovex.de"},
[]string{""}, []string{},
[]string{"google.com", "exaring.de", "inovex.de"}, []string{"google.com", "exaring.de", "inovex.de"},
true, true,
}, },
{ {
[]string{"google.com.", "exaring.de.", "inovex.de"}, []string{"google.com.", "exaring.de.", "inovex.de"},
[]string{""}, []string{},
[]string{"google.com", "exaring.de", "inovex.de"}, []string{"google.com", "exaring.de", "inovex.de"},
true, true,
}, },
{ {
[]string{"foo.org. "}, []string{"foo.org. "},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
true, true,
}, },
{ {
[]string{" foo.org"}, []string{" foo.org"},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
true, true,
}, },
{ {
[]string{"foo.org."}, []string{"foo.org."},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
true, true,
}, },
{ {
[]string{"foo.org."}, []string{"foo.org."},
[]string{""}, []string{},
[]string{"baz.org"}, []string{"baz.org"},
false, false,
}, },
{ {
[]string{"baz.foo.org."}, []string{"baz.foo.org."},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
false, false,
}, },
{ {
[]string{"", "foo.org."}, []string{"", "foo.org."},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
true, true,
}, },
{ {
[]string{"", "foo.org."}, []string{"", "foo.org."},
[]string{""}, []string{},
[]string{}, []string{},
true, true,
}, },
{ {
[]string{""}, []string{""},
[]string{""}, []string{},
[]string{"foo.org"}, []string{"foo.org"},
true, true,
}, },
{ {
[]string{""}, []string{""},
[]string{""}, []string{},
[]string{}, []string{},
true, true,
}, },
{ {
[]string{" "}, []string{" "},
[]string{""}, []string{},
[]string{}, []string{},
true, true,
}, },
{ {
[]string{"bar.sub.example.org"}, []string{"bar.sub.example.org"},
[]string{""}, []string{},
[]string{"foo.bar.sub.example.org"}, []string{"foo.bar.sub.example.org"},
true, true,
}, },
{ {
[]string{"example.org"}, []string{"example.org"},
[]string{""}, []string{},
[]string{"anexample.org", "test.anexample.org"}, []string{"anexample.org", "test.anexample.org"},
false, false,
}, },
{ {
[]string{".example.org"}, []string{".example.org"},
[]string{""}, []string{},
[]string{"anexample.org", "test.anexample.org"}, []string{"anexample.org", "test.anexample.org"},
false, false,
}, },
{ {
[]string{".example.org"}, []string{".example.org"},
[]string{""}, []string{},
[]string{"example.org"}, []string{"example.org"},
false, false,
}, },
{ {
[]string{".example.org"}, []string{".example.org"},
[]string{""}, []string{},
[]string{"test.example.org"}, []string{"test.example.org"},
true, true,
}, },
{ {
[]string{"anexample.org"}, []string{"anexample.org"},
[]string{""}, []string{},
[]string{"example.org", "test.example.org"}, []string{"example.org", "test.example.org"},
false, false,
}, },
{ {
[]string{".org"}, []string{".org"},
[]string{""}, []string{},
[]string{"example.org", "test.example.org", "foo.test.example.org"}, []string{"example.org", "test.example.org", "foo.test.example.org"},
true, true,
}, },