扩展浏览器解释器 INI 感知覆盖

结论:浏览器解释器 smoke 现在通过 SDK/C ABI 覆盖 namedparam_semantics 的 INI-aware program ABI,并同步兼容性验证矩阵。
This commit is contained in:
2026-06-08 09:29:08 +08:00
parent 70e2597295
commit 4a2fc83776
2 changed files with 19 additions and 8 deletions

View File

@@ -242,7 +242,8 @@ for `minimal_linear`, `arc_semantics`, `length_units`, `modal_incremental`,
`comment_logging`, `numbered_params`, `tool_semantics`, `tool_table_setup`, `comment_logging`, `numbered_params`, `tool_semantics`, `tool_table_setup`,
`tool_reload`, `canned_cycles`, `cutter_comp_motion`, `threading_sync`, `tool_reload`, `canned_cycles`, `cutter_comp_motion`, `threading_sync`,
`nurbs_g5_semantics`, `nurbs_g6_semantics`, `state_tag_motion`, `nurbs_g5_semantics`, `nurbs_g6_semantics`, `state_tag_motion`,
`canon_runtime_edges`, `program_end_modal_reset`, and `namedparam_semantics`, `canon_runtime_edges`, `program_end_modal_reset`, and `namedparam_semantics`
through both Node WASM and browser INI-aware program ABI smoke coverage,
plus the `g1_zero_feed`, `arc_radius_mismatch`, `arc_zero_radius`, plus the `g1_zero_feed`, `arc_radius_mismatch`, `arc_zero_radius`,
`cutter_comp_plane_change`, `g53_incremental`, `namedparam_readonly`, `cutter_comp_plane_change`, `g53_incremental`, `namedparam_readonly`,
`numbered_param_readonly`, `tool_not_found`, and `numbered_param_readonly`, `tool_not_found`, and
@@ -372,6 +373,7 @@ Browser interpreter `Interp::execute()` coverage currently includes:
- `canon_runtime_edges` - `canon_runtime_edges`
- `tool_reload` - `tool_reload`
- `program_end_modal_reset` - `program_end_modal_reset`
- `namedparam_semantics` through the INI-aware program ABI
Browser interpreter negative coverage currently includes every fixture under Browser interpreter negative coverage currently includes every fixture under
`tests/fixtures/gcode_errors/`: `tests/fixtures/gcode_errors/`:

View File

@@ -113,6 +113,20 @@
); );
} }
const namedParamIniPath = "/work/namedparams.ini";
const namedParamProgramText = await fetchText(
`../fixtures/gcode/${INTERP_INI_FIXTURE}.ngc`,
);
const namedParamExpectedText = (
await fetchText(`../fixtures/canon/${INTERP_INI_FIXTURE}.events`)
).trimEnd();
interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini"));
verifyExpectedOutput(
INTERP_INI_FIXTURE,
interp.runProgramWithIni(namedParamProgramText, namedParamIniPath),
namedParamExpectedText,
);
const positionParamsText = await fetchText( const positionParamsText = await fetchText(
`../fixtures/gcode/${INTERP_POSITION_PARAMS_FILE_FIXTURE}.ngc`, `../fixtures/gcode/${INTERP_POSITION_PARAMS_FILE_FIXTURE}.ngc`,
); );
@@ -138,17 +152,12 @@
); );
} }
const namedParamIniPath = "/work/namedparams.ini";
interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini"));
const namedParamPath = `/work/${INTERP_INI_FIXTURE}.ngc`; const namedParamPath = `/work/${INTERP_INI_FIXTURE}.ngc`;
interp.writeTextFile( interp.writeTextFile(namedParamPath, namedParamProgramText);
namedParamPath,
await fetchText(`../fixtures/gcode/${INTERP_INI_FIXTURE}.ngc`),
);
verifyExpectedOutput( verifyExpectedOutput(
`${INTERP_INI_FIXTURE}_file`, `${INTERP_INI_FIXTURE}_file`,
interp.runFileWithIni(namedParamPath, namedParamIniPath), interp.runFileWithIni(namedParamPath, namedParamIniPath),
(await fetchText(`../fixtures/canon/${INTERP_INI_FIXTURE}.events`)).trimEnd(), namedParamExpectedText,
); );
await saveMachineTextFiles("browser-interp", { await saveMachineTextFiles("browser-interp", {