markdown allow a good indentation in ul/li.

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1511 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-07-01 12:27:50 +00:00
parent 386f490481
commit 87cb2d4fcf
2 changed files with 58 additions and 2 deletions

View File

@@ -177,6 +177,38 @@ class test_markdown extends PHPUnit_Framework_TestCase
printf ($md->html ("+ Case1\n+ Case2\n+ Case3"), TRUE);
}
public function testUnnumberredMultiline1 ()
{
$this->expectOutputString("<ul>
<li>line1 end </li>
<li>line2 end</li>
</ul>");
$md = new markdown ();
printf ($md->html ("* line1
end
* line2
end"));
}
public function testUnnumberedListMultiple1 ()
{
$this->expectOutputString("<ul>
<li>line1</li>
<li>line2
<ul>
<li>NEW lineA</li>
<li>NEW lineB</li>
</ul></li>
<li>line3</li>
</ul>");
$md = new markdown ();
printf ($md->html ("* line1
* line2
* NEW lineA
* NEW lineB
* line3"));
}
// Numbered lists
public function testNumbered1 ()
{
@@ -241,10 +273,22 @@ base</code></pre>");
public function testChainCode1 ()
{
$this->expectOutputString(" <pre><code>
* OK</code></pre>");
$md = new markdown ();
printf ($md->html (" \n * OK"));
}
public function testUnnumberredAndText1 ()
{
$this->expectOutputString("<p>Hi</p><ul>
<li>line1</li>
<li>line2 end</li>
</ul>");
$md = new markdown ();
printf ($md->html ("Hi
* line1
* line2
end"));
}
}