添加测试用例
This commit is contained in:
parent
a4ea096e3d
commit
3e2af31678
9 changed files with 335 additions and 130 deletions
22
cloudlyric_test.go
Normal file
22
cloudlyric_test.go
Normal 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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Reference in a new issue