Guard magic comments staging path

This commit is contained in:
2026-06-13 06:22:52 +08:00
parent 2afe749fe4
commit 986a3f4cc7
3 changed files with 96 additions and 0 deletions

View File

@@ -7511,6 +7511,12 @@
if (magicCommentsRegressionFiles.length !== 1 || new Set(magicCommentsRegressionFiles).size !== magicCommentsRegressionFiles.length) {
throw new Error("browser_interp_magic_comments_fixture_coverage: list drift");
}
const magicCommentsStagedNgcFiles = [
magicCommentsParamFormatPath,
].map((path) => path.replace("/work/browser-interp/magic_comments/", ""));
if (magicCommentsStagedNgcFiles.join(",") !== magicCommentsRegressionFiles.join(",")) {
throw new Error("browser_interp_magic_comments_staging_manifest: list drift");
}
verifyExpectedOutput(
"browser_interp_magic_comments_param_format",
interp.runFile(magicCommentsParamFormatPath),

View File

@@ -2431,6 +2431,13 @@ assert.deepEqual(
interpRegressionNgcFilesRecursive("magic_comments"),
"interp_magic_comments_fixture_coverage: upstream .ngc manifest",
);
assert.deepEqual(
[
magicCommentsParamFormatPath,
],
magicCommentsRegressionFiles.map((file) => `/work/interp/magic_comments/${file}`),
"interp_magic_comments_staging_manifest: staged .ngc manifest",
);
verifyExpectedOutput(
"interp_magic_comments_param_format_wasm",
interp.runFile(magicCommentsParamFormatPath),