Skip to content

Commit 2e58bc3

Browse files
committed
More tests.
1 parent 4d570fa commit 2e58bc3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/TestCase/DjotConverterTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,32 @@ public function testOrderedListStartNumber(): void
758758
$this->assertStringContainsString('First', $result);
759759
}
760760

761+
public function testRomanNumeralList(): void
762+
{
763+
// x. is parsed as Roman numeral 10
764+
$djot = "x. first\nx. second\nx. third";
765+
766+
$result = $this->converter->convert($djot);
767+
768+
$this->assertStringContainsString('<ol start="10" type="i">', $result);
769+
$this->assertStringContainsString('first', $result);
770+
$this->assertStringContainsString('second', $result);
771+
$this->assertStringContainsString('third', $result);
772+
}
773+
774+
public function testRomanNumeralListUppercase(): void
775+
{
776+
// X. is parsed as uppercase Roman numeral 10
777+
$djot = "X. first\nX. second\nX. third";
778+
779+
$result = $this->converter->convert($djot);
780+
781+
$this->assertStringContainsString('<ol start="10" type="I">', $result);
782+
$this->assertStringContainsString('first', $result);
783+
$this->assertStringContainsString('second', $result);
784+
$this->assertStringContainsString('third', $result);
785+
}
786+
761787
public function testThematicBreakDashes(): void
762788
{
763789
$djot = "Before\n\n---\n\nAfter";

0 commit comments

Comments
 (0)