-
Notifications
You must be signed in to change notification settings - Fork 2
/
group_test.go
51 lines (45 loc) · 991 Bytes
/
group_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package torrentparser
import "testing"
func TestParser_GetGroup(t *testing.T) {
tests := []struct {
name string
want string
}{
{
name: "Nocturnal Animals 2016 VFF 1080p BluRay DTS HEVC-HD2",
want: "HD2",
},
{
name: "[HorribleSubs] Boruto - Naruto Next Generations - 85 [720p].mkv",
want: "HorribleSubs",
},
{
name: "X-Men.Apocalypse.2016.1080p.BluRay.DTS.x264.D-Z0N3.mkv",
want: "D-Z0N3",
},
{
name: "Gold 2016 1080p BluRay DTS-HD MA 5 1 x264-HDH",
want: "HDH",
},
{
name: "Hercules (2014) 1080p BrRip H264 - YIFY",
want: "YIFY",
},
{
name: "Western - L'homme qui n'a pas d'étoile-1955.Multi.DVD9",
want: "",
},
{
name: "sons.of.anarchy.s05e10.480p.BluRay.x264-GAnGSteR",
want: "GAnGSteR",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
p, _ := ParseName(tt.name)
if got := p.Group; got != tt.want {
t.Errorf("Parser.GetGroup() = %v, want %v", got, tt.want)
}
})
}
}