Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: test/mjsunit/harmony/templates.js

Issue 768203002: Simplify template literal raw string creation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/templates.js
diff --git a/test/mjsunit/harmony/templates.js b/test/mjsunit/harmony/templates.js
index ee37d8241219a2de1aad479cd3648338c5689d3f..eb53dfeb00ba09abb3206c921026f26382938e2d 100644
--- a/test/mjsunit/harmony/templates.js
+++ b/test/mjsunit/harmony/templates.js
@@ -428,3 +428,15 @@ var obj = {
function tag(){}
tag`a${1}b`;
})();
+
+
+(function testRawLineNormalization() {
+ function raw0(callSiteObj) {
+ return callSiteObj.raw[0];
+ }
+ assertEquals(eval("raw0`\r`"), "\n");
+ assertEquals(eval("raw0`\r\n`"), "\n");
+ assertEquals(eval("raw0`\r\r\n`"), "\n\n");
+ assertEquals(eval("raw0`\r\n\r\n`"), "\n\n");
+ assertEquals(eval("raw0`\r\r\r\n`"), "\n\n\n");
+})();
« src/parser.cc ('K') | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698