move test to its correct place...

This commit is contained in:
jsteuer 2020-02-16 18:07:23 +01:00
parent 2a86c1ea31
commit 3a828e641d
2 changed files with 18 additions and 23 deletions

View file

@ -76,3 +76,21 @@ place where everything breaks")
place where everything breaks">This link won't be rendered place where everything breaks">This link won't be rendered
correctly</a></p> correctly</a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =// //= = = = = = = = = = = = = = = = = = = = = = = =//
7
//- - - - - - - - -//
[](./target.md)
//- - - - - - - - -//
<p><a href="./target.md"></a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
8
//- - - - - - - - -//
[]()
//- - - - - - - - -//
<p><a href=""></a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -42,26 +42,3 @@ func TestSpec(t *testing.T) {
)) ))
testutil.DoTestCases(markdown, cases, t) testutil.DoTestCases(markdown, cases, t)
} }
func TestSpec_EdgeCase_LinkWithEmptyText(t *testing.T) {
// TODO: maybe this test cases will be part of the official spec in the future.
// check: https://github.com/commonmark/commonmark-spec/issues/636
cases := []testutil.MarkdownTestCase{
testutil.MarkdownTestCase{
No: -1,
Markdown: "[](./target.md)",
Expected: "<p><a href=\"./target.md\"></a></p>",
},
testutil.MarkdownTestCase{
No: -1,
Markdown: "[]()",
Expected: "<p><a href=\"\"></a></p>",
},
}
markdown := New(WithRendererOptions(
html.WithXHTML(),
html.WithUnsafe(),
))
testutil.DoTestCases(markdown, cases, t)
}