补充浏览器参数文件错误覆盖
结论:浏览器解释器 smoke 现在直接通过 LinuxCNC restore_parameters C ABI 验证缺失参数文件成功和乱序参数文件拒绝路径。
This commit is contained in:
@@ -138,6 +138,8 @@ named-parameter file path and negative interpreter fixtures with expected
|
||||
error text plus absent canonical motion output. It also uses real browser OPFS
|
||||
storage plus the interpreter SDK to restore and save a LinuxCNC parameter file
|
||||
through vendored `Interp::restore_parameters()` and `Interp::save_parameters()`,
|
||||
and directly checks missing-file success plus out-of-order parameter-file
|
||||
rejection through the same LinuxCNC `restore_parameters()` C ABI,
|
||||
to load/save LinuxCNC tool tables through vendored `tooldata_common.cc`, and
|
||||
to reject invalid INI-derived parameter/tool-table file names through the OPFS
|
||||
path model after the names are parsed by the LinuxCNC-backed INI WASM SDK. It
|
||||
@@ -267,7 +269,7 @@ post-execute position parameters differently than the line-by-line MDI smoke.
|
||||
The same Node WASM and browser file-path smokes also cover the negative fixture
|
||||
group and check the LinuxCNC file-execution error text plus absent canonical
|
||||
motion constraints where applicable.
|
||||
The Node WASM interpreter smoke also covers LinuxCNC parameter-file
|
||||
The Node WASM and browser interpreter smokes also cover LinuxCNC parameter-file
|
||||
restore/save behavior through the exported C ABI, including out-of-order file
|
||||
rejection, missing-file success, required numeric parameter writeback, removal
|
||||
of named-parameter-only lines from saved output, and the `.bak` backup produced
|
||||
|
||||
@@ -202,6 +202,22 @@
|
||||
namedParamExpectedText,
|
||||
);
|
||||
|
||||
verifyExpectedOutput(
|
||||
"restore_parameters_missing_file",
|
||||
interp.restoreParameters("/work/browser-missing.var"),
|
||||
"restore_parameters=0",
|
||||
);
|
||||
const outOfOrderParameterFilePath = "/work/browser-out-of-order.var";
|
||||
interp.writeTextFile(outOfOrderParameterFilePath, "5220 1\n5161 2\n");
|
||||
verifyExpectedOutput(
|
||||
"restore_parameters_out_of_order",
|
||||
interp.restoreParameters(outOfOrderParameterFilePath),
|
||||
[
|
||||
"restore_parameters=5",
|
||||
"restore_error_text=Parameter file out of order",
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
await saveMachineTextFiles("browser-interp", {
|
||||
ini: "[EMC]\nMACHINE = browser-interp\n",
|
||||
toolTable: "T2 P7 Z3.125 D1.5 I12 J34 Q4 ;browser finish tool\n",
|
||||
|
||||
Reference in New Issue
Block a user