mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2025-03-04 06:47:12 +00:00
Tests: Enable property reading for *::read
tests
This commit is contained in:
parent
e45a036dba
commit
1954e2cde8
11 changed files with 12 additions and 14 deletions
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// Here we have an AAC file with an ID3v2, and an ID3v1 tag
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.aac")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// Here we have an AIFF file with both an ID3v2 chunk and text chunks
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.aiff")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// Here we have an APE file with an ID3v2, ID3v1, and an APEv2 tag
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.ape")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -16,16 +16,14 @@ fn multiple_vorbis_comments() {
|
|||
// not allowed by spec.
|
||||
assert!(FlacFile::read_from(
|
||||
&mut file,
|
||||
ParseOptions::new()
|
||||
.read_properties(false)
|
||||
.parsing_mode(ParsingMode::Strict)
|
||||
ParseOptions::new().parsing_mode(ParsingMode::Strict)
|
||||
)
|
||||
.is_err());
|
||||
|
||||
file.rewind().unwrap();
|
||||
|
||||
// But by default, we should just take the last tag in the stream
|
||||
let f = FlacFile::read_from(&mut file, ParseOptions::new().read_properties(false)).unwrap();
|
||||
let f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
|
||||
|
||||
// The first tag has the artist "Artist 1", the second has "Artist 2".
|
||||
assert_eq!(
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// This file contains a tags element
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.mka")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// This file contains an ilst atom
|
||||
let file = Probe::open("tests/files/assets/minimal/m4a_codec_aac.m4a")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ macro_rules! generate_tests {
|
|||
// Here we have an MPC file with an ID3v2, ID3v1, and an APEv2 tag
|
||||
let file = Probe::open($path)
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ fn read() {
|
|||
// Here we have an MP3 file with an ID3v2, ID3v1, and an APEv2 tag
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.mp3")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ fn speex_remove() {
|
|||
fn read(path: &str, file_type: FileType) {
|
||||
let file = Probe::open(path)
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// Here we have a WAV file with both an ID3v2 chunk and a RIFF INFO chunk
|
||||
let file = Probe::open("tests/files/assets/minimal/wav_format_pcm.wav")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ fn read() {
|
|||
// Here we have a WacPack file with both an ID3v1 tag and an APE tag
|
||||
let file = Probe::open("tests/files/assets/minimal/full_test.wv")
|
||||
.unwrap()
|
||||
.options(ParseOptions::new().read_properties(false))
|
||||
.options(ParseOptions::new())
|
||||
.read()
|
||||
.unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue