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

Function path_components

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

Source from the content-addressed store, hash-verified

998
999 #[test_case]
1000 fn path_components() {
1001 let mut components = Path::new("/tmp/foo.txt").components();
1002
1003 assert_eq!(components.next(), Some(Component::RootDir));
1004 assert_eq!(components.next(), Some(Component::Normal(OsStr::new("tmp"))));
1005 assert_eq!(components.next(), Some(Component::Normal(OsStr::new("foo.txt"))));
1006 assert_eq!(components.next(), None);
1007 }
1008
1009 #[test_case]
1010 fn path_file_name() {

Callers

nothing calls this directly

Calls 1

componentsMethod · 0.80

Tested by

no test coverage detected