Add more Markdown unittests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1792 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -138,11 +138,26 @@ class test_markdown extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testEmphasisEM2 ()
|
public function testEmphasisEM2 ()
|
||||||
|
{
|
||||||
|
$this->expectOutputString("<p><em>file1.php</em> or <em>file2.php</em></p>");
|
||||||
|
$md = new markdown ();
|
||||||
|
printf ($md->html ("_file1.php_ or _file2.php_"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testEmphasisEM3 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<p><em>text</em></p>");
|
$this->expectOutputString("<p><em>text</em></p>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("*text*"));
|
printf ($md->html ("*text*"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testEmphasisEM4 ()
|
||||||
|
{
|
||||||
|
$this->expectOutputString("<p><em>text</em> or <em>text2</em></p>");
|
||||||
|
$md = new markdown ();
|
||||||
|
printf ($md->html ("*text* or *text2*"));
|
||||||
|
}
|
||||||
|
|
||||||
// Unnumbered lists
|
// Unnumbered lists
|
||||||
public function testUnnumbered1 ()
|
public function testUnnumbered1 ()
|
||||||
{
|
{
|
||||||
@@ -261,7 +276,7 @@ base</code></pre>");
|
|||||||
public function testLinkHTTP3 ()
|
public function testLinkHTTP3 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString(
|
$this->expectOutputString(
|
||||||
"<p><a href='mailto://test@example.com'>test@example.com</a></p>");
|
"<p><a href='mailto:test@example.com'>test@example.com</a></p>");
|
||||||
$md = new markdown ();
|
$md = new markdown ();
|
||||||
printf ($md->html ("<test@example.com>"));
|
printf ($md->html ("<test@example.com>"));
|
||||||
}
|
}
|
||||||
@@ -295,13 +310,6 @@ base</code></pre>");
|
|||||||
end"));
|
end"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testUnderscore ()
|
|
||||||
{
|
|
||||||
$this->expectOutputString("<p><em>file1.php</em> or <em>file2.php</em></p>");
|
|
||||||
$md = new markdown ();
|
|
||||||
printf ($md->html ("_file1.php_ or _file2.php_"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCarriageReturn1 ()
|
public function testCarriageReturn1 ()
|
||||||
{
|
{
|
||||||
$this->expectOutputString("<p>line1 line2</p>");
|
$this->expectOutputString("<p>line1 line2</p>");
|
||||||
|
|||||||
Reference in New Issue
Block a user