diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/kotlin/moe/nea/blog/md/test/LinkTest.kt | 16 | ||||
-rw-r--r-- | src/test/kotlin/moe/nea/blog/md/test/TestItalics.kt | 9 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/test/kotlin/moe/nea/blog/md/test/LinkTest.kt b/src/test/kotlin/moe/nea/blog/md/test/LinkTest.kt new file mode 100644 index 0000000..d476715 --- /dev/null +++ b/src/test/kotlin/moe/nea/blog/md/test/LinkTest.kt @@ -0,0 +1,16 @@ +package moe.nea.blog.md.test + +import kotlin.test.Test + +class LinkTest : MarkdownTest() { + @Test + fun testPaddedLink() { + assertInlineFormat("<link target=https://nea.moe>meee</link>", "[meee]( https://nea.moe )") + } + + @Test + fun testFormattingInLink() { + assertInlineFormat("<link target=https://nea.moe><i>meee</i></link>", "[*meee*]( https://nea.moe )") + } + +}
\ No newline at end of file diff --git a/src/test/kotlin/moe/nea/blog/md/test/TestItalics.kt b/src/test/kotlin/moe/nea/blog/md/test/TestItalics.kt index 673dafb..f4c1669 100644 --- a/src/test/kotlin/moe/nea/blog/md/test/TestItalics.kt +++ b/src/test/kotlin/moe/nea/blog/md/test/TestItalics.kt @@ -14,6 +14,15 @@ class TestItalics : MarkdownTest() { assertInlineFormat("<i><b>both</b> just italics</i>", "***both** just italics*") } + + @Test + fun otherMarkdownInItalics() { + assertInlineFormat( + "<i><link target=https://nea.moe><b>test</b></link></i>", + "*[**test**](https://nea.moe)*" + ) + } + @Test fun testDoubleStartRestartingItalics() { assertInlineFormat( |