cli_run no macro re-write

This commit is contained in:
Anton-4 2022-09-27 20:25:28 +02:00
parent 1d9a751606
commit d5dbee57d9
No known key found for this signature in database
GPG key ID: A13F4A6E21141925
8 changed files with 605 additions and 715 deletions

View file

@ -373,19 +373,17 @@ pub fn cli_testing_dir(dir_name: &str) -> PathBuf {
}
#[allow(dead_code)]
pub fn examples_dir(dir_name: &str) -> PathBuf {
pub fn dir_path_from_root(dir_name: &str) -> PathBuf {
let mut path = root_dir();
// Descend into examples/{dir_name}
path.push("examples");
path.extend(dir_name.split("/")); // Make slashes cross-target
path
}
#[allow(dead_code)]
pub fn example_file(dir_name: &str, file_name: &str) -> PathBuf {
let mut path = examples_dir(dir_name);
pub fn file_path_from_root(dir_name: &str, file_name: &str) -> PathBuf {
let mut path = dir_path_from_root(dir_name);
path.push(file_name);