tools: the flasher-plan vectors compare Windows paths with POSIX separators

This commit is contained in:
DeFiDude committed 2026-11-15 10:53:29 -07:00
1 parent 184bbfe59f
commit 40aa3010a7
1 file changed
+9 -1
@@ -436,7 +436,15 @@ mod tests {
let platform = case["platform"].as_u64().unwrap() as u8;
let expected: Option<Vec<String>> =
serde_json::from_value(case["argv"].clone()).unwrap();
let got = plan_flasher(platform, fw, &ctx).map(|plan| plan.argv());
// Upstream's vectors hold POSIX paths; on Windows the same plan joins with `\`.
let got = plan_flasher(platform, fw, &ctx).map(|plan| {
let argv: Vec<String> = plan.argv();
if cfg!(windows) {
argv.into_iter().map(|a| a.replace('\\', "/")).collect()
} else {
argv
}
});
if got != expected {
mismatches.push(format!(
"{fw} @ {}\n upstream {expected:?}\n rust {got:?}",