Index: test/abp2blocklist.js |
=================================================================== |
--- a/test/abp2blocklist.js |
+++ b/test/abp2blocklist.js |
@@ -215,16 +215,24 @@ |
{ |
testRules(test, ["1$domain=foo.com"], ["*foo.com"], |
rules => rules[0]["trigger"]["if-domain"]); |
testRules(test, ["2$third-party"], ["third-party"], |
rules => rules[0]["trigger"]["load-type"]); |
testRules(test, ["foo$match_case"], true, |
rules => rules[0]["trigger"]["url-filter-is-case-sensitive"]); |
+ // Test subdomain exceptions. |
+ testRules(test, ["1$domain=foo.com|~bar.foo.com"], |
+ ["foo.com", "www.foo.com"], |
+ rules => rules[0]["trigger"]["if-domain"]); |
+ testRules(test, ["1$domain=foo.com|~www.foo.com"], |
+ ["foo.com"], |
+ rules => rules[0]["trigger"]["if-domain"]); |
+ |
test.done(); |
}, |
testUnicode: function(test) |
{ |
testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], |
rules => rules[0]["trigger"]["if-domain"]); |
testRules(test, ["🐈$domain=🐈.cat"], []); |