Skip to content

Commit ad18bde

Browse files
committed
RWC:Handle lib entries in tsconfig
1 parent 62eeb72 commit ad18bde

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/harness/harness.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,8 +2146,8 @@ namespace Harness {
21462146
return filePath.indexOf(Harness.libFolder) === 0;
21472147
}
21482148

2149-
export function getDefaultLibraryFile(io: Harness.Io): Harness.Compiler.TestFile {
2150-
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + Harness.Compiler.defaultLibFileName;
2149+
export function getDefaultLibraryFile(libPath: string, io: Harness.Io): Harness.Compiler.TestFile {
2150+
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + libPath.slice(io.directoryName(libPath).length + 1);
21512151
return { unitName: libFile, content: io.readFile(libFile) };
21522152
}
21532153

src/harness/rwcRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace RWC {
131131
}
132132
else {
133133
// set the flag to put default library to the beginning of the list
134-
inputFiles.unshift(Harness.getDefaultLibraryFile(oldIO));
134+
inputFiles.unshift(Harness.getDefaultLibraryFile(fileRead.path, oldIO));
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)