mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-15 01:34:26 +02:00
WIP
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/creack/pty"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
||||
"github.com/jesseduffield/lazygit/pkg/secureexec"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@ -305,7 +306,7 @@ func runLazygit(t *testing.T, testPath string, rootDir string, record bool, spee
|
||||
err = oscommands.CopyDir(templateConfigDir, configDir)
|
||||
assert.NoError(t, err)
|
||||
|
||||
cmdStr := fmt.Sprintf("%s --use-config-dir=%s --path=%s", tempLazygitPath(), configDir, actualDir)
|
||||
cmdStr := fmt.Sprintf("sudo dtruss %s --use-config-dir=%s --path=%s", tempLazygitPath(), configDir, actualDir)
|
||||
|
||||
cmd := osCommand.ExecutableFromString(cmdStr)
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("REPLAY_SPEED=%d", speed))
|
||||
@ -328,7 +329,7 @@ func runLazygit(t *testing.T, testPath string, rootDir string, record bool, spee
|
||||
fmt.Sprintf("REPLAY_EVENTS_FROM=%s", replayPath),
|
||||
"TERM=xterm-256color",
|
||||
)
|
||||
t.Log(cmd.Env)
|
||||
t.Log(spew.Sdump(cmd))
|
||||
}
|
||||
|
||||
t.Log("here")
|
||||
@ -337,6 +338,7 @@ func runLazygit(t *testing.T, testPath string, rootDir string, record bool, spee
|
||||
if runInPTY() {
|
||||
t.Log("1")
|
||||
cmd.Env = append(cmd.Env, "TERM=xterm")
|
||||
t.Log(cmd.Env)
|
||||
|
||||
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 100, Cols: 100})
|
||||
assert.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user