Skip to content

Commit

Permalink
verify handling of non-go files
Browse files Browse the repository at this point in the history
  • Loading branch information
bhcleek committed Sep 7, 2023
1 parent aa5356a commit 2688be6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,25 @@ func TestGTA_ChangedPackages(t *testing.T) {

testChangedPackages(t, diff, nil, want)
})

t.Run("change non-go file", func(t *testing.T) {
diff := map[string]Directory{
"embed": {Exists: true, Files: []string{"README.md"}},
"unimported": {Exists: true, Files: []string{"unimported.go"}},
}

want := &Packages{
Dependencies: map[string][]Package{},
Changes: []Package{
{ImportPath: "unimported", Dir: "unimported"},
},
AllChanges: []Package{
{ImportPath: "unimported", Dir: "unimported"},
},
}

testChangedPackages(t, diff, nil, want)
})
}

func TestGTA_Prefix(t *testing.T) {
Expand Down

0 comments on commit 2688be6

Please sign in to comment.