Skip to content

Commit

Permalink
tests: add empty go.mod case
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Dec 2, 2024
1 parent 00dfe14 commit 4990fb6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions gomoddirectives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,23 @@ func TestAnalyzeFile(t *testing.T) {
GoVersionPattern: regexp.MustCompile(`\d\.\d+(\.0)?`),
},
},
{
desc: "all: empty go.mod",
modulePath: "empty/go.mod",
opts: Options{
ReplaceAllowLocal: true,
ReplaceAllowList: []string{
"github.com/gorilla/mux",
"github.com/ldez/grignotin",
},
ExcludeForbidden: true,
RetractAllowNoExplanation: false,
ToolchainForbidden: true,
ToolForbidden: true,
GoDebugForbidden: true,
GoVersionPattern: regexp.MustCompile(`\d\.\d+(\.0)?`),
},
},
}

for _, test := range testCases {
Expand Down

0 comments on commit 4990fb6

Please sign in to comment.