Skip to content

Commit b71e8ec

Browse files
committed
test: fix the second platform-dependent assertion too [skip changelog]
The previous commit converted one of the two `parent() == temp.path()` comparisons; the other did not match my replace and survived, so macOS and Windows would still have failed. Both are now structural, and a grep confirms none remain.
1 parent 61d43db commit b71e8ec

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

crates/agnix-core/tests/overrides_integration.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,15 @@ fn xp009_blames_the_largest_file_not_every_sibling() {
720720
.map(|d| d.file.display().to_string())
721721
.collect::<Vec<_>>()
722722
);
723+
// Structural check: on macOS a TempDir under /var resolves to /private/var,
724+
// so comparing the parent against `temp.path()` fails for a reason unrelated
725+
// to what this asserts. The root file is the one with no `pkgNN` component.
723726
assert!(
724-
xp009[0].file.ends_with("AGENTS.md") && xp009[0].file.parent() == Some(temp.path()),
727+
xp009[0].file.ends_with("AGENTS.md")
728+
&& !xp009[0]
729+
.file
730+
.components()
731+
.any(|c| c.as_os_str().to_string_lossy().starts_with("pkg")),
725732
"the 30 KB root is the only edit that fixes every chain, got: {}",
726733
xp009[0].file.display()
727734
);

0 commit comments

Comments
 (0)