aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-20 14:35:43 +0100
committerMario <mario@mariovavti.com>2024-03-20 14:35:43 +0100
commit3de8f5e7de424563cfe521848b2e2d11d100fcc5 (patch)
treec7419a0516af3f79a4b5e405d99dcf6ad5673bcd /tests
parenta18e873d08e733225c70b0ace31c3cbb025ff906 (diff)
downloadvolse-hubzilla-3de8f5e7de424563cfe521848b2e2d11d100fcc5.tar.gz
volse-hubzilla-3de8f5e7de424563cfe521848b2e2d11d100fcc5.tar.bz2
volse-hubzilla-3de8f5e7de424563cfe521848b2e2d11d100fcc5.zip
deal with wihitespace issues in tables and lists and add tests
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/includes/BBCodeTest.php12
1 files changed, 12 insertions, 0 deletions
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]",
'<pre><code>testvar = "this is a test"<br />echo "the message is $testvar"</code></pre>',
],
+ 'list with linebreaks \n' => [
+ "some text\n[list]\n[*] item1\n[*] item2\n[/list]\nsome more text",
+ 'some text<br /><ul class="listbullet"><li> item1<li> item2</ul><br />some more text'
+ ],
+ 'list with linebreaks \r' => [
+ "some text\r[list]\r[*] item1\r[*] item2\r[/list]\rsome more text",
+ 'some text<br /><ul class="listbullet"><li> item1<li> item2</ul><br />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<br /><ul class="listbullet"><li> item1<li> item2</ul><br />some more text'
+ ]
];
}