hrm
parent
5b9bead96f
commit
61f9b9c724
18
main_test.go
18
main_test.go
|
|
@ -82,6 +82,17 @@ func TestRunWith(t *testing.T) {
|
|||
"Australian_Survivor_S12E12.mkv",
|
||||
},
|
||||
},
|
||||
"hard w group": {
|
||||
given: []string{
|
||||
"[Yameii] Dr. Stone - S04E12 [English Dub] [CR WEB-DL 720p] [F6EF1948].mkv",
|
||||
},
|
||||
patterns: []string{
|
||||
main.PatternGroupTitleHyphenSE,
|
||||
},
|
||||
want: []string{
|
||||
"Dr_Stone_S04E12.mkv",
|
||||
},
|
||||
},
|
||||
"easy w group": {
|
||||
given: []string{
|
||||
"[SubsPlease] Tokidoki Bosotto Russia-go de Dereru Tonari no Alya-san - 01 (720p) [A12844D5].mkv",
|
||||
|
|
@ -235,6 +246,12 @@ func TestRecursive(t *testing.T) {
|
|||
os.MkdirAll("./dirB/showE", os.ModePerm)
|
||||
write("./dirB/showE/title S03E06.e")
|
||||
|
||||
// defaults
|
||||
write("./dirA/showF/.show-ingestion.yaml", `{
|
||||
"o": "`+outd+`/F"
|
||||
}`)
|
||||
write("./dirA/showF/[Yameii] Dr. Stone - S04E12 [English Dub] [CR WEB-DL 720p] [F6EF1948].mkv")
|
||||
|
||||
if err := main.Recursive(context.Background()); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if err := main.Recursive(context.Background()); err != nil {
|
||||
|
|
@ -246,6 +263,7 @@ func TestRecursive(t *testing.T) {
|
|||
exists(t, path.Join(outd, "C", "t_SsEe.c"))
|
||||
notExists(t, path.Join(outd, "D", "title_S02E04.d"))
|
||||
notExists(t, path.Join(outd, "title_S03E06.e"))
|
||||
exists(t, path.Join(outd, "F", "Dr_Stone_S04E12.mkv"))
|
||||
}
|
||||
|
||||
func write(f string, b ...string) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue