test: verify path_of normal behaviour
This commit is contained in:
parent
2a5f47a9c9
commit
8913a0fe53
1 changed files with 12 additions and 0 deletions
|
@ -13,6 +13,18 @@ mod path_of {
|
|||
let_assert!(Err(fs::Error::PathTraversal { base, path: _path }) = fs.path_of("..".into()));
|
||||
assert_eq!(base, fs.base());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn matches_joins() -> TestResult {
|
||||
let fs = fs::temp()?;
|
||||
|
||||
let joined = fs.base().join("foo").join("bar");
|
||||
let path_of = fs.path_of("foo/bar".into())?;
|
||||
|
||||
assert_eq!(joined, path_of);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue