Update dependencies

This commit is contained in:
2022-03-22 17:50:38 +01:00
parent b94d312a9d
commit 1cc75e202e
8 changed files with 358 additions and 131 deletions

View File

@ -24,7 +24,11 @@ impl Fixture {
let mut path = PathBuf::from(&tempdir.path());
path.push(&fixture_filename);
Fixture { _tempdir: tempdir, source, path }
Fixture {
_tempdir: tempdir,
source,
path,
}
}
fn copy(fixture_filename: &str) -> Self {
@ -46,7 +50,6 @@ fn read_tag(path: &Path) -> id3::Tag {
id3::Tag::read_from_path(path).unwrap()
}
#[test]
fn test_unsuccessful_image_embedding() {
let song = Fixture::copy("attempt_1_no_image.mp3");
@ -55,7 +58,11 @@ fn test_unsuccessful_image_embedding() {
// Nonexistent files
assert!(embed_image(&song, &PathBuf::from("nonexistent.jpg")).is_err());
assert!(embed_image(&PathBuf::from("nonexistent.mp3"), &image).is_err());
assert!(embed_image(&PathBuf::from("nonexistent.mp3"), &PathBuf::from("nonexistent.jpg")).is_err());
assert!(embed_image(
&PathBuf::from("nonexistent.mp3"),
&PathBuf::from("nonexistent.jpg")
)
.is_err());
// Wrong kinds of files
assert!(embed_image(&image, &song).is_err());