From 988cec595d5220a1ca576962d5c0eb9490f4560a Mon Sep 17 00:00:00 2001 From: Adam Freidin Date: Mon, 11 Aug 2014 10:38:41 -0700 Subject: [PATCH 1/3] fix: /// The second quote of the static attribute was incorrectly matched against the first quote of the path attribute. --- src/services/compiler/precompile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/compiler/precompile.ts b/src/services/compiler/precompile.ts index b806645c7af..3ff23d85bea 100644 --- a/src/services/compiler/precompile.ts +++ b/src/services/compiler/precompile.ts @@ -49,7 +49,7 @@ module TypeScript { return isNoDefaultLibRegex.exec(comment); } - export var tripleSlashReferenceRegExp = /^(\/\/\/\s*/; + export var tripleSlashReferenceRegExp = /^(\/\/\/\s*/; function getFileReferenceFromReferencePath(fileName: string, text: ISimpleText, position: number, comment: string, diagnostics: Diagnostic[]): IFileReference { // First, just see if they've written: /// Date: Mon, 11 Aug 2014 16:34:31 -0700 Subject: [PATCH 2/3] added tests for --- tests/cases/project/referencePathStatic.json | 7 +++++++ tests/cases/projects/reference-path-static/lib.ts | 3 +++ tests/cases/projects/reference-path-static/test.ts | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 tests/cases/project/referencePathStatic.json create mode 100644 tests/cases/projects/reference-path-static/lib.ts create mode 100644 tests/cases/projects/reference-path-static/test.ts diff --git a/tests/cases/project/referencePathStatic.json b/tests/cases/project/referencePathStatic.json new file mode 100644 index 00000000000..b0a7786b835 --- /dev/null +++ b/tests/cases/project/referencePathStatic.json @@ -0,0 +1,7 @@ +{ + "scenario": "Reference-path-static", + "projectRoot": "tests/cases/projects/reference-path-static", + "inputFiles": [ + "test.ts" + ] +} diff --git a/tests/cases/projects/reference-path-static/lib.ts b/tests/cases/projects/reference-path-static/lib.ts new file mode 100644 index 00000000000..8d0f3d9c69d --- /dev/null +++ b/tests/cases/projects/reference-path-static/lib.ts @@ -0,0 +1,3 @@ +module Lib { + export class LibType {} +} diff --git a/tests/cases/projects/reference-path-static/test.ts b/tests/cases/projects/reference-path-static/test.ts new file mode 100644 index 00000000000..ee338c684f0 --- /dev/null +++ b/tests/cases/projects/reference-path-static/test.ts @@ -0,0 +1,3 @@ +/// + +var libType: Lib.LibType; \ No newline at end of file From 785b80ff2713a593bf2d557d4a32584726d7f041 Mon Sep 17 00:00:00 2001 From: Adam Freidin Date: Tue, 12 Aug 2014 13:57:47 -0700 Subject: [PATCH 3/3] baseline update jake runtests jake baseline-accept --- .../amd/referencePathStatic.json | 16 ++++++++++++++++ .../node/referencePathStatic.json | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/baselines/reference/project/referencePathStatic/amd/referencePathStatic.json create mode 100644 tests/baselines/reference/project/referencePathStatic/node/referencePathStatic.json diff --git a/tests/baselines/reference/project/referencePathStatic/amd/referencePathStatic.json b/tests/baselines/reference/project/referencePathStatic/amd/referencePathStatic.json new file mode 100644 index 00000000000..3bdf1f68e6d --- /dev/null +++ b/tests/baselines/reference/project/referencePathStatic/amd/referencePathStatic.json @@ -0,0 +1,16 @@ +{ + "scenario": "Reference-path-static", + "projectRoot": "tests/cases/projects/reference-path-static", + "inputFiles": [ + "test.ts" + ], + "resolvedInputFiles": [ + "test.ts", + "lib.ts", + "lib.d.ts" + ], + "emittedFiles": [ + "lib.js", + "test.js" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/referencePathStatic/node/referencePathStatic.json b/tests/baselines/reference/project/referencePathStatic/node/referencePathStatic.json new file mode 100644 index 00000000000..3bdf1f68e6d --- /dev/null +++ b/tests/baselines/reference/project/referencePathStatic/node/referencePathStatic.json @@ -0,0 +1,16 @@ +{ + "scenario": "Reference-path-static", + "projectRoot": "tests/cases/projects/reference-path-static", + "inputFiles": [ + "test.ts" + ], + "resolvedInputFiles": [ + "test.ts", + "lib.ts", + "lib.d.ts" + ], + "emittedFiles": [ + "lib.js", + "test.js" + ] +} \ No newline at end of file