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

Function test_ensure_extension

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

Source from the content-addressed store, hash-verified

1235
1236 #[test]
1237 fn test_ensure_extension() {
1238 assert_eq!(
1239 ensure_extension(Path::new("file"), ArchiveFormat::TarGz),
1240 PathBuf::from("file.tar.gz")
1241 );
1242 assert_eq!(
1243 ensure_extension(Path::new("file.tar.gz"), ArchiveFormat::TarGz),
1244 PathBuf::from("file.tar.gz")
1245 );
1246 assert_eq!(
1247 ensure_extension(Path::new("dir"), ArchiveFormat::Directory),
1248 PathBuf::from("dir")
1249 );
1250 }
1251
1252 #[test]
1253 fn test_get_archive_path() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected