Guard magic comments staging path

This commit is contained in:
2026-06-13 12:37:07 +08:00
parent 45ac3cb8b2
commit 5b7f3fba8a
3 changed files with 54 additions and 11 deletions

View File

@@ -7696,12 +7696,11 @@
if (magicCommentsRegressionFiles.length !== 1 || new Set(magicCommentsRegressionFiles).size !== magicCommentsRegressionFiles.length) {
throw new Error("browser_interp_magic_comments_fixture_coverage: list drift");
}
const magicCommentsStagedNgcFiles = [
assertInterpRegressionFileStaging(
"magic_comments/param_format_printing",
"test.ngc",
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),