Files
drop/libraries/libarchive/tests/util/path.rs
T
Jamie Winsor 98168ddcf1 Initial commit
2016-01-09 15:40:08 -08:00

19 lines
348 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)
}