2015-01-20 23:07:01 +01:00
|
|
|
/// <reference path="fourslash.ts"/>
|
|
|
|
////var x = `sadasdasdasdasfegsfd
|
|
|
|
/////*1*/rasdesgeryt35t35y35 e4 ergt er 35t 3535 `;
|
2015-01-20 23:44:24 +01:00
|
|
|
////var y = `1${2}/*2*/3`;
|
2015-10-05 00:02:22 +02:00
|
|
|
////
|
|
|
|
/////*formatStart*/
|
|
|
|
////let z= `foo`;/*3*/
|
|
|
|
////let w= `bar${3}`;/*4*/
|
2015-08-27 15:59:10 +02:00
|
|
|
////String.raw
|
2015-10-05 00:02:22 +02:00
|
|
|
//// `template`;/*5*/
|
|
|
|
////String.raw`foo`;/*6*/
|
|
|
|
////String.raw `bar${3}`;/*7*/
|
|
|
|
////`Write ${ JSON.stringify("") } and ${ (765) } and ${ 346 }`;/*spaceInside*/
|
|
|
|
/////*formatEnd*/
|
2015-01-20 23:44:24 +01:00
|
|
|
|
2015-01-20 23:07:01 +01:00
|
|
|
|
|
|
|
goTo.marker("1");
|
2018-01-12 02:43:27 +01:00
|
|
|
edit.insert("\n"); // edit will trigger formatting - should succeeed
|
2015-01-20 23:07:01 +01:00
|
|
|
|
2015-01-20 23:44:24 +01:00
|
|
|
goTo.marker("2");
|
2018-01-12 02:43:27 +01:00
|
|
|
edit.insert("\n");
|
2015-01-20 23:44:24 +01:00
|
|
|
verify.indentationIs(0);
|
2015-08-27 15:59:10 +02:00
|
|
|
verify.currentLineContentIs("3`;")
|
|
|
|
|
2015-10-05 00:02:22 +02:00
|
|
|
format.selection("formatStart", "formatEnd");
|
|
|
|
|
2015-08-27 15:59:10 +02:00
|
|
|
goTo.marker("3");
|
2015-08-28 16:13:15 +02:00
|
|
|
verify.currentLineContentIs("let z = `foo`;");
|
2015-08-27 15:59:10 +02:00
|
|
|
goTo.marker("4");
|
2015-08-28 16:13:15 +02:00
|
|
|
verify.currentLineContentIs("let w = `bar${3}`;");
|
2015-08-27 15:59:10 +02:00
|
|
|
|
|
|
|
goTo.marker("5");
|
2015-08-28 16:12:30 +02:00
|
|
|
verify.currentLineContentIs(" `template`;");
|
|
|
|
goTo.marker("6");
|
2015-12-22 10:30:07 +01:00
|
|
|
verify.currentLineContentIs("String.raw`foo`;");
|
2015-08-28 16:12:30 +02:00
|
|
|
goTo.marker("7");
|
2015-12-22 10:30:07 +01:00
|
|
|
verify.currentLineContentIs("String.raw`bar${3}`;");
|
2015-10-05 00:02:22 +02:00
|
|
|
|
|
|
|
goTo.marker("spaceInside");
|
|
|
|
verify.currentLineContentIs('`Write ${JSON.stringify("")} and ${(765)} and ${346}`;');
|