diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-07 21:59:36 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 09:07:15 +1100 |
commit | b4c078d565af69bcb2f46adc20e528e53ae32908 (patch) | |
tree | 7a336c0169b7eab49765d39f7a0dd5537e919ba2 /pkg/commands/rebasing_test.go | |
parent | 157dd309f75f2ce3c23be53ddd2e4baa49a67321 (diff) |
WIP
Diffstat (limited to 'pkg/commands/rebasing_test.go')
-rw-r--r-- | pkg/commands/rebasing_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/commands/rebasing_test.go b/pkg/commands/rebasing_test.go index 7c4a954c9..2527cacd9 100644 --- a/pkg/commands/rebasing_test.go +++ b/pkg/commands/rebasing_test.go @@ -5,6 +5,7 @@ import ( "regexp" "testing" + "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/test" "github.com/stretchr/testify/assert" ) @@ -62,31 +63,31 @@ func TestGitCommandRebaseBranch(t *testing.T) { func TestGitCommandSkipEditorCommand(t *testing.T) { cmd := NewDummyGitCommand() - cmd.OSCommand.SetBeforeExecuteCmd(func(cmd *exec.Cmd) { + cmd.OSCommand.SetBeforeExecuteCmd(func(cmdObj oscommands.ICmdObj) { test.AssertContainsMatch( t, - cmd.Env, + cmdObj.GetEnvVars(), regexp.MustCompile("^VISUAL="), "expected VISUAL to be set for a non-interactive external command", ) test.AssertContainsMatch( t, - cmd.Env, + cmdObj.GetEnvVars(), regexp.MustCompile("^EDITOR="), "expected EDITOR to be set for a non-interactive external command", ) test.AssertContainsMatch( t, - cmd.Env, + cmdObj.GetEnvVars(), regexp.MustCompile("^GIT_EDITOR="), "expected GIT_EDITOR to be set for a non-interactive external command", ) test.AssertContainsMatch( t, - cmd.Env, + cmdObj.GetEnvVars(), regexp.MustCompile("^LAZYGIT_CLIENT_COMMAND=EXIT_IMMEDIATELY$"), "expected LAZYGIT_CLIENT_COMMAND to be set for a non-interactive external command", ) |