Fix getDefaultLibraryFile + turn off lib
1. getDefaultLibraryFile should use ts to normalise the file and find the filename. 2. lib should be turned off at the same time that noLib is turned on to avoid a pointless error.
This commit is contained in:
parent
ad18bde92b
commit
4e4f7507d0
|
@ -2146,8 +2146,8 @@ namespace Harness {
|
|||
return filePath.indexOf(Harness.libFolder) === 0;
|
||||
}
|
||||
|
||||
export function getDefaultLibraryFile(libPath: string, io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + libPath.slice(io.directoryName(libPath).length + 1);
|
||||
export function getDefaultLibraryFile(filePath: string, io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + ts.getBaseFileName(ts.normalizeSlashes(filePath));
|
||||
return { unitName: libFile, content: io.readFile(libFile) };
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@ namespace RWC {
|
|||
}
|
||||
|
||||
// do not use lib since we already read it in above
|
||||
opts.options.lib = undefined;
|
||||
opts.options.noLib = true;
|
||||
|
||||
// Emit the results
|
||||
|
|
Loading…
Reference in a new issue