()
| 1307 | /// providing a parent directory. |
| 1308 | #[test] |
| 1309 | fn package_try_from_path_fails() -> TestResult { |
| 1310 | init_logger(); |
| 1311 | |
| 1312 | // Fail on trying to use a directory without a file name as a package. |
| 1313 | assert!(Package::try_from(PathBuf::from("/").as_path()).is_err()); |
| 1314 | |
| 1315 | // Fail on trying to use a file without a parent |
| 1316 | assert!( |
| 1317 | Package::try_from( |
| 1318 | PathBuf::from("/something_very_unlikely_to_ever_exist_in_a_filesystem").as_path() |
| 1319 | ) |
| 1320 | .is_err() |
| 1321 | ); |
| 1322 | |
| 1323 | Ok(()) |
| 1324 | } |
| 1325 | |
| 1326 | /// Ensure that the Debug implementation of [`PackageEntryIterator`] and |
| 1327 | /// [`MetadataEntryIterator`] works as expected. |
nothing calls this directly
no test coverage detected