Guard main-program m98m99 staging paths

This commit is contained in:
2026-06-13 06:39:23 +08:00
parent c398caf8b4
commit 1e72dc150e
3 changed files with 142 additions and 16 deletions

View File

@@ -7969,19 +7969,27 @@
].join("\n"),
);
const m98m99MainProgramOwordFiles = [
"test-illegal-end-main-with-eof.ngc",
"test-illegal-no-m30-before-osub.ngc",
"test-illegal-sub-after-percent.ngc",
"test-legal-end-main-with-m02.ngc",
"test-legal-end-main-with-m2.ngc",
"test-legal-end-main-with-m30.ngc",
"test-legal-end-main-with-percent.ngc",
];
const m98m99MainProgramOwordDir = await writeInterpRegressionFiles(
interp,
"m98m99/11-main-program-oword",
[
"test-legal-end-main-with-m2.ngc",
"test-legal-end-main-with-m02.ngc",
"test-legal-end-main-with-m30.ngc",
"test-legal-end-main-with-percent.ngc",
"test-illegal-end-main-with-eof.ngc",
"test-illegal-no-m30-before-osub.ngc",
"test-illegal-sub-after-percent.ngc",
],
m98m99MainProgramOwordFiles,
);
const m98m99MainProgramStagedNgcFiles = [
m98m99M98P001Path,
...m98m99MainProgramOwordFiles.map((file) => `${m98m99MainProgramOwordDir}/${file}`),
].map((path) => path.replace("/work/browser-interp/m98m99/", ""));
if (m98m99MainProgramStagedNgcFiles.join(",") !== m98m99RegressionFiles.slice(13, 21).join(",")) {
throw new Error("browser_interp_m98m99_main_program_staging_manifest: list drift");
}
for (const mainProgramFixture of [
{
name: "legal_m2",

View File

@@ -2866,17 +2866,28 @@ verifyExpectedOutput(
].join("\n"),
);
const m98m99MainProgramOwordFiles = [
"test-illegal-end-main-with-eof.ngc",
"test-illegal-no-m30-before-osub.ngc",
"test-illegal-sub-after-percent.ngc",
"test-legal-end-main-with-m02.ngc",
"test-legal-end-main-with-m2.ngc",
"test-legal-end-main-with-m30.ngc",
"test-legal-end-main-with-percent.ngc",
];
const m98m99MainProgramOwordDir = writeInterpRegressionFiles(
"m98m99/11-main-program-oword",
m98m99MainProgramOwordFiles,
);
assert.deepEqual(
[
"test-legal-end-main-with-m2.ngc",
"test-legal-end-main-with-m02.ngc",
"test-legal-end-main-with-m30.ngc",
"test-legal-end-main-with-percent.ngc",
"test-illegal-end-main-with-eof.ngc",
"test-illegal-no-m30-before-osub.ngc",
"test-illegal-sub-after-percent.ngc",
m98m99M98P001Path,
...m98m99MainProgramOwordFiles.map((file) => `${m98m99MainProgramOwordDir}/${file}`),
],
m98m99RegressionFiles
.slice(13, 21)
.map((file) => `/work/interp/m98m99/${file}`),
"interp m98m99 main-program staging manifest drift",
);
for (const mainProgramFixture of [
{