MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / path_parent

Function path_parent

euralios_std/src/path.rs:1020–1028  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1018
1019 #[test_case]
1020 fn path_parent() {
1021 let path = Path::new("/foo/bar");
1022 let parent = path.parent().unwrap();
1023 assert_eq!(parent, Path::new("/foo"));
1024
1025 let grand_parent = parent.parent().unwrap();
1026 assert_eq!(grand_parent, Path::new("/"));
1027 assert_eq!(grand_parent.parent(), None);
1028 }
1029
1030 #[test_case]
1031 fn path_join() {

Callers

nothing calls this directly

Calls 1

parentMethod · 0.80

Tested by

no test coverage detected