Compiler flag to specify line ending #1693 unit test adjustments

This commit is contained in:
kmashint 2015-05-02 17:48:14 -04:00
parent 2e0a55c4d3
commit 47c4c125fe
2 changed files with 8 additions and 12 deletions

View File

@ -826,7 +826,7 @@ module Harness {
useCaseSensitiveFileNames: boolean,
// the currentDirectory is needed for rwcRunner to passed in specified current directory to compiler host
currentDirectory?: string,
newLineKind?: ts.NewLineKind): ts.CompilerHost {
newLineKind?: ts.NewLineKind): ts.CompilerHost {
// Local get canonical file name function, that depends on passed in parameter for useCaseSensitiveFileNames
function getCanonicalFileName(fileName: string): string {
@ -1050,15 +1050,15 @@ module Harness {
break;
case 'newline':
case 'newlines':
if (setting.value.toLowerCase() === 'crlf') {
options.newLine = ts.NewLineKind.CarriageReturnLineFeed;
} else if (setting.value.toLowerCase() === 'lf') {
options.newLine = ts.NewLineKind.LineFeed;
} else if (setting.value === '\\n') {
// Handle old usage, e.g. contextualTyping.ts:// @newline: \n
newLine = setting.value;
} else {
}
else if (setting.value.toLowerCase() === 'lf') {
options.newLine = ts.NewLineKind.LineFeed;
newLine = setting.value;
}
else {
throw new Error('Unknown option for newLine: ' + setting.value);
}
break;
@ -1762,4 +1762,4 @@ module Harness {
}
// TODO: not sure why Utils.evalFile isn't working with this, eventually will concat it like old compiler instead of eval
eval(Harness.tcServicesFile);
eval(Harness.tcServicesFile);

View File

@ -1,4 +0,0 @@
// @newline: CR
var x=1;
x=2;