1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-17 01:42:45 +02:00

Fix running integration tests on Windows

At least they now work when using
  go run cmd/integration_test/main.go cli
or
  go run cmd/integration_test/main.go tui

I haven't been able to get them to run headless (i.e. using
"go test pkg/integration/clients/*.go"), which prevents us from running them on
CI.
This commit is contained in:
Stefan Haller
2024-01-19 22:02:37 +01:00
parent 0afcc3d34d
commit 8311933de4
2 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,7 @@ package components
import (
"os"
"path/filepath"
"strconv"
"strings"
@ -223,7 +224,7 @@ func testNameFromCurrentFilePath() string {
}
func TestNameFromFilePath(path string) string {
name := strings.Split(path, "integration/tests/")[1]
name := strings.Split(filepath.ToSlash(path), "integration/tests/")[1]
return name[:len(name)-len(".go")]
}