Add xterm test to docker suite (#32149)

This commit is contained in:
Wesley Wigham
2019-06-27 15:29:22 -07:00
committed by GitHub
parent b32afb55d1
commit 2af8ac73ff
4 changed files with 32 additions and 3 deletions

View File

@@ -157,7 +157,7 @@ ${sanitizeDockerfileOutput(result.stderr.toString())}`;
}
function sanitizeDockerfileOutput(result: string): string {
return stripAbsoluteImportPaths(sanitizeTimestamps(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result)))));
return stripAbsoluteImportPaths(sanitizeTimestamps(sanitizeVersionSpecifiers(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result))))));
}
function normalizeNewlines(result: string): string {
@@ -176,10 +176,14 @@ function sanitizeTimestamps(result: string): string {
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
.replace(/\d+(\.\d+)? seconds?/g, "? seconds")
.replace(/\d+(\.\d+)? minutes?/g, "")
.replace(/\d+(\.\d+)?s/g, "?s")
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx");
.replace(/\d+(\.\d+)?s/g, "?s");
}
function sanitizeVersionSpecifiers(result: string): string {
return result
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx")
.replace(/@\d+\.\d+\.\d+/g, "@X.X.X");
}
/**
* Import types and some other error messages use absolute paths in errors as they have no context to be written relative to;