Skip to content

Commit

Permalink
filtering/rulelist: imp test
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Jul 13, 2023
1 parent 871a41a commit 1874860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/filtering/rulelist/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestParser_Parse(t *testing.T) {
wantRulesNum: 1,
wantWritten: len(testRuleTextBlocked),
}, {
name: "zwnj",
name: "cosmetic_with_zwnj",
in: testRuleTextCosmetic,
wantDst: testRuleTextCosmetic,
wantErrMsg: "",
Expand Down
6 changes: 5 additions & 1 deletion internal/filtering/rulelist/rulelist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const testTimeout = 1 * time.Second
const (
testRuleTextBadTab = "||bad-tab-and-comment.example^\t# A comment.\n"
testRuleTextBlocked = "||blocked.example^\n"
testRuleTextCosmetic = "||cosmetic.example## :has-text(/<200c>/i)\n"
testRuleTextEtcHostsTab = "0.0.0.0 tab..example^\t# A comment.\n"
testRuleTextHTML = "<!DOCTYPE html>\n"

// testRuleTextCosmetic is a cosmetic rule with a zero-width non-joiner.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/6003.
testRuleTextCosmetic = "||cosmetic.example## :has-text(/\u200c/i)\n"
)

0 comments on commit 1874860

Please sign in to comment.