添加测试用例

This commit is contained in:
Hami Lemon 2022-03-29 11:16:04 +08:00
parent a4ea096e3d
commit 3e2af31678
9 changed files with 335 additions and 130 deletions

22
cloudlyric_test.go Normal file
View file

@ -0,0 +1,22 @@
package lrc2srt
import (
"fmt"
"testing"
)
func TestGet163Lyric(t *testing.T) {
tests := []struct {
input string
}{
{"1423123512"},
}
for _, tt := range tests {
t.Run(fmt.Sprintf("id=%s", tt.input), func(t *testing.T) {
l, lt := Get163Lyric(tt.input)
if l == "" || lt == "" {
t.Errorf("get cloud lyric faild, id = %s", tt.input)
}
})
}
}