⬥ ID3 encoding/decoding library in Go ⬥
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.
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
|
|
|
if tags.Comment != "Comment here " {
|
|
|
|
t.Errorf("GetID3v1Tags failed: expected %s; got %s", "Comment here ", tags.Comment)
|
|
|
|
}
|
|
|
|
}
|