Skip to content

Commit 5a9d7be

Browse files
committed
Tests: Implement TagLib TestID3v2::testUpdateGenre24
1 parent 56e2c68 commit 5a9d7be

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/taglib/test_id3v2.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,18 @@ fn test_update_genre23_3() {
864864

865865
#[test]
866866
fn test_update_genre_24() {
867-
todo!(
868-
"We currently just return the genre string as it is in the tag, need to think about \
869-
whether or not to convert numerical strings"
867+
let frame_value = TextInformationFrame::parse(
868+
&mut &b"\x00\
869+
14\0Eurodisco"[..],
870+
Id3v2Version::V4,
870871
)
872+
.unwrap()
873+
.unwrap();
874+
875+
let mut tag = Id3v2Tag::new();
876+
tag.insert(Frame::new("TCON", frame_value, FrameFlags::default()).unwrap());
877+
878+
assert_eq!(tag.genre().as_deref(), Some("R&B / Eurodisco"));
871879
}
872880

873881
#[test]

0 commit comments

Comments
 (0)