SubTimelineFixerHelperEx_test.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package sub_timeline_fixer
  2. import (
  3. "testing"
  4. )
  5. // TODO 暂不方便在其他环境进行单元测试
  6. func TestSubTimelineFixerHelperEx_Check(t *testing.T) {
  7. //if NewSubTimelineFixerHelperEx(config.GetConfig().SubTimelineFixerConfig).Check() == false {
  8. // t.Fatal("Need Install FFMPEG")
  9. //}
  10. }
  11. // TODO 暂不方便在其他环境进行单元测试
  12. func TestSubTimelineFixerHelperEx_Process(t *testing.T) {
  13. //rootDir := unit_test_helper.GetTestDataResourceRootPath([]string{"sub_timeline_fixer"}, 4, true)
  14. //type args struct {
  15. // videoFileFullPath string
  16. // srcSubFPath string
  17. //}
  18. //tests := []struct {
  19. // name string
  20. // args args
  21. // wantErr bool
  22. //}{
  23. // {
  24. // name: "Foundation (2021) - S01E09", args: args{
  25. // videoFileFullPath: "X:\\连续剧\\Foundation (2021)\\Season 1\\Foundation (2021) - S01E09 - The First Crisis WEBDL-1080p.mkv",
  26. // srcSubFPath: filepath.Join(rootDir, "series", "Foundation (2021)", "Season 1", "Foundation (2021) - S01E09 - The First Crisis WEBDL-1080p.chinese(简英,zimuku).ass")},
  27. // wantErr: false,
  28. // },
  29. //}
  30. //
  31. //s := NewSubTimelineFixerHelperEx(*settings.NewTimelineFixerSettings())
  32. //s.Check()
  33. //for _, tt := range tests {
  34. // t.Run(tt.name, func(t *testing.T) {
  35. //
  36. // if err := s.Process(tt.args.videoFileFullPath, tt.args.srcSubFPath); (err != nil) != tt.wantErr {
  37. // t.Errorf("Process() error = %v, wantErr %v", err, tt.wantErr)
  38. // }
  39. // })
  40. //}
  41. }