add more case for filterProfile method
This commit is contained in:
parent
ff8f840b14
commit
a02988fb3a
@ -36,7 +36,7 @@ func TestClientAction(t *testing.T) {
|
||||
profileMockResponse := []byte("mode: count\nmockService/main.go:30.13,48.33 13 1\nb/b.go:30.13,48.33 13 1")
|
||||
profileSuccessMockSvr := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write(profileMockResponse)
|
||||
_, _ = w.Write(profileMockResponse)
|
||||
}))
|
||||
defer profileSuccessMockSvr.Close()
|
||||
|
||||
|
@ -287,6 +287,16 @@ func TestFilterProfile(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with invalid regular expression",
|
||||
pattern: []string{"(?!a)"},
|
||||
input: []*cover.Profile{
|
||||
{
|
||||
FileName: "some/fancy/gopath/a.go",
|
||||
},
|
||||
},
|
||||
expectErr: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tcs {
|
||||
|
Loading…
Reference in New Issue
Block a user