summaryrefslogtreecommitdiff
path: root/src/test/kotlin/moe/nea/blog/md
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-03-24 22:36:36 +0100
committerLinnea Gräf <nea@nea.moe>2024-03-24 22:36:36 +0100
commit9513802ef7637a469c72a2dedd68d5bf9215ba4d (patch)
tree0b433dc2e35a2dbd138d4075c0b5f9fb2db528d3 /src/test/kotlin/moe/nea/blog/md
parente47481aa60c19abcb246386bf48a83ecccd238e4 (diff)
downloadblog-infra-9513802ef7637a469c72a2dedd68d5bf9215ba4d.tar.gz
blog-infra-9513802ef7637a469c72a2dedd68d5bf9215ba4d.tar.bz2
blog-infra-9513802ef7637a469c72a2dedd68d5bf9215ba4d.zip
Add block quotes
Diffstat (limited to 'src/test/kotlin/moe/nea/blog/md')
-rw-r--r--src/test/kotlin/moe/nea/blog/md/test/BlockQuoteTest.kt45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/test/kotlin/moe/nea/blog/md/test/BlockQuoteTest.kt b/src/test/kotlin/moe/nea/blog/md/test/BlockQuoteTest.kt
new file mode 100644
index 0000000..635dd88
--- /dev/null
+++ b/src/test/kotlin/moe/nea/blog/md/test/BlockQuoteTest.kt
@@ -0,0 +1,45 @@
+package moe.nea.blog.md.test
+
+import kotlin.test.Test
+
+class BlockQuoteTest : MarkdownTest() {
+ @Test
+ fun testNestedBlockQuote() {
+ assertDocumentFormat(
+ """
+ <quote>
+ hi
+ <quote>
+ hello
+ </quote>
+ </quote>
+ """.trimIndent(),
+ """
+ > hi
+ > > hello
+ """.trimIndent()
+ )
+ }
+
+ @Test
+ fun testCodeInBlock() {
+ assertDocumentFormat(
+ """
+ <quote>
+ hi
+ <code language=kotlin>
+ fun helloWorld(): Unit =
+ "Hello, World!".let(::println)
+ </code>
+ </quote>
+ """.trimIndent(),
+ """
+ > hi
+ > ```kotlin
+ > fun helloWorld(): Unit =
+ > "Hello, World!".let(::println)
+ > ```
+ """.trimIndent()
+ )
+ }
+} \ No newline at end of file