mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-24 19:25:56 +00:00
Exercise an explicitly relative fixture path in regression
This commit is contained in:
1 parent
10daa9b74d
commit
7e170744bf
1 file changed
+2
-1
@@ -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(¤t).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();
|
||||
|
||||
Reference in new issue
Block a user