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

Side by Side Diff: test/abp2blocklist.js

Issue 29468575: Issue 5332 - Support Unicode characters in path (Closed) Base URL: https://hg.adblockplus.org/abp2blocklist
Patch Set: Add comment about Unicode surrogate pairs Created July 8, 2017, 6 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ["foo.com"], 269 ["foo.com"],
270 rules => rules[0]["trigger"]["if-domain"]); 270 rules => rules[0]["trigger"]["if-domain"]);
271 271
272 test.done(); 272 test.done();
273 }, 273 },
274 274
275 testUnicode: function(test) 275 testUnicode: function(test)
276 { 276 {
277 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"], 277 testRules(test, ["$domain=🐈.cat"], ["*xn--zn8h.cat"],
278 rules => rules[0]["trigger"]["if-domain"]); 278 rules => rules[0]["trigger"]["if-domain"]);
279 testRules(test, ["🐈$domain=🐈.cat"], []); 279 testRules(test, ["||🐈"], "^https?://([^/]+\\.)?xn--zn8h",
280 rules => rules[0]["trigger"]["url-filter"]);
281 testRules(test, ["🐈$domain=🐈.cat"], "^https?://.*%F0%9F%90%88",
282 rules => rules[0]["trigger"]["url-filter"]);
283 testRules(test, ["🐈%F0%9F%90%88$domain=🐈.cat"],
284 "^https?://.*%F0%9F%90%88%F0%9F%90%88",
285 rules => rules[0]["trigger"]["url-filter"]);
280 testRules(test, ["###🐈"], []); 286 testRules(test, ["###🐈"], []);
281 287
282 test.done(); 288 test.done();
283 } 289 }
284 }; 290 };
OLDNEW
« no previous file with comments | « lib/abp2blocklist.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld