test: add create_parent_dir_all_test (#1741)
This commit is contained in:
parent
354fb956a7
commit
7888aaecde
|
@ -458,9 +458,16 @@ mod tests {
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
fs::{create_dir_all, File},
|
fs::{create_dir_all, File},
|
||||||
};
|
};
|
||||||
|
|
||||||
use tempdir;
|
use tempdir;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn can_create_parent_dirs_with_ext() {
|
||||||
|
let tmp_dir = tempdir("out").unwrap();
|
||||||
|
let path = tmp_dir.path().join("IsolationModeMagic.sol/IsolationModeMagic.json");
|
||||||
|
create_parent_dir_all(&path).unwrap();
|
||||||
|
assert!(path.parent().unwrap().is_dir());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_determine_local_paths() {
|
fn can_determine_local_paths() {
|
||||||
assert!(is_local_source_name(&[""], "./local/contract.sol"));
|
assert!(is_local_source_name(&[""], "./local/contract.sol"));
|
||||||
|
|
Loading…
Reference in New Issue