Guard m98m99 named-program staging

This commit is contained in:
2026-06-13 08:41:48 +08:00
parent 2bb0cf9904
commit 8ff0fe25d4
3 changed files with 76 additions and 30 deletions

View File

@@ -8373,14 +8373,23 @@
);
}
const m98m99NamedProgramNamedPath = await writeInterpRegressionFile(
const m98m99NamedProgramFiles = [
"test-named.ngc",
"test-numbered.ngc",
];
const m98m99NamedProgramDir = await writeInterpRegressionFiles(
interp,
"m98m99/13-named-program",
"test-named.ngc",
m98m99NamedProgramFiles,
);
assertInterpRegressionStaging(
"m98m99/13-named-program",
m98m99NamedProgramFiles,
m98m99NamedProgramDir,
);
verifyExpectedOutput(
"browser_interp_m98m99_13_named_program_named",
interp.runFile(m98m99NamedProgramNamedPath),
interp.runFile(`${m98m99NamedProgramDir}/test-named.ngc`),
[
"file_open=0",
"file_read_count=4",
@@ -8392,14 +8401,9 @@
].join("\n"),
);
const m98m99NamedProgramNumberedPath = await writeInterpRegressionFile(
interp,
"m98m99/13-named-program",
"test-numbered.ngc",
);
verifyExpectedOutput(
"browser_interp_m98m99_13_named_program_numbered",
interp.runFile(m98m99NamedProgramNumberedPath),
interp.runFile(`${m98m99NamedProgramDir}/test-numbered.ngc`),
[
"file_open=0",
"file_read_count=4",
@@ -8416,12 +8420,10 @@
"m98m99/14-o-expression-call",
"test.ngc",
);
const m98m99FinalStagedNgcFiles = [
m98m99NamedProgramNamedPath,
m98m99NamedProgramNumberedPath,
m98m99OExpressionCallPath,
].map((path) => path.replace("/work/browser-interp/m98m99/", ""));
if (m98m99FinalStagedNgcFiles.join(",") !== m98m99RegressionFiles.slice(21, 24).join(",")) {
const m98m99OExpressionCallStagedNgcFiles = [m98m99OExpressionCallPath].map((path) =>
path.replace("/work/browser-interp/m98m99/", ""),
);
if (m98m99OExpressionCallStagedNgcFiles.join(",") !== m98m99RegressionFiles.slice(23, 24).join(",")) {
throw new Error("browser_interp_m98m99_final_staging_manifest: list drift");
}
const m98m99OExpressionCallRun = runWithCapturedPrints(() =>