Add tests for checking that ArgumentOutOfRangeException doesn't occur on invalid input md string (#275)

This commit is contained in:
Alexandre Mutel
2018-12-28 10:36:10 +01:00
parent ebedc6829d
commit 03858dc5c8
3 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@@ -76,6 +76,9 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<Content Include="ArgumentOutOfRangeException.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="hang.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@@ -27,6 +27,13 @@ namespace Markdig.Tests
TestSpec(input, "<p>9&amp;ddr;&amp;*&amp;ddr;&amp;de<64><65>__</p>");
}
[Test]
public void TestInvalidCharacterHandling()
{
var input = File.ReadAllText("ArgumentOutOfRangeException.md");
var html = Markdown.ToHtml(input);
}
[Test]
public void TestInvalidCodeEscape()
{