diff --git a/src/common/desktop_entry.rs b/src/common/desktop_entry.rs index 21c765d..ce80cb9 100644 --- a/src/common/desktop_entry.rs +++ b/src/common/desktop_entry.rs @@ -148,7 +148,9 @@ mod tests { #[test] fn complex_exec() { - let path = PathBuf::from("tests/cmus.desktop"); - parse_file(&*path).unwrap(); + let entry = parse_file(Path::new("tests/cmus.desktop")).unwrap(); + assert_eq!(entry.mimes.len(), 2); + assert_eq!(entry.mimes[0].essence_str(), "audio/mp3"); + assert_eq!(entry.mimes[1].essence_str(), "audio/ogg"); } } diff --git a/tests/cmus.desktop b/tests/cmus.desktop index 16a324f..a26121d 100644 --- a/tests/cmus.desktop +++ b/tests/cmus.desktop @@ -9,3 +9,4 @@ Name=cmus-remote Comment=Music player cmus-remote control NoDisplay=true Icon=cmus +MimeType=audio/mp3;audio/ogg;