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

Function path_file_name

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

Source from the content-addressed store, hash-verified

1008
1009 #[test_case]
1010 fn path_file_name() {
1011 assert_eq!(Some(OsStr::new("bin")), Path::new("/usr/bin/").file_name());
1012 assert_eq!(Some(OsStr::new("foo.txt")), Path::new("tmp/foo.txt").file_name());
1013 assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.").file_name());
1014 assert_eq!(Some(OsStr::new("foo.txt")), Path::new("foo.txt/.//").file_name());
1015 assert_eq!(None, Path::new("foo.txt/..").file_name());
1016 assert_eq!(None, Path::new("/").file_name());
1017 }
1018
1019 #[test_case]
1020 fn path_parent() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected