-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2908d89
commit a934d60
Showing
4 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::{ | ||
fs, | ||
path::{Path, PathBuf}, | ||
}; | ||
|
||
pub fn setup() { | ||
// some setup code, like creating required files/directories, starting | ||
// servers, etc. | ||
let crate_dir = PathBuf::new().join(env!("CARGO_MANIFEST_DIR")); | ||
let tests_dir = crate_dir.join("tests"); | ||
let samples_dir = tests_dir.join("samples"); | ||
} | ||
|
||
pub fn get_samples_dir() -> String { | ||
let crate_dir = PathBuf::new().join(env!("CARGO_MANIFEST_DIR")); | ||
let tests_dir = crate_dir.join("tests"); | ||
tests_dir.join("samples").to_string_lossy().to_string() | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters