Change the issue test to verify that a multi-line finding contains a line range

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar 2020-05-26 09:05:24 +02:00 committed by Cosmin Cojocar
parent 7aedcc56ab
commit 7da9248ce6

View file

@ -98,7 +98,8 @@ import (
"net"
)
func main() {
_, _ := net.Listen("tcp", "0.0.0.0:2000")
_, _ := net.Listen("tcp",
"0.0.0.0:2000")
}
`
pkg := testutils.NewTestPackage()
@ -122,7 +123,7 @@ func main() {
Expect(err).ShouldNot(HaveOccurred())
Expect(issue).ShouldNot(BeNil())
Expect(issue.File).Should(MatchRegexp("foo.go"))
Expect(issue.Line).Should(MatchRegexp("7"))
Expect(issue.Line).Should(MatchRegexp("7-8"))
Expect(issue.Col).Should(Equal("10"))
})