summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui_test.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-03 20:30:18 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commitf3a0058eb91c924545c04bc1332fa7bddb2422ee (patch)
treefb58d692819212dc52adc82fa8d39e51e20430a5 /pkg/gui/gui_test.go
parent633b6f596dcaedc9809973e5a81d65d65ee54def (diff)
WIP
Diffstat (limited to 'pkg/gui/gui_test.go')
-rw-r--r--pkg/gui/gui_test.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/gui/gui_test.go b/pkg/gui/gui_test.go
index c513b8399..2fc73609f 100644
--- a/pkg/gui/gui_test.go
+++ b/pkg/gui/gui_test.go
@@ -315,18 +315,27 @@ func runLazygit(t *testing.T, testPath string, rootDir string, record bool, spee
cmd.Stdin = os.Stdin
cmd.Stderr = os.Stderr
cmd.Env = append(
- cmd.Env,
+ os.Environ(),
fmt.Sprintf("RECORD_EVENTS_TO=%s", replayPath),
+ "TERM=xterm-256color",
)
} else {
+ cmd.Stdout = os.Stdout
+ cmd.Stdin = os.Stdin
+ cmd.Stderr = os.Stderr
cmd.Env = append(
- cmd.Env,
+ os.Environ(),
fmt.Sprintf("REPLAY_EVENTS_FROM=%s", replayPath),
+ "TERM=xterm-256color",
)
+ t.Log(cmd.Env)
}
+ t.Log("here")
+
// if we're on CI we'll need to use a PTY. We can work that out by seeing if the 'TERM' env is defined.
if runInPTY() {
+ t.Log("1")
cmd.Env = append(cmd.Env, "TERM=xterm")
f, err := pty.StartWithSize(cmd, &pty.Winsize{Rows: 100, Cols: 100})
@@ -338,6 +347,7 @@ func runLazygit(t *testing.T, testPath string, rootDir string, record bool, spee
_ = f.Close()
} else {
+ t.Log("2")
err := cmd.Run()
assert.NoError(t, err)
}