Skip to content

Commit 1888adb

Browse files
committed
test(check): normalise path separators so repo-file asserts pass on Windows
collect_repo_files built repo-relative paths with to_string_lossy(), so on Windows they came back as snapshots\snap-future while the guard asserted starts_with("snapshots/") — failing check_repair_apply_writes_nothing_for_incompatible_envelope on windows-latest only. Test-only issue; the repair refusal itself was fine.
1 parent 9942ef6 commit 1888adb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

crates/vykar-core/src/tests/check_command.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,12 @@ fn collect_repo_files(root: &std::path::Path) -> Vec<String> {
11681168
};
11691169
for entry in entries.flatten() {
11701170
let p = entry.path();
1171-
let rel = p.strip_prefix(base).unwrap().to_string_lossy().to_string();
1171+
// Normalise to `/` so assertions on repo keys hold on Windows too.
1172+
let rel = p
1173+
.strip_prefix(base)
1174+
.unwrap()
1175+
.to_string_lossy()
1176+
.replace('\\', "/");
11721177
if rel == "locks" {
11731178
continue;
11741179
}

0 commit comments

Comments
 (0)