mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
fix tests
This commit is contained in:
parent
6e80371535
commit
c87b2c02fa
@ -1396,7 +1396,7 @@ func TestGitCommandDiff(t *testing.T) {
|
|||||||
"Default case",
|
"Default case",
|
||||||
func(cmd string, args ...string) *exec.Cmd {
|
func(cmd string, args ...string) *exec.Cmd {
|
||||||
assert.EqualValues(t, "git", cmd)
|
assert.EqualValues(t, "git", cmd)
|
||||||
assert.EqualValues(t, []string{"diff", "--no-ext-diff", "--color=always", "--", "test.txt"}, args)
|
assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=always", "--", "test.txt"}, args)
|
||||||
|
|
||||||
return exec.Command("echo")
|
return exec.Command("echo")
|
||||||
},
|
},
|
||||||
@ -1412,7 +1412,7 @@ func TestGitCommandDiff(t *testing.T) {
|
|||||||
"cached",
|
"cached",
|
||||||
func(cmd string, args ...string) *exec.Cmd {
|
func(cmd string, args ...string) *exec.Cmd {
|
||||||
assert.EqualValues(t, "git", cmd)
|
assert.EqualValues(t, "git", cmd)
|
||||||
assert.EqualValues(t, []string{"diff", "--no-ext-diff", "--color=always", "--cached", "--", "test.txt"}, args)
|
assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=always", "--cached", "--", "test.txt"}, args)
|
||||||
|
|
||||||
return exec.Command("echo")
|
return exec.Command("echo")
|
||||||
},
|
},
|
||||||
@ -1428,7 +1428,7 @@ func TestGitCommandDiff(t *testing.T) {
|
|||||||
"plain",
|
"plain",
|
||||||
func(cmd string, args ...string) *exec.Cmd {
|
func(cmd string, args ...string) *exec.Cmd {
|
||||||
assert.EqualValues(t, "git", cmd)
|
assert.EqualValues(t, "git", cmd)
|
||||||
assert.EqualValues(t, []string{"diff", "--no-ext-diff", "--color=never", "--", "test.txt"}, args)
|
assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=never", "--", "test.txt"}, args)
|
||||||
|
|
||||||
return exec.Command("echo")
|
return exec.Command("echo")
|
||||||
},
|
},
|
||||||
@ -1444,7 +1444,7 @@ func TestGitCommandDiff(t *testing.T) {
|
|||||||
"File not tracked and file has no staged changes",
|
"File not tracked and file has no staged changes",
|
||||||
func(cmd string, args ...string) *exec.Cmd {
|
func(cmd string, args ...string) *exec.Cmd {
|
||||||
assert.EqualValues(t, "git", cmd)
|
assert.EqualValues(t, "git", cmd)
|
||||||
assert.EqualValues(t, []string{"diff", "--no-ext-diff", "--color=always", "--no-index", "/dev/null", "test.txt"}, args)
|
assert.EqualValues(t, []string{"diff", "--submodule", "--no-ext-diff", "--color=always", "--no-index", "/dev/null", "test.txt"}, args)
|
||||||
|
|
||||||
return exec.Command("echo")
|
return exec.Command("echo")
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user