Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
balpha committed Oct 10, 2014
1 parent 70a0246 commit 5183e59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions MarkdownSharpTests/ConfigTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ public void TestLoadFromConfiguration()
settings.Set("Markdown.AutoHyperlink", "true");
settings.Set("Markdown.AutoNewlines", "true");
settings.Set("Markdown.EmptyElementSuffix", ">");
settings.Set("Markdown.EncodeProblemUrlCharacters", "true");
settings.Set("Markdown.LinkEmails", "false");
settings.Set("Markdown.StrictBoldItalic", "true");

var markdown = new Markdown(true);
Assert.AreEqual(true, markdown.AutoHyperlink);
Assert.AreEqual(true, markdown.AutoNewLines);
Assert.AreEqual(">", markdown.EmptyElementSuffix);
Assert.AreEqual(true, markdown.EncodeProblemUrlCharacters);
Assert.AreEqual(false, markdown.LinkEmails);
Assert.AreEqual(true, markdown.StrictBoldItalic);
}
Expand All @@ -35,7 +33,6 @@ public void TestNoLoadFromConfigFile()
Assert.AreEqual(false, markdown.AutoHyperlink);
Assert.AreEqual(false, markdown.AutoNewLines);
Assert.AreEqual(" />", markdown.EmptyElementSuffix);
Assert.AreEqual(false, markdown.EncodeProblemUrlCharacters);
Assert.AreEqual(true, markdown.LinkEmails);
Assert.AreEqual(false, markdown.StrictBoldItalic);
}
Expand Down Expand Up @@ -71,16 +68,6 @@ public void TestEmptyElementSuffix()
Assert.AreEqual("<hr>\n", markdown.Transform("* * *"));
}

[Test]
public void TestEncodeProblemUrlCharacters()
{
var markdown = new Markdown();
Assert.IsFalse(markdown.EncodeProblemUrlCharacters);
Assert.AreEqual("<p><a href=\"/'*_[]()/\">Foo</a></p>\n", markdown.Transform("[Foo](/'*_[]()/)"));
markdown.EncodeProblemUrlCharacters = true;
Assert.AreEqual("<p><a href=\"/%27%2a%5f%5b%5d%28%29/\">Foo</a></p>\n", markdown.Transform("[Foo](/'*_[]()/)"));
}

[Test]
public void TestLinkEmails()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p><a href="/url/">URL wrapped in angle brackets</a>.</p>

<p><a href="/url/" title="Here's the title">URL w/ angle brackets + title</a>.</p>
<p><a href="/url/" title="Here&#39;s the title">URL w/ angle brackets + title</a>.</p>

<p><a href="">Empty</a>.</p>

Expand Down

0 comments on commit 5183e59

Please sign in to comment.