Skip to content

Commit ea8814d

Browse files
committed
fix: handle Windows 8.3 short paths in test assertion
1 parent 0084f3e commit ea8814d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

crates/pet/src/resolve.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,16 @@ mod tests {
203203
exe_name
204204
);
205205
let resolved = result.unwrap();
206+
// Compare filenames only — on Windows CI, temp paths may use 8.3 short
207+
// names (e.g., RUNNER~1) while the discovered path uses the long form.
206208
assert_eq!(
207-
resolved.discovered.executable,
208-
Some(fake_exe),
209-
"discovered executable should match the provided path"
209+
resolved
210+
.discovered
211+
.executable
212+
.as_ref()
213+
.and_then(|p| p.file_name().map(|f| f.to_owned())),
214+
Some(std::ffi::OsString::from(exe_name)),
215+
"discovered executable filename should match"
210216
);
211217
}
212218

0 commit comments

Comments
 (0)