Skip to content

Commit

Permalink
Tests: Enable property reading for *::read tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Oct 15, 2024
1 parent ef32e24 commit 70b5d3e
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lofty/tests/files/aac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/aiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/ape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
6 changes: 2 additions & 4 deletions lofty/tests/files/flac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/matroska.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/mp4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/mpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/mpeg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/ogg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/wav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lofty/tests/files/wavpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 70b5d3e

Please sign in to comment.