From 3ce53597a4a3de27939daa2eddfea9361f06a59d Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Thu, 18 Aug 2022 12:59:21 +0200 Subject: [PATCH] added test for ordered lists (`
    `) --- tests/ListsTest.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/ListsTest.php b/tests/ListsTest.php index 94fc86b..6074193 100644 --- a/tests/ListsTest.php +++ b/tests/ListsTest.php @@ -29,4 +29,31 @@ final class ListsTest extends TestCase { [$source, $result] = createTest($source, $target); $this->assertEquals($source, $result); } + + public function testOrderedListsParseCorrectly() : void { + $source = " + +1. Listpoint A +2. Listpoint B + 1. Subpoint B1 + 2. Subpoint B2 +3. Listpoint C + + "; + $target = " +
      +
    1. Listpoint A
    2. +
    3. + Listpoint B +
        +
      1. Subpoint B1
      2. +
      3. Subpoint B2
      4. +
      +
    4. +
    5. Listpoint C
    6. +
    + "; + [$source, $result] = createTest($source, $target); + $this->assertEquals($source, $result); + } } \ No newline at end of file