Agent discovery test: the fixture uses a name Windows runs (#1554) (#1575)

The search-order test wrote an extensionless codex-acp, which Windows
discovery rightly skips; it now writes the first name this platform
looks for (codex-acp.exe on Windows, codex-acp elsewhere).

Fixes #1554

Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
DuBearteandClaude Opus 5.5 authored and GitHub committed 2026-10-15 22:05:55 -04:00
1 parent 105a3146c0
commit b562ab51e1
1 file changed
+4 -2
+4 -2
View File
@@ -306,8 +306,10 @@ mod tests {
let (a, b) = (root.join("a"), root.join("b"));
std::fs::create_dir_all(&a).unwrap();
std::fs::create_dir_all(&b).unwrap();
std::fs::write(b.join("codex-acp"), "").unwrap();
assert_eq!(find_in("codex-acp", &[a.clone(), b.clone()]), Some(b.join("codex-acp")));
// A name this platform runs: Windows looks only for `.exe`/`.cmd`/`.bat` (#1554).
let name = names_for("codex-acp", cfg!(windows)).remove(0);
std::fs::write(b.join(&name), "").unwrap();
assert_eq!(find_in("codex-acp", &[a.clone(), b.clone()]), Some(b.join(name)));
assert_eq!(find_in("gemini", &[a, b]), None);
let _ = std::fs::remove_dir_all(root);
}