Skip to content

Commit

Permalink
Compiler flag to specify line ending #1693 unit test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmashint committed May 2, 2015
1 parent da870ef commit a6b7c6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/harness/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,17 +1038,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;
Expand Down Expand Up @@ -1482,7 +1484,7 @@ module Harness {
// List of allowed metadata names
var fileMetadataNames = ["filename", "comments", "declaration", "module",
"nolib", "sourcemap", "target", "out", "outdir", "noemitonerror",
"noimplicitany", "noresolve", "newline", "newlines", "emitbom",
"noimplicitany", "noresolve", "newline", "normalizenewline", "emitbom",
"errortruncation", "usecasesensitivefilenames", "preserveconstenums",
"includebuiltfile", "suppressimplicitanyindexerrors", "stripinternal",
"separatecompilation"];
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/compiler/contextualTyping.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @newline: LF
// @normalizenewline: \n
// @sourcemap: true
// DEFAULT INTERFACES
interface IFoo {
Expand Down

0 comments on commit a6b7c6d

Please sign in to comment.