| 1228 | |
| 1229 | #[test] |
| 1230 | fn test_storage_system_path_of_cwd() { |
| 1231 | let dir = tempfile::tempdir().unwrap(); |
| 1232 | let dir = dir.path().canonicalize().unwrap(); |
| 1233 | |
| 1234 | let mut storage = Storage::default(); |
| 1235 | storage |
| 1236 | .attach( |
| 1237 | "c", |
| 1238 | &format!("file://{}", dir.display()), |
| 1239 | Box::from(DirectoryDrive::new(dir.clone()).unwrap()), |
| 1240 | ) |
| 1241 | .unwrap(); |
| 1242 | |
| 1243 | assert!(storage.system_path(&storage.cwd()).unwrap().is_none()); |
| 1244 | |
| 1245 | storage.cd("c:/").unwrap(); |
| 1246 | assert_eq!(dir, storage.system_path(&storage.cwd()).unwrap().unwrap()); |
| 1247 | } |
| 1248 | |
| 1249 | #[test] |
| 1250 | fn test_storage_system_path_errors() { |