Guard browser OPFS readback staging
This commit is contained in:
@@ -4535,6 +4535,10 @@
|
||||
);
|
||||
}
|
||||
|
||||
async function verifyOpfsReadback(label, opfsPath, expectedText) {
|
||||
verifyExpectedOutput(label, await loadTextFile(opfsPath), expectedText);
|
||||
}
|
||||
|
||||
function assertOpfsSessionStaging(label, session, machineId, expectedPaths) {
|
||||
if (session.machineId !== machineId) {
|
||||
throw new Error(`${label}: unexpected machine id ${session.machineId}`);
|
||||
@@ -9213,9 +9217,9 @@
|
||||
"absent=<_named_param>",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_parameter_backup_text",
|
||||
await loadTextFile(savedParameters.backupOpfsPath),
|
||||
savedParameters.backupOpfsPath,
|
||||
[
|
||||
"5161 10.5",
|
||||
"5162 20.25",
|
||||
@@ -9470,9 +9474,9 @@
|
||||
"parameter_5399=199",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_ini_named_parameter_text",
|
||||
await loadTextFile(loadedIniFileSession.parameters.opfsPath),
|
||||
loadedIniFileSession.parameters.opfsPath,
|
||||
[
|
||||
"5161\t33.750000",
|
||||
"5162\t67.500000",
|
||||
@@ -9480,9 +9484,9 @@
|
||||
"5399\t199.000000",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_ini_named_parameter_backup_text",
|
||||
await loadTextFile(savedIniNamedParameters.backupOpfsPath),
|
||||
savedIniNamedParameters.backupOpfsPath,
|
||||
[
|
||||
"5161 31.25",
|
||||
"5162 62.5",
|
||||
@@ -9526,9 +9530,9 @@
|
||||
"tool_1.pocketno=8",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_ini_named_tool_table_text",
|
||||
await loadTextFile(loadedIniFileSession.toolTable.opfsPath),
|
||||
loadedIniFileSession.toolTable.opfsPath,
|
||||
[
|
||||
"T8",
|
||||
"P8",
|
||||
@@ -9655,9 +9659,9 @@
|
||||
"parameter_5399=202",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_explicit_parameter_text",
|
||||
await loadTextFile(loadedIniOverrideSession.parameters.opfsPath),
|
||||
loadedIniOverrideSession.parameters.opfsPath,
|
||||
[
|
||||
"5161\t51.250000",
|
||||
"5162\t102.500000",
|
||||
@@ -9665,9 +9669,9 @@
|
||||
"5399\t202.000000",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_explicit_parameter_backup_text",
|
||||
await loadTextFile(savedExplicitParameters.backupOpfsPath),
|
||||
savedExplicitParameters.backupOpfsPath,
|
||||
[
|
||||
"5161 41.25",
|
||||
"5162 82.5",
|
||||
@@ -9699,9 +9703,9 @@
|
||||
"tool_1.pocketno=9",
|
||||
].join("\n"),
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
await verifyOpfsReadback(
|
||||
"opfs_saved_explicit_tool_table_text",
|
||||
await loadTextFile(loadedIniOverrideSession.toolTable.opfsPath),
|
||||
loadedIniOverrideSession.toolTable.opfsPath,
|
||||
[
|
||||
"T9",
|
||||
"P9",
|
||||
|
||||
Reference in New Issue
Block a user