Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmpPaths = cmp.Options{ cmp.Transformer("toSlash", filepath.ToSlash), cmpopts.SortSlices(func(a, b string) bool { return a < b }), }
CmpPaths is a cmp.Option bundle that normalizes path separators to '/' and sorts string slices before comparison. This is ideal for comparing lists of file paths in a cross-platform, order-insensitive way.
Functions ¶
func PathsMatch ¶
PathsMatch asserts that two string slices containing file paths are equivalent, ignoring slice order and path separator differences (e.g., '\' vs '/').
It uses go-cmp for its powerful diffing capabilities and reports the failure using the testify/assert framework for consistent test output.
Returns true if the paths match, false otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.