From 9bbbdec0c222cad9fa132c3339bfbdd3f363eef1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 18:01:21 -0700 Subject: [PATCH] Check for repeating meta-data flag. --- src/harness/fourslash.ts | 4 ++++ tests/cases/fourslash/getEmitOutputSourceMap2.ts | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 8693ef6b2b5..de789680284 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2147,6 +2147,10 @@ module FourSlash { currentFileOptions[match[1]] = match[2]; } } else { + // Check if the match is already existed in the global options + if (opts[match[1]] !== undefined) { + throw new Error("Global Option : '" + match[1] + "' is already existed"); + } opts[match[1]] = match[2]; } } diff --git a/tests/cases/fourslash/getEmitOutputSourceMap2.ts b/tests/cases/fourslash/getEmitOutputSourceMap2.ts index bc29c48eaca..b3977095b82 100644 --- a/tests/cases/fourslash/getEmitOutputSourceMap2.ts +++ b/tests/cases/fourslash/getEmitOutputSourceMap2.ts @@ -17,9 +17,4 @@ //// var k = 10; //// } -var filename = "sample/outDir/sourceMapResult"; -var jsFilename = filename + ".js"; -var sourceMapFilename = filename + ".js.map"; -var outputFilenames = jsFilename + " " + sourceMapFilename; -verify.baselineGetEmitOutput(); -//verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file