Add a missing test case for reference override Exercise link text override.
Vytautas Ĺ altenis vytas@rtfb.lt
Wed, 06 May 2015 15:57:15 +0300
1 files changed,
9 insertions(+),
0 deletions(-)
jump to
M
inline_test.go
→
inline_test.go
@@ -176,6 +176,9 @@ "<p>test [ref4][]</p>\n",
"test [!(*http.ServeMux).ServeHTTP][] complicated ref\n", "<p>test <a href=\"http://localhost:6060/pkg/net/http/#ServeMux.ServeHTTP\" title=\"ServeHTTP docs\">!(*http.ServeMux).ServeHTTP</a> complicated ref</p>\n", + + "test [ref5][]\n", + "<p>test <a href=\"http://www.ref5.com/\" title=\"Reference 5\">Moo</a></p>\n", } doTestsInlineParam(t, tests, Options{ ReferenceOverride: func(reference string) (rv *Reference, overridden bool) {@@ -200,6 +203,12 @@ case "!(*http.ServeMux).ServeHTTP":
return &Reference{ Link: "http://localhost:6060/pkg/net/http/#ServeMux.ServeHTTP", Title: "ServeHTTP docs"}, true + case "ref5": + return &Reference{ + Link: "http://www.ref5.com/", + Title: "Reference 5", + Text: "Moo", + }, true } return nil, false }}, 0, HtmlRendererParameters{})