Update Markdown tests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1799 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -162,9 +162,9 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
||||
public function testUnnumbered1 ()
|
||||
{
|
||||
$this->expectOutputString("<ul>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("* Case1\n* Case2\n* Case3"), TRUE);
|
||||
@@ -173,9 +173,9 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
||||
public function testUnnumbered2 ()
|
||||
{
|
||||
$this->expectOutputString("<ul>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("- Case1\n- Case2\n- Case3"), TRUE);
|
||||
@@ -184,9 +184,9 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
||||
public function testUnnumbered3 ()
|
||||
{
|
||||
$this->expectOutputString("<ul>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("+ Case1\n+ Case2\n+ Case3"), TRUE);
|
||||
@@ -195,8 +195,8 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
||||
public function testUnnumberredMultiline1 ()
|
||||
{
|
||||
$this->expectOutputString("<ul>
|
||||
<li>line1 end</li>
|
||||
<li>line2 end</li>
|
||||
<li>line1 end</li>
|
||||
<li>line2 end</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("* line1
|
||||
@@ -208,13 +208,14 @@ end"));
|
||||
public function testUnnumberedListMultiple1 ()
|
||||
{
|
||||
$this->expectOutputString("<ul>
|
||||
<li>line1</li>
|
||||
<li>line2
|
||||
<li>line1</li>
|
||||
<li>line2
|
||||
<ul>
|
||||
<li>NEW lineA</li>
|
||||
<li>NEW lineB</li>
|
||||
</ul></li>
|
||||
<li>line3</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>line3</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("* line1
|
||||
@@ -228,9 +229,9 @@ end"));
|
||||
public function testNumbered1 ()
|
||||
{
|
||||
$this->expectOutputString("<ol>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
<li>Case1</li>
|
||||
<li>Case2</li>
|
||||
<li>Case3</li>
|
||||
</ol>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("1. Case1\n2. Case2\n3. Case3"), TRUE);
|
||||
@@ -239,7 +240,7 @@ end"));
|
||||
// Code
|
||||
public function testCode1 ()
|
||||
{
|
||||
$this->expectOutputString(" <pre><code>test
|
||||
$this->expectOutputString("<pre><code>test
|
||||
indent
|
||||
base</code></pre>");
|
||||
$md = new markdown ();
|
||||
@@ -291,7 +292,7 @@ base</code></pre>");
|
||||
|
||||
public function testChainCode1 ()
|
||||
{
|
||||
$this->expectOutputString(" <pre><code>
|
||||
$this->expectOutputString("<pre><code>
|
||||
* OK</code></pre>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html (" \n * OK"));
|
||||
@@ -299,9 +300,10 @@ base</code></pre>");
|
||||
|
||||
public function testUnnumberredAndText1 ()
|
||||
{
|
||||
$this->expectOutputString("<p>Hi</p><ul>
|
||||
<li>line1</li>
|
||||
<li>line2 end</li>
|
||||
$this->expectOutputString("<p>Hi</p>
|
||||
<ul>
|
||||
<li>line1</li>
|
||||
<li>line2 end</li>
|
||||
</ul>");
|
||||
$md = new markdown ();
|
||||
printf ($md->html ("Hi
|
||||
|
||||
Reference in New Issue
Block a user