src/path/from_path_test.rs
raw| 1 | use super::*; |
| 2 | |
| 3 | #[test] |
| 4 | fn from_path_string() { |
| 5 | let path = Path::new("./test/file.txt"); |
| 6 | let from_path: String = FromPath::from_path(&path); |
| 7 | |
| 8 | assert_eq!("./test/file.txt", from_path); |
| 9 | } |
| 10 | |
| 11 | #[test] |
| 12 | fn from_path_path_buf() { |
| 13 | let path = Path::new("./test/file.txt"); |
| 14 | let from_path: PathBuf = FromPath::from_path(&path); |
| 15 | |
| 16 | assert_eq!(path.to_path_buf(), from_path); |
| 17 | } |