mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
update specs
This commit is contained in:
@ -275,7 +275,7 @@ func TestGitCommandGetStashEntries(t *testing.T) {
|
||||
type scenario struct {
|
||||
testName string
|
||||
command func(string, ...string) *exec.Cmd
|
||||
test func([]StashEntry)
|
||||
test func([]*StashEntry)
|
||||
}
|
||||
|
||||
scenarios := []scenario{
|
||||
@ -284,7 +284,7 @@ func TestGitCommandGetStashEntries(t *testing.T) {
|
||||
func(string, ...string) *exec.Cmd {
|
||||
return exec.Command("echo")
|
||||
},
|
||||
func(entries []StashEntry) {
|
||||
func(entries []*StashEntry) {
|
||||
assert.Len(t, entries, 0)
|
||||
},
|
||||
},
|
||||
@ -293,8 +293,8 @@ func TestGitCommandGetStashEntries(t *testing.T) {
|
||||
func(string, ...string) *exec.Cmd {
|
||||
return exec.Command("echo", "WIP on add-pkg-commands-test: 55c6af2 increase parallel build\nWIP on master: bb86a3f update github template")
|
||||
},
|
||||
func(entries []StashEntry) {
|
||||
expected := []StashEntry{
|
||||
func(entries []*StashEntry) {
|
||||
expected := []*StashEntry{
|
||||
{
|
||||
0,
|
||||
"WIP on add-pkg-commands-test: 55c6af2 increase parallel build",
|
||||
@ -341,7 +341,7 @@ func TestGitCommandGetStatusFiles(t *testing.T) {
|
||||
type scenario struct {
|
||||
testName string
|
||||
command func(string, ...string) *exec.Cmd
|
||||
test func([]File)
|
||||
test func([]*File)
|
||||
}
|
||||
|
||||
scenarios := []scenario{
|
||||
@ -350,7 +350,7 @@ func TestGitCommandGetStatusFiles(t *testing.T) {
|
||||
func(cmd string, args ...string) *exec.Cmd {
|
||||
return exec.Command("echo")
|
||||
},
|
||||
func(files []File) {
|
||||
func(files []*File) {
|
||||
assert.Len(t, files, 0)
|
||||
},
|
||||
},
|
||||
@ -362,10 +362,10 @@ func TestGitCommandGetStatusFiles(t *testing.T) {
|
||||
"MM file1.txt\nA file3.txt\nAM file2.txt\n?? file4.txt",
|
||||
)
|
||||
},
|
||||
func(files []File) {
|
||||
func(files []*File) {
|
||||
assert.Len(t, files, 4)
|
||||
|
||||
expected := []File{
|
||||
expected := []*File{
|
||||
{
|
||||
Name: "file1.txt",
|
||||
HasStagedChanges: true,
|
||||
@ -463,22 +463,22 @@ func TestGitCommandCommitAmend(t *testing.T) {
|
||||
func TestGitCommandMergeStatusFiles(t *testing.T) {
|
||||
type scenario struct {
|
||||
testName string
|
||||
oldFiles []File
|
||||
newFiles []File
|
||||
test func([]File)
|
||||
oldFiles []*File
|
||||
newFiles []*File
|
||||
test func([]*File)
|
||||
}
|
||||
|
||||
scenarios := []scenario{
|
||||
{
|
||||
"Old file and new file are the same",
|
||||
[]File{},
|
||||
[]File{
|
||||
[]*File{},
|
||||
[]*File{
|
||||
{
|
||||
Name: "new_file.txt",
|
||||
},
|
||||
},
|
||||
func(files []File) {
|
||||
expected := []File{
|
||||
func(files []*File) {
|
||||
expected := []*File{
|
||||
{
|
||||
Name: "new_file.txt",
|
||||
},
|
||||
@ -490,7 +490,7 @@ func TestGitCommandMergeStatusFiles(t *testing.T) {
|
||||
},
|
||||
{
|
||||
"Several files to merge, with some identical",
|
||||
[]File{
|
||||
[]*File{
|
||||
{
|
||||
Name: "new_file1.txt",
|
||||
},
|
||||
@ -501,7 +501,7 @@ func TestGitCommandMergeStatusFiles(t *testing.T) {
|
||||
Name: "new_file3.txt",
|
||||
},
|
||||
},
|
||||
[]File{
|
||||
[]*File{
|
||||
{
|
||||
Name: "new_file4.txt",
|
||||
},
|
||||
@ -512,8 +512,8 @@ func TestGitCommandMergeStatusFiles(t *testing.T) {
|
||||
Name: "new_file1.txt",
|
||||
},
|
||||
},
|
||||
func(files []File) {
|
||||
expected := []File{
|
||||
func(files []*File) {
|
||||
expected := []*File{
|
||||
{
|
||||
Name: "new_file1.txt",
|
||||
},
|
||||
@ -1223,7 +1223,7 @@ func TestGitCommandDiff(t *testing.T) {
|
||||
gitCommand := newDummyGitCommand()
|
||||
assert.NoError(t, test.GenerateRepo("lots_of_diffs.sh"))
|
||||
|
||||
files := []File{
|
||||
files := []*File{
|
||||
{
|
||||
Name: "deleted_staged",
|
||||
HasStagedChanges: false,
|
||||
|
Reference in New Issue
Block a user