Fix file path resolution in RWC
This commit is contained in:
parent
5556683227
commit
4c7891ce09
2 changed files with 3 additions and 12 deletions
|
@ -152,7 +152,7 @@ class CompilerBaselineRunner extends RunnerBase {
|
||||||
if (this.errors) {
|
if (this.errors) {
|
||||||
Harness.Baseline.runBaseline('Correct errors for ' + fileName, justName.replace(/\.ts$/, '.errors.txt'), (): string => {
|
Harness.Baseline.runBaseline('Correct errors for ' + fileName, justName.replace(/\.ts$/, '.errors.txt'), (): string => {
|
||||||
if (result.errors.length === 0) return null;
|
if (result.errors.length === 0) return null;
|
||||||
|
debugger;
|
||||||
return getErrorBaseline(toBeCompiled, otherFiles, result);
|
return getErrorBaseline(toBeCompiled, otherFiles, result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -835,7 +835,7 @@ module Harness {
|
||||||
// Register input files
|
// Register input files
|
||||||
function register(file: { unitName: string; content: string; }) {
|
function register(file: { unitName: string; content: string; }) {
|
||||||
if (file.content !== undefined) {
|
if (file.content !== undefined) {
|
||||||
var fileName = ts.normalizeSlashes(file.unitName);
|
var fileName = ts.normalizePath(file.unitName);
|
||||||
filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, scriptTarget);
|
filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, scriptTarget);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -844,6 +844,7 @@ module Harness {
|
||||||
return {
|
return {
|
||||||
getCurrentDirectory,
|
getCurrentDirectory,
|
||||||
getSourceFile: (fn, languageVersion) => {
|
getSourceFile: (fn, languageVersion) => {
|
||||||
|
fn = ts.normalizePath(fn);
|
||||||
if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) {
|
if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) {
|
||||||
return filemap[getCanonicalFileName(fn)];
|
return filemap[getCanonicalFileName(fn)];
|
||||||
}
|
}
|
||||||
|
@ -1078,16 +1079,6 @@ module Harness {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var filemap: { [name: string]: ts.SourceFile; } = {};
|
|
||||||
var register = (file: { unitName: string; content: string; }) => {
|
|
||||||
if (file.content !== undefined) {
|
|
||||||
var fileName = ts.normalizeSlashes(file.unitName);
|
|
||||||
filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, options.target, assertInvariants);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
inputFiles.forEach(register);
|
|
||||||
otherFiles.forEach(register);
|
|
||||||
|
|
||||||
var fileOutputs: GeneratedFile[] = [];
|
var fileOutputs: GeneratedFile[] = [];
|
||||||
|
|
||||||
var programFiles = inputFiles.map(file => file.unitName);
|
var programFiles = inputFiles.map(file => file.unitName);
|
||||||
|
|
Loading…
Reference in a new issue