mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Compiler flag to specify line ending #1693 unit test adjustments
This commit is contained in:
parent
86bd1fc894
commit
be3e3e7646
@ -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",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// @newline: LF
|
||||
// @normalizenewline: \n
|
||||
// @sourcemap: true
|
||||
// DEFAULT INTERFACES
|
||||
interface IFoo {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user