mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Move RWC runner to use Harness.IO
This commit is contained in:
1 parent
1d94653798
commit
af2a49992f
4 files changed
+60
-33
No files matched your search
@@ -237,13 +237,13 @@ namespace ts {
|
||||
}
|
||||
];
|
||||
|
||||
export function parseCommandLine(commandLine: string[]): ParsedCommandLine {
|
||||
export function parseCommandLine(commandLine: string[], readFile?: (fileName: string) => string): ParsedCommandLine {
|
||||
let options: CompilerOptions = {};
|
||||
let fileNames: string[] = [];
|
||||
let errors: Diagnostic[] = [];
|
||||
let shortOptionNames: Map<string> = {};
|
||||
let optionNameMap: Map<CommandLineOption> = {};
|
||||
|
||||
|
||||
forEach(optionDeclarations, option => {
|
||||
optionNameMap[option.name.toLowerCase()] = option;
|
||||
if (option.shortName) {
|
||||
@@ -313,7 +313,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function parseResponseFile(fileName: string) {
|
||||
let text = sys.readFile(fileName);
|
||||
let text = readFile ? readFile(fileName): sys.readFile(fileName);
|
||||
|
||||
if (!text) {
|
||||
errors.push(createCompilerDiagnostic(Diagnostics.File_0_not_found, fileName));
|
||||
|
||||
Reference in new issue
Block a user