Skip to main content

path_suffix_match

Function path_suffix_match 

Source
pub fn path_suffix_match(actual: &str, expected: &str) -> bool
Expand description

Path-aware suffix match for conformance assertions.

Returns true when actual and expected refer to the same file:

  • If they are identical → true.
  • If expected is relative (no leading / or \) and actual ends with /<expected>true.
  • Otherwise → false.

This handles the common case where fixtures record relative filenames (SKILL.md) while the runtime returns absolute paths (/data/projects/.../SKILL.md).