Skip to content

Commit 4724cfd

Browse files
committed
Tests: Enable property reading for *::read tests
1 parent 5a531d7 commit 4724cfd

File tree

11 files changed

+16
-20
lines changed

11 files changed

+16
-20
lines changed

lofty/tests/files/aac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// Here we have an AAC file with an ID3v2, and an ID3v1 tag
1313
let file = Probe::open("tests/files/assets/minimal/full_test.aac")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

lofty/tests/files/aiff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// Here we have an AIFF file with both an ID3v2 chunk and text chunks
1313
let file = Probe::open("tests/files/assets/minimal/full_test.aiff")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

lofty/tests/files/ape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// Here we have an APE file with an ID3v2, ID3v1, and an APEv2 tag
1313
let file = Probe::open("tests/files/assets/minimal/full_test.ape")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

lofty/tests/files/flac.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ fn multiple_vorbis_comments() {
1414

1515
// Reading a file with multiple VORBIS_COMMENT blocks should error when using `Strict`, as it is
1616
// not allowed by spec.
17-
assert!(
18-
FlacFile::read_from(
19-
&mut file,
20-
ParseOptions::new()
21-
.read_properties(false)
22-
.parsing_mode(ParsingMode::Strict)
23-
)
24-
.is_err()
25-
);
17+
assert!(FlacFile::read_from(
18+
&mut file,
19+
ParseOptions::new().parsing_mode(ParsingMode::Strict)
20+
)
21+
.is_err());
2622

2723
file.rewind().unwrap();
2824

2925
// But by default, we should just take the last tag in the stream
30-
let f = FlacFile::read_from(&mut file, ParseOptions::new().read_properties(false)).unwrap();
26+
let f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
3127

3228
// The first tag has the artist "Artist 1", the second has "Artist 2".
3329
assert_eq!(

lofty/tests/files/matroska.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// This file contains a tags element
1313
let file = Probe::open("tests/files/assets/minimal/full_test.mka")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

lofty/tests/files/mp4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// This file contains an ilst atom
1313
let file = Probe::open("tests/files/assets/minimal/m4a_codec_aac.m4a")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

lofty/tests/files/mpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ macro_rules! generate_tests {
2020
// Here we have an MPC file with an ID3v2, ID3v1, and an APEv2 tag
2121
let file = Probe::open($path)
2222
.unwrap()
23-
.options(ParseOptions::new().read_properties(false))
23+
.options(ParseOptions::new())
2424
.read()
2525
.unwrap();
2626

lofty/tests/files/mpeg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn read() {
1515
// Here we have an MP3 file with an ID3v2, ID3v1, and an APEv2 tag
1616
let file = Probe::open("tests/files/assets/minimal/full_test.mp3")
1717
.unwrap()
18-
.options(ParseOptions::new().read_properties(false))
18+
.options(ParseOptions::new())
1919
.read()
2020
.unwrap();
2121

lofty/tests/files/ogg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn speex_remove() {
8686
fn read(path: &str, file_type: FileType) {
8787
let file = Probe::open(path)
8888
.unwrap()
89-
.options(ParseOptions::new().read_properties(false))
89+
.options(ParseOptions::new())
9090
.read()
9191
.unwrap();
9292

lofty/tests/files/wav.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn read() {
1212
// Here we have a WAV file with both an ID3v2 chunk and a RIFF INFO chunk
1313
let file = Probe::open("tests/files/assets/minimal/wav_format_pcm.wav")
1414
.unwrap()
15-
.options(ParseOptions::new().read_properties(false))
15+
.options(ParseOptions::new())
1616
.read()
1717
.unwrap();
1818

0 commit comments

Comments
 (0)