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 ()
|
public function testUnnumbered1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ul>
|
$this->expectOutputString("<ul>
|
||||||
<li>Case1</li>
|
<li>Case1</li>
|
||||||
<li>Case2</li>
|
<li>Case2</li>
|
||||||
<li>Case3</li>
|
<li>Case3</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("* Case1\n* Case2\n* Case3"), TRUE);
|
printf ($md->html ("* Case1\n* Case2\n* Case3"), TRUE);
|
||||||
@@ -173,9 +173,9 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
|||||||
public function testUnnumbered2 ()
|
public function testUnnumbered2 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ul>
|
$this->expectOutputString("<ul>
|
||||||
<li>Case1</li>
|
<li>Case1</li>
|
||||||
<li>Case2</li>
|
<li>Case2</li>
|
||||||
<li>Case3</li>
|
<li>Case3</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("- Case1\n- Case2\n- Case3"), TRUE);
|
printf ($md->html ("- Case1\n- Case2\n- Case3"), TRUE);
|
||||||
@@ -184,9 +184,9 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
|||||||
public function testUnnumbered3 ()
|
public function testUnnumbered3 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ul>
|
$this->expectOutputString("<ul>
|
||||||
<li>Case1</li>
|
<li>Case1</li>
|
||||||
<li>Case2</li>
|
<li>Case2</li>
|
||||||
<li>Case3</li>
|
<li>Case3</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("+ Case1\n+ Case2\n+ Case3"), TRUE);
|
printf ($md->html ("+ Case1\n+ Case2\n+ Case3"), TRUE);
|
||||||
@@ -195,8 +195,8 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
|||||||
public function testUnnumberredMultiline1 ()
|
public function testUnnumberredMultiline1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ul>
|
$this->expectOutputString("<ul>
|
||||||
<li>line1 end</li>
|
<li>line1 end</li>
|
||||||
<li>line2 end</li>
|
<li>line2 end</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("* line1
|
printf ($md->html ("* line1
|
||||||
@@ -208,13 +208,14 @@ end"));
|
|||||||
public function testUnnumberedListMultiple1 ()
|
public function testUnnumberedListMultiple1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ul>
|
$this->expectOutputString("<ul>
|
||||||
<li>line1</li>
|
<li>line1</li>
|
||||||
<li>line2
|
<li>line2
|
||||||
<ul>
|
<ul>
|
||||||
<li>NEW lineA</li>
|
<li>NEW lineA</li>
|
||||||
<li>NEW lineB</li>
|
<li>NEW lineB</li>
|
||||||
</ul></li>
|
</ul>
|
||||||
<li>line3</li>
|
</li>
|
||||||
|
<li>line3</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("* line1
|
printf ($md->html ("* line1
|
||||||
@@ -228,9 +229,9 @@ end"));
|
|||||||
public function testNumbered1 ()
|
public function testNumbered1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<ol>
|
$this->expectOutputString("<ol>
|
||||||
<li>Case1</li>
|
<li>Case1</li>
|
||||||
<li>Case2</li>
|
<li>Case2</li>
|
||||||
<li>Case3</li>
|
<li>Case3</li>
|
||||||
</ol>");
|
</ol>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("1. Case1\n2. Case2\n3. Case3"), TRUE);
|
printf ($md->html ("1. Case1\n2. Case2\n3. Case3"), TRUE);
|
||||||
@@ -239,7 +240,7 @@ end"));
|
|||||||
// Code
|
// Code
|
||||||
public function testCode1 ()
|
public function testCode1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString(" <pre><code>test
|
$this->expectOutputString("<pre><code>test
|
||||||
indent
|
indent
|
||||||
base</code></pre>");
|
base</code></pre>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
@@ -291,7 +292,7 @@ base</code></pre>");
|
|||||||
|
|
||||||
public function testChainCode1 ()
|
public function testChainCode1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString(" <pre><code>
|
$this->expectOutputString("<pre><code>
|
||||||
* OK</code></pre>");
|
* OK</code></pre>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html (" \n * OK"));
|
printf ($md->html (" \n * OK"));
|
||||||
@@ -299,9 +300,10 @@ base</code></pre>");
|
|||||||
|
|
||||||
public function testUnnumberredAndText1 ()
|
public function testUnnumberredAndText1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<p>Hi</p><ul>
|
$this->expectOutputString("<p>Hi</p>
|
||||||
<li>line1</li>
|
<ul>
|
||||||
<li>line2 end</li>
|
<li>line1</li>
|
||||||
|
<li>line2 end</li>
|
||||||
</ul>");
|
</ul>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("Hi
|
printf ($md->html ("Hi
|
||||||
|
|||||||
Reference in New Issue
Block a user