package main import "testing" func Test(t *testing.T) { m := newMediaElement("Misfits - S02E03 - EN FORCED") result := "Misfits - S02E03 EN FORCED" if m.Path() != result { 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) } } }