Exercise an explicitly relative fixture path in regression

This commit is contained in:
Дмитрий committed 2026-10-11 21:50:09 +05:00
1 parent 10daa9b74d
commit 7e170744bf
1 file changed
+2 -1
+2 -1
View File
@@ -244,7 +244,8 @@ mod tests {
#[test]
fn relative_startup_fixture_targets_replace_the_original_location() {
let directory = tempfile::Builder::new().prefix("coa-schema-fixture-path-test-").tempdir_in(".").unwrap();
let relative = directory.path();
let current = std::env::current_dir().unwrap();
let relative = directory.path().strip_prefix(&current).unwrap();
fsx::atomic_write(&relative.join("Core/worldserver.exe"), b"old").unwrap();
let root = fsx::canonicalize_lenient(relative).unwrap();
let target = fsx::ensure_within(&root, &root.join("Core/worldserver.exe")).unwrap();