feat: Use regexp for year/episode match
This commit is contained in:
@ -9,3 +9,16 @@ func Test(t *testing.T) {
|
||||
t.Error("Expected " + result + ", got " + m.Path())
|
||||
}
|
||||
}
|
||||
|
||||
func TestExamples(t *testing.T) {
|
||||
// list of strings with expected output
|
||||
examples := [][]string{
|
||||
{"Speak.No.Evil.2024.German.EAC3.DL.1080p.BluRay.x265-VECTOR.mkv", "Speak No Evil (2024) DE 1080P X265.mkv"},
|
||||
}
|
||||
for _, example := range examples {
|
||||
element := newMediaElement(example[0])
|
||||
if expected, got := example[1], element.Path(); expected != got {
|
||||
t.Errorf("Expected %s, got %s", expected, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user