Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/abp2blocklist.js

Issue 29468575: Issue 5332 - Support Unicode characters in path (Closed) Base URL: https://hg.adblockplus.org/abp2blocklist
Patch Set: Created June 19, 2017, 2:35 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/abp2blocklist.js ('K') | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
};
« lib/abp2blocklist.js ('K') | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld