diff --git a/examples/markdown.feature b/examples/markdown.feature index e896551..06da6f4 100644 --- a/examples/markdown.feature +++ b/examples/markdown.feature @@ -57,3 +57,14 @@ Feature: Markdown """ When I successfully run `linkcheck --verbose foo.md` Then the stderr should contain "OK" + + Scenario: Check a markdown file which contains live and dead links in verbose mode + Given a file named "foo.md" with: + """ + [Google](https://google.com) + [The answer](https://some-say-the-answer-is-42.com) + """ + When I run `linkcheck -v foo.md` + Then the exit status should be 1 + And the stderr should contain "OK" + And the stderr should contain "ERROR" diff --git a/url_checker.go b/url_checker.go index d6f4f53..c6d6d39 100644 --- a/url_checker.go +++ b/url_checker.go @@ -41,7 +41,7 @@ func (c urlChecker) CheckMany(ss []string) bool { ok := true for i := 0; i < len(ss); i++ { - ok = ok && <-bs + ok = <-bs && ok } return ok