Skip to content

Commit

Permalink
Added test for "# H1 #" style headers. Renamed to ATX in test name.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasononeil committed Apr 25, 2012
1 parent ecc9b81 commit 33d4ef8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/ExampleTest.hx
Expand Up @@ -163,7 +163,7 @@ This is another regular paragraph.";
}

@Test
public function testSharpHeaders():Void
public function testATXHeaders():Void
{
var str = "# H1"
+ '\n' + "## H2"
Expand All @@ -175,6 +175,19 @@ This is another regular paragraph.";
Assert.areEqual("<h1>H1</h1>\n\n<h2>H2</h2>\n\n<h3>H3</h3>\n\n<h4>H4</h4>\n\n<h5>H5</h5>\n\n<h6>H6</h6>", result);
}

@Test
public function testATXHeadersClosed():Void
{
var str = "# H1 #"
+ '\n' + "## H2 ##"
+ '\n' + "### H3 #######################"
+ '\n' + "#### H4 ####"
+ '\n' + "##### H5 #####"
+ '\n' + "###### H6 ######";
var result = Markdown.convert(str);
Assert.areEqual("<h1>H1</h1>\n\n<h2>H2</h2>\n\n<h3>H3</h3>\n\n<h4>H4</h4>\n\n<h5>H5</h5>\n\n<h6>H6</h6>", result);
}

@Test
public function testBold():Void
{
Expand Down

0 comments on commit 33d4ef8

Please sign in to comment.