test: verify path_of normal behaviour
Some checks failed
Rust / build (map[name:nightly]) (push) Failing after 34s
Rust / build (map[name:stable]) (push) Failing after 1m30s

This commit is contained in:
Paul Campbell 2024-10-30 06:34:31 +00:00
parent 2a5f47a9c9
commit 8913a0fe53

View file

@ -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(())
}
}