Browse Source

修复 sub_parser_hub 测试用例

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
97e50d5bb2
2 changed files with 3 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 2 1
      internal/pkg/sub_parser_hub/subParserHub_test.go

+ 1 - 0
.gitignore

@@ -49,3 +49,4 @@
 TestData/*
 TestData/
 /internal/pkg/hot_fix/Logs/*.log
+/internal/pkg/sub_parser_hub/Logs/*.log

+ 2 - 1
internal/pkg/sub_parser_hub/subParserHub_test.go

@@ -3,13 +3,14 @@ package sub_parser_hub
 import (
 	"github.com/allanpk716/ChineseSubFinder/internal/logic/sub_parser/ass"
 	"github.com/allanpk716/ChineseSubFinder/internal/logic/sub_parser/srt"
+	"github.com/allanpk716/ChineseSubFinder/internal/pkg/unit_test_helper"
 	"path/filepath"
 	"testing"
 )
 
 func TestSubParserHubIsSubHasChinese(t *testing.T) {
 
-	testRootDir := filepath.FromSlash("../../../TestData/sub_parser")
+	testRootDir := unit_test_helper.GetTestDataResourceRootPath([]string{"sub_parser", "org"}, 4, false)
 
 	type args struct {
 		filePath string