Guard INI subroutine staging manifests
This commit is contained in:
@@ -7239,6 +7239,22 @@
|
||||
);
|
||||
|
||||
const subCallFromSubPlan = await stageInterpIniContext(interp, "sub-call-from-sub");
|
||||
const subCallFromSubNgcFiles = [
|
||||
"subs/caller.ngc",
|
||||
"subs/helper.ngc",
|
||||
"test.ngc",
|
||||
];
|
||||
if (subCallFromSubNgcFiles.length !== 3 || new Set(subCallFromSubNgcFiles).size !== subCallFromSubNgcFiles.length) {
|
||||
throw new Error("browser_interp_sub_call_from_sub_fixture_coverage: list drift");
|
||||
}
|
||||
const subCallFromSubStagedNgcFiles = subCallFromSubPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/sub-call-from-sub/", ""))
|
||||
.sort();
|
||||
if (subCallFromSubStagedNgcFiles.join(",") !== subCallFromSubNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_sub_call_from_sub_staging_manifest: list drift");
|
||||
}
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_sub_call_from_sub",
|
||||
interp.runFileWithIni(
|
||||
@@ -7294,6 +7310,21 @@
|
||||
interp,
|
||||
"nested-sub-in-file-error",
|
||||
);
|
||||
const nestedSubInFileErrorNgcFiles = [
|
||||
"subs/sequential.ngc",
|
||||
"test.ngc",
|
||||
];
|
||||
if (nestedSubInFileErrorNgcFiles.length !== 2 || new Set(nestedSubInFileErrorNgcFiles).size !== nestedSubInFileErrorNgcFiles.length) {
|
||||
throw new Error("browser_interp_nested_sub_in_file_error_fixture_coverage: list drift");
|
||||
}
|
||||
const nestedSubInFileErrorStagedNgcFiles = nestedSubInFileErrorPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/nested-sub-in-file-error/", ""))
|
||||
.sort();
|
||||
if (nestedSubInFileErrorStagedNgcFiles.join(",") !== nestedSubInFileErrorNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_nested_sub_in_file_error_staging_manifest: list drift");
|
||||
}
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_nested_sub_in_file_error",
|
||||
interp.runFileWithIni(
|
||||
|
||||
@@ -2134,6 +2134,25 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const subCallFromSubPlan = stageInterpIniContext("sub-call-from-sub");
|
||||
const subCallFromSubNgcFiles = [
|
||||
"subs/caller.ngc",
|
||||
"subs/helper.ngc",
|
||||
"test.ngc",
|
||||
];
|
||||
assert.deepEqual(
|
||||
subCallFromSubNgcFiles,
|
||||
interpRegressionNgcFilesRecursive("sub-call-from-sub"),
|
||||
"interp sub-call-from-sub fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
subCallFromSubPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/sub-call-from-sub/", ""))
|
||||
.sort(),
|
||||
subCallFromSubNgcFiles,
|
||||
"interp sub-call-from-sub staging manifest drift",
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"interp_sub_call_from_sub_wasm",
|
||||
interp.runFileWithIni(
|
||||
@@ -2186,6 +2205,24 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const nestedSubInFileErrorPlan = stageInterpIniContext("nested-sub-in-file-error");
|
||||
const nestedSubInFileErrorNgcFiles = [
|
||||
"subs/sequential.ngc",
|
||||
"test.ngc",
|
||||
];
|
||||
assert.deepEqual(
|
||||
nestedSubInFileErrorNgcFiles,
|
||||
interpRegressionNgcFilesRecursive("nested-sub-in-file-error"),
|
||||
"interp nested-sub-in-file-error fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
nestedSubInFileErrorPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/nested-sub-in-file-error/", ""))
|
||||
.sort(),
|
||||
nestedSubInFileErrorNgcFiles,
|
||||
"interp nested-sub-in-file-error staging manifest drift",
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"interp_nested_sub_in_file_error_wasm",
|
||||
interp.runFileWithIni(
|
||||
|
||||
Reference in New Issue
Block a user