Files
drop/libraries/libarchive/tests/util/path.rs
T
2026-03-02 22:11:49 +11:00

26 lines
411 B
Rust

use std::env;
use std::path::PathBuf;
pub fn exe_path() -> PathBuf {
env::current_exe().unwrap()
}
pub fn root() -> PathBuf {
exe_path()
.parent()
.unwrap()
.parent()
.unwrap()
.parent()
.unwrap()
.join("tests")
}
pub fn fixtures() -> PathBuf {
root().join("fixtures")
}
pub fn fixture(name: &str) -> PathBuf {
fixtures().join(name)
}