MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_archive_format_from_path

Function test_archive_format_from_path

atomic-repository/src/archive.rs:852–873  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected