Skip to content

Commit

Permalink
Add unit test for crash in #122
Browse files Browse the repository at this point in the history
Seems fixed upstream
  • Loading branch information
wjdp committed Jan 16, 2021
1 parent d8b7ca2 commit 39ab511
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htmltest/check-link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ func TestAnchorExternalHrefUTF8(t *testing.T) {
tExpectIssueCount(t, hT, 0)
}

func TestAnchorExternalInvalidBrackets(t *testing.T) {
// passes for external UTF-8 links
hT := tTestFile("fixtures/links/href_brackets.html")
tExpectIssueCount(t, hT, 1)
tExpectIssue(t, hT, "bad reference", 1)
}

func TestAnchorInternalBroken(t *testing.T) {
// fails for broken internal links
hT := tTestFile("fixtures/links/brokenLinkInternal.html")
Expand Down
2 changes: 2 additions & 0 deletions htmltest/fixtures/links/href_brackets.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a href="(https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.security.doc/GUID-41E5E52E-A95B-4E81-9724-6AD6800BEF78.html)">
brackets</a>

0 comments on commit 39ab511

Please sign in to comment.