Compiler flag to specify line ending #1693 unit tests

This commit is contained in:
kmashint
2015-05-02 16:18:37 -04:00
parent bcdf5bba64
commit 2e0a55c4d3
11 changed files with 96 additions and 7 deletions

View File

@@ -9,6 +9,9 @@ module ts {
/** The version of the TypeScript compiler release */
export const version = "1.5.0";
const NEWLINE_CRLF = "\r\n";
const NEWLINE_LF = "\n";
export function findConfigFile(searchPath: string): string {
var fileName = "tsconfig.json";
@@ -91,9 +94,9 @@ module ts {
}
}
let newLine =
options.newLine === NewLineKind.CarriageReturnLineFeed ? "\r\n" :
options.newLine === NewLineKind.LineFeed ? "\n" :
let newLine =
options.newLine === NewLineKind.CarriageReturnLineFeed ? NEWLINE_CRLF :
options.newLine === NewLineKind.LineFeed ? NEWLINE_LF :
sys.newLine;
return {