2022-07-11 20:52:52 +00:00
|
|
|
use crate::get_reader;
|
|
|
|
use lofty::error::ErrorKind;
|
2024-04-14 16:55:47 +00:00
|
|
|
use lofty::picture::PictureInformation;
|
2022-07-11 20:52:52 +00:00
|
|
|
|
2024-08-31 17:38:30 +00:00
|
|
|
#[test_log::test]
|
2022-07-11 20:52:52 +00:00
|
|
|
fn crash1() {
|
|
|
|
let reader =
|
|
|
|
get_reader("pictureinformation_from_jpeg/crash-e46c53f85ca87dd374bc5c4e73c2f66f3a45b955");
|
|
|
|
|
2023-03-14 00:20:46 +00:00
|
|
|
let err = PictureInformation::from_jpeg(reader.get_ref()).unwrap_err();
|
|
|
|
match err.kind() {
|
2022-07-11 20:52:52 +00:00
|
|
|
ErrorKind::NotAPicture => {},
|
2023-03-14 00:20:46 +00:00
|
|
|
_ => panic!("Received an unexpected error: {err}"),
|
2022-07-11 20:52:52 +00:00
|
|
|
}
|
|
|
|
}
|