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

Unified Diff: test/snippets.js

Issue 29852568: Issue 6811 - Parse blank arguments to snippets correctly (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 10, 2018, 3:25 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
« no previous file with comments | « lib/snippets.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/snippets.js
===================================================================
--- a/test/snippets.js
+++ b/test/snippets.js
@@ -176,16 +176,22 @@
"quotes, and semicolons",
"fo\\'\\ \\ \\\t\\\n\\;o 1 2 3; 'b a r' 1 2",
[["fo' \t\n;o", "1", "2", "3"], ["b a r", "1", "2"]]);
checkParsedScript("Script containing Unicode composite characters",
"f\ud83d\ude42\ud83d\ude42 b\ud83d\ude02r",
[["f\ud83d\ude42\ud83d\ude42", "b\ud83d\ude02r"]]);
checkParsedScript("Script with no-op commands", "foo; ;;; ; ; bar 1",
[["foo"], ["bar", "1"]]);
+ checkParsedScript("Script with blank argument in the middle", "foo '' Hello",
+ [["foo", "", "Hello"]]);
+ checkParsedScript("Script with blank argument at the end", "foo Hello ''",
+ [["foo", "Hello", ""]]);
+ checkParsedScript("Script with consecutive blank arguments", "foo '' ''",
+ [["foo", "", ""]]);
test.done();
};
exports.testScriptCompilation = function(test)
{
let libraries = [
`
« no previous file with comments | « lib/snippets.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld