You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
465 B
24 lines
465 B
3 years ago
|
package id3ed
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestGetID3v1Tags(t *testing.T) {
|
||
|
testfile, err := os.Open("./testData/testmp3id3v1.mp3")
|
||
|
if err != nil {
|
||
|
t.Errorf("could not open file for testing: %s", err)
|
||
|
}
|
||
|
tags, err := GetID3v1Tags(testfile)
|
||
|
if err != nil {
|
||
|
t.Errorf("GetID3v1Tags failed: %s", err)
|
||
|
}
|
||
|
|
||
|
comment := tags.GetComment()
|
||
|
|
||
|
if comment != "Comment here " {
|
||
|
t.Errorf("GetID3v1Tags failed: expected %s; got %s", "Comment here ", comment)
|
||
|
}
|
||
|
}
|