diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/includes/BBCodeTest.php | 4 | ||||
-rw-r--r-- | tests/unit/includes/MarkdownTest.php | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php index 9e9b1a33b..54c35e67d 100644 --- a/tests/unit/includes/BBCodeTest.php +++ b/tests/unit/includes/BBCodeTest.php @@ -41,6 +41,10 @@ class BBCodeTest extends UnitTestCase { '<img src="https://example.com/image.jpg" alt="Alt text">', '[img=https://example.com/image.jpg]Alt text[/img]' ], + 'code block' => [ + "<pre><code>some\ncode</code></pre>", + "[code]some\ncode[/code]" + ], ]; } } diff --git a/tests/unit/includes/MarkdownTest.php b/tests/unit/includes/MarkdownTest.php index e05cec6fb..8025e8efa 100644 --- a/tests/unit/includes/MarkdownTest.php +++ b/tests/unit/includes/MarkdownTest.php @@ -69,6 +69,14 @@ class MarkdownTest extends UnitTestCase { '[img=https://example.com/image.jpg]Alt text[/img]', '![Alt text](https://example.com/image.jpg)' ], + 'inline code' => [ + '[code]some code[/code]', + '`some code`' + ], + 'code block no language' => [ + "[code]some code\nover multiple lines[/code]", + "```\nsome code\nover multiple lines\n```" + ], ]; } |