feat: Use regexp for year/episode match

This commit is contained in:
Jan Bader
2025-01-28 15:36:36 +01:00
parent 3ab632853d
commit f0ec6d4519
3 changed files with 62 additions and 39 deletions

View File

@ -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)
}
}
}