From 314ce8fe44fab9ebdfdbfa5658c8bba4c5bb3cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vytautas=20=C5=A0altenis?= Date: Wed, 6 May 2015 15:57:15 +0300 Subject: [PATCH] Add a missing test case for reference override Exercise link text override. --- inline_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inline_test.go b/inline_test.go index 100be52..9ba94e8 100644 --- a/inline_test.go +++ b/inline_test.go @@ -176,6 +176,9 @@ func TestReferenceOverride(t *testing.T) { "test [!(*http.ServeMux).ServeHTTP][] complicated ref\n", "

test !(*http.ServeMux).ServeHTTP complicated ref

\n", + + "test [ref5][]\n", + "

test Moo

\n", } doTestsInlineParam(t, tests, Options{ ReferenceOverride: func(reference string) (rv *Reference, overridden bool) { @@ -200,6 +203,12 @@ func TestReferenceOverride(t *testing.T) { 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{})