Index: test/abp2blocklist.js |
=================================================================== |
--- a/test/abp2blocklist.js |
+++ b/test/abp2blocklist.js |
@@ -271,14 +271,20 @@ |
test.done(); |
}, |
testUnicode: function(test) |
{ |
testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], |
rules => rules[0]["trigger"]["if-domain"]); |
- testRules(test, ["🐈$domain=🐈.cat"], []); |
+ testRules(test, ["||🐈"], "^https?://([^/]+\\.)?xn--zn8h", |
+ rules => rules[0]["trigger"]["url-filter"]); |
+ testRules(test, ["🐈$domain=🐈.cat"], "^https?://.*%F0%9F%90%88", |
+ rules => rules[0]["trigger"]["url-filter"]); |
+ testRules(test, ["🐈%F0%9F%90%88$domain=🐈.cat"], |
+ "^https?://.*%F0%9F%90%88%F0%9F%90%88", |
+ rules => rules[0]["trigger"]["url-filter"]); |
testRules(test, ["###🐈"], []); |
test.done(); |
} |
}; |