From 3de8f5e7de424563cfe521848b2e2d11d100fcc5 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 Mar 2024 14:35:43 +0100 Subject: deal with wihitespace issues in tables and lists and add tests --- tests/unit/includes/BBCodeTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php index 6f79c45f4..100d28fc4 100644 --- a/tests/unit/includes/BBCodeTest.php +++ b/tests/unit/includes/BBCodeTest.php @@ -107,6 +107,18 @@ class BBCodeTest extends UnitTestCase { "[code]\ntestvar = \"this is a test\"\necho \"the message is \$testvar\"\n[/code]", '
testvar = "this is a test"
echo "the message is $testvar"
', ], + 'list with linebreaks \n' => [ + "some text\n[list]\n[*] item1\n[*] item2\n[/list]\nsome more text", + 'some text

some more text' + ], + 'list with linebreaks \r' => [ + "some text\r[list]\r[*] item1\r[*] item2\r[/list]\rsome more text", + 'some text

some more text' + ], + 'list with linebreaks \r\n' => [ + "some text\r\n[list]\r\n[*] item1\r\n[*] item2\r\n[/list]\r\nsome more text", + 'some text

some more text' + ] ]; } -- cgit v1.2.3