()
| 850 | |
| 851 | #[test] |
| 852 | fn test_archive_format_from_path() { |
| 853 | assert_eq!( |
| 854 | ArchiveFormat::from_path(Path::new("file.tar.gz")), |
| 855 | Some(ArchiveFormat::TarGz) |
| 856 | ); |
| 857 | assert_eq!( |
| 858 | ArchiveFormat::from_path(Path::new("file.tgz")), |
| 859 | Some(ArchiveFormat::TarGz) |
| 860 | ); |
| 861 | assert_eq!( |
| 862 | ArchiveFormat::from_path(Path::new("file.tar")), |
| 863 | Some(ArchiveFormat::Tar) |
| 864 | ); |
| 865 | assert_eq!( |
| 866 | ArchiveFormat::from_path(Path::new("file.zip")), |
| 867 | Some(ArchiveFormat::Zip) |
| 868 | ); |
| 869 | assert_eq!( |
| 870 | ArchiveFormat::from_path(Path::new("outdir")), |
| 871 | Some(ArchiveFormat::Directory) |
| 872 | ); |
| 873 | } |
| 874 | |
| 875 | #[test] |
| 876 | fn test_archive_format_is_compressed() { |
nothing calls this directly
no outgoing calls
no test coverage detected