Browse Source

增加解析测试代码

Signed-off-by: allan716 <[email protected]>
allan716 2 years ago
parent
commit
94a673a123
1 changed files with 13 additions and 0 deletions
  1. 13 0
      pkg/decode/decode_test.go

+ 13 - 0
pkg/decode/decode_test.go

@@ -77,6 +77,19 @@ func Test_getImdbAndYearNfo(t *testing.T) {
 			},
 			},
 			wantErr: false,
 			wantErr: false,
 		},
 		},
+		{
+			name: "tvshow_00 (63).nfo", args: args{
+				nfoFilePath: filepath.Join(unit_test_helper.GetTestDataResourceRootPath([]string{"nfo_files", "tvshow"}, 3, false), "tvshow_00 (63).nfo"),
+				rootKey:     "tvshow",
+			},
+			want: types.VideoNfoInfo{
+				ImdbId:      "tt3581920",
+				TVdbId:      "392256",
+				Title:       "The Last of Us",
+				ReleaseDate: "2023-01-15",
+			},
+			wantErr: false,
+		},
 	}
 	}
 	for _, tt := range tests {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 		t.Run(tt.name, func(t *testing.T) {