From 9a39e69c4d26332c2a4f203ae32b086514f0b43e Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Fri, 1 May 2026 01:49:04 -0500 Subject: [PATCH] test(skills): make path assertion portable across separators The render-skills test asserted `rendered.contains("test-skill/SKILL.md")` which only matched on Unix; Windows uses backslashes via Path::display(), so the assertion failed only in CI on windows-latest. Build the expected substring through PathBuf::display() so the assertion matches the platform-correct separator. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/tui/src/skills/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/tui/src/skills/mod.rs b/crates/tui/src/skills/mod.rs index 9af9b6f4..7e01766a 100644 --- a/crates/tui/src/skills/mod.rs +++ b/crates/tui/src/skills/mod.rs @@ -319,9 +319,20 @@ mod tests { crate::skills::render_available_skills_context(&tmpdir.path().join("skills")) .expect("skill context"); + let expected_path = tmpdir + .path() + .join("skills") + .join("test-skill") + .join("SKILL.md") + .display() + .to_string(); + assert!(rendered.contains("## Skills")); assert!(rendered.contains("- test-skill: A test skill")); - assert!(rendered.contains("test-skill/SKILL.md")); + assert!( + rendered.contains(&expected_path), + "expected path {expected_path:?} not in rendered output" + ); assert!(rendered.contains("### How to use skills")); }