Compiler flag to specify line ending #1693 unit test adjustments

This commit is contained in:
kmashint 2015-05-02 18:20:59 -04:00
parent 86bd1fc894
commit be3e3e7646
2 changed files with 6 additions and 4 deletions

View File

@ -1052,17 +1052,19 @@ module Harness {
case 'newline':
if (setting.value.toLowerCase() === 'crlf') {
options.newLine = ts.NewLineKind.CarriageReturnLineFeed;
newLine = setting.value;
}
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;
case 'normalizenewline':
newLine = setting.value;
break;
case 'comments':
options.removeComments = setting.value === 'false';
break;
@ -1504,7 +1506,7 @@ module Harness {
// List of allowed metadata names
var fileMetadataNames = ["filename", "comments", "declaration", "module",
"nolib", "sourcemap", "target", "out", "outdir", "noemithelpers", "noemitonerror",
"noimplicitany", "noresolve", "newline", "newlines", "emitbom",
"noimplicitany", "noresolve", "newline", "normalizenewline", "emitbom",
"errortruncation", "usecasesensitivefilenames", "preserveconstenums",
"includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal",
"separatecompilation", "inlinesourcemap", "maproot", "sourceroot",

View File

@ -1,4 +1,4 @@
// @newline: LF
// @normalizenewline: \n
// @sourcemap: true
// DEFAULT INTERFACES
interface IFoo {