Guard browser OPFS saved text expected lines
This commit is contained in:
@@ -4543,19 +4543,19 @@
|
||||
verifyExpectedOutput(label, loadResult.result, expectedLines.join("\n"));
|
||||
}
|
||||
|
||||
async function verifyOpfsSavedText(label, loadActualText, expectedText) {
|
||||
verifyExpectedOutput(label, await loadActualText(), expectedText);
|
||||
async function verifyOpfsSavedText(label, loadActualText, expectedLines) {
|
||||
verifyExpectedOutput(label, await loadActualText(), expectedLines.join("\n"));
|
||||
}
|
||||
|
||||
async function verifyOpfsReadback(label, opfsPath, expectedText) {
|
||||
await verifyOpfsSavedText(label, () => loadTextFile(opfsPath), expectedText);
|
||||
async function verifyOpfsReadback(label, opfsPath, expectedLines) {
|
||||
await verifyOpfsSavedText(label, () => loadTextFile(opfsPath), expectedLines);
|
||||
}
|
||||
|
||||
async function verifyOpfsMachineFileReadback(label, machineId, fileKey, expectedText) {
|
||||
async function verifyOpfsMachineFileReadback(label, machineId, fileKey, expectedLines) {
|
||||
await verifyOpfsSavedText(label, async () => {
|
||||
const machineFiles = await loadMachineTextFiles(machineId);
|
||||
return machineFiles[fileKey];
|
||||
}, expectedText);
|
||||
}, expectedLines);
|
||||
}
|
||||
|
||||
async function writeOpfsMachineFile(machineId, filename, text) {
|
||||
@@ -9266,7 +9266,7 @@
|
||||
"5221\t9.870000",
|
||||
"5399\t66.600000",
|
||||
"absent=<_named_param>",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_parameter_backup_text",
|
||||
@@ -9277,7 +9277,7 @@
|
||||
"5221 2.25",
|
||||
"5399 44",
|
||||
"<_named_param> 123",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
const savedToolTable = await saveMachineToolTableToOpfs(
|
||||
interp,
|
||||
@@ -9313,7 +9313,7 @@
|
||||
"J+34.000000",
|
||||
"Q4",
|
||||
";browser finish tool",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
|
||||
const browserRandomMachineId = "browser-random-toolchanger";
|
||||
@@ -9421,7 +9421,7 @@
|
||||
"T5",
|
||||
"P9",
|
||||
";browser random rough tool",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
|
||||
const iniFileMachineId = "browser-ini-file-session";
|
||||
@@ -9536,7 +9536,7 @@
|
||||
"5162\t67.500000",
|
||||
"5221\t5.250000",
|
||||
"5399\t199.000000",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
await verifyOpfsSavedText(
|
||||
"opfs_saved_ini_named_parameter_backup_text",
|
||||
@@ -9546,7 +9546,7 @@
|
||||
"5162 62.5",
|
||||
"5221 4.5",
|
||||
"5399 99",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
verifyOpfsLoadResult(
|
||||
"opfs_load_ini_named_tool_table",
|
||||
@@ -9593,7 +9593,7 @@
|
||||
"Z+4.500000",
|
||||
"D+0.500000",
|
||||
";browser custom tool",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
|
||||
const iniOverrideMachineId = "browser-ini-override-session";
|
||||
@@ -9722,7 +9722,7 @@
|
||||
"5162\t102.500000",
|
||||
"5221\t7.500000",
|
||||
"5399\t202.000000",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
await verifyOpfsSavedText(
|
||||
"opfs_saved_explicit_parameter_backup_text",
|
||||
@@ -9732,7 +9732,7 @@
|
||||
"5162 82.5",
|
||||
"5221 6.5",
|
||||
"5399 101",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
const savedExplicitToolTable = await saveMachineToolTableToOpfs(
|
||||
interp,
|
||||
@@ -9767,7 +9767,7 @@
|
||||
"Z+5.500000",
|
||||
"D+0.625000",
|
||||
";browser explicit tool",
|
||||
].join("\n"),
|
||||
],
|
||||
);
|
||||
|
||||
await verifyOpfsInvalidIniSessionRejects(
|
||||
|
||||
Reference in New Issue
Block a user