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),