mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 14:44:22 +00:00
MP4: Add test for empty ilst
This commit is contained in:
parent
e1c10bee66
commit
e245155f99
3 changed files with 21 additions and 0 deletions
|
@ -169,6 +169,8 @@
|
|||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
||||
// TODO: Give 1.62.0 some time, and start using #[default] on enums
|
||||
|
||||
pub mod ape;
|
||||
pub mod error;
|
||||
pub(crate) mod file;
|
||||
|
|
|
@ -167,3 +167,22 @@ where
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::mp4::{Ilst, Mp4File};
|
||||
use crate::tag::utils::test_utils;
|
||||
use crate::AudioFile;
|
||||
use std::io::Cursor;
|
||||
|
||||
#[test]
|
||||
fn zero_sized_ilst() {
|
||||
let file = Mp4File::read_from(
|
||||
&mut Cursor::new(test_utils::read_path("tests/files/assets/zero/zero.ilst")),
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(file.ilst, Some(Ilst::default()));
|
||||
}
|
||||
}
|
||||
|
|
BIN
tests/files/assets/zero/zero.ilst
Normal file
BIN
tests/files/assets/zero/zero.ilst
Normal file
Binary file not shown.
Loading…
Reference in a new issue