Don't normalize whitespace in fourslash tests (#18447)

* Don't normalize whitespace in fourslash tests

* Only render whitespace when the diff is text-only
This commit is contained in:
Andy
2017-09-14 08:23:50 -07:00
committed by GitHub
parent cf53743bd6
commit d96dfeb708
16 changed files with 82 additions and 83 deletions

View File

@@ -17,5 +17,4 @@ verify.currentFileContentIs(`class C {
()=>{ this.foo === 10 };
}
}
C.foo = undefined;
`);
C.foo = undefined;` + "\r\n"); // TODO: GH#18445

View File

@@ -13,5 +13,4 @@ verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
verify.currentFileContentIs(`class C {
static p = ()=>{ this.foo === 10 };
}
C.foo = undefined;
`);
C.foo = undefined;` + "\r\n"); // TODO: GH#18445

View File

@@ -9,7 +9,8 @@
//// super();
//// |]}
////}
// TODO: GH#18445
verify.rangeAfterCodeFix(`
super();
super();\r
this.a = 12;
`, /*includeWhiteSpace*/ true);
`, /*includeWhiteSpace*/ true);

View File

@@ -6,6 +6,7 @@
//// constructor() {[|
//// |]}
////}
// TODO: GH#18445
verify.rangeAfterCodeFix(`
super();
super();\r
`, /*includeWhitespace*/ true);

View File

@@ -19,7 +19,7 @@ edit.applyRefactor({
`function foo() {
var i = 10;
var __return: any;
({ __return, i } = n/*RENAME*/ewFunction(i));
({ __return, i } = /*RENAME*/newFunction(i));
return __return;
}
function newFunction(i) {

View File

@@ -11,12 +11,12 @@
////}
format.document();
verify.currentFileContentIs("class C {\r\n\
<<<<<<< HEAD\r\n\
v = 1;\r\n\
||||||| merged common ancestors\r\n\
v = 3;\r\n\
=======\r\n\
v = 2;\r\n\
>>>>>>> Branch - a\r\n\
}");
verify.currentFileContentIs(`class C {
<<<<<<< HEAD
v = 1;
||||||| merged common ancestors
v = 3;
=======
v = 2;
>>>>>>> Branch - a
}`);

View File

@@ -9,10 +9,10 @@
////}
format.document();
verify.currentFileContentIs("class C {\r\n\
<<<<<<< HEAD\r\n\
v = 1;\r\n\
=======\r\n\
v = 2;\r\n\
>>>>>>> Branch - a\r\n\
}");
verify.currentFileContentIs(`class C {
<<<<<<< HEAD
v = 1;
=======
v = 2;
>>>>>>> Branch - a
}`);

View File

@@ -10,7 +10,8 @@
////x;|]
goTo.file("/b.ts");
verify.rangeAfterCodeFix(`import { x } from "./a";
// TODO:GH#18445
verify.rangeAfterCodeFix(`import { x } from "./a";\r
\r
export { x } from "./a";
x;`, /*includeWhiteSpace*/ true);