Skip to content

Commit a1d4b97

Browse files
committed
Tests: Update TagLib FLAC tests for recent VorbisComments changes
1 parent c1cb409 commit a1d4b97

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/taglib/test_flac.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ fn test_remove_all_pictures() {
190190
}
191191

192192
#[test]
193-
#[ignore] // TODO: `VorbisComments::get` is case-sensitive for now, it shouldn't be.
194193
fn test_repeated_save_1() {
195194
let mut file = temp_file!("tests/taglib/data/silence-44-s.flac");
196195
{
@@ -367,23 +366,26 @@ fn test_properties() {
367366
file.rewind().unwrap();
368367
f.vorbis_comments().unwrap().save_to(&mut file).unwrap();
369368
}
369+
file.rewind().unwrap();
370370
{
371-
file.rewind().unwrap();
372371
let f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
373372

374373
assert_eq!(f.vorbis_comments(), Some(&tag));
375374
}
376375
}
377376

378377
#[test]
379-
#[ignore] // TODO: Keys are not yet validated
380378
fn test_invalid() {
381379
let mut file = temp_file!("tests/taglib/data/silence-44-s.flac");
382380
let mut f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
383381

382+
// NOTE: In TagLib, there's a `setProperties` method. This is equivalent.
383+
f.vorbis_comments_mut().unwrap().clear();
384+
384385
f.vorbis_comments_mut()
385386
.unwrap()
386387
.push(String::from("H\x00c4\x00d6"), String::from("bla"));
388+
assert!(f.vorbis_comments().unwrap().is_empty());
387389
}
388390

389391
#[test]

0 commit comments

Comments
 (0)