This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-markdown-cil/tests/MfGames.Markdown.Gemtext.Tests/QuoteTests.cs

39 lines
1,011 B
C#
Raw Normal View History

2021-09-07 04:56:25 +00:00
using Markdig;
using Markdig.Extensions.SmartyPants;
2021-09-07 04:56:25 +00:00
using MfGames.Markdown.Gemtext.Extensions;
2021-09-07 04:56:25 +00:00
using Xunit;
namespace MfGames.Markdown.Gemtext.Tests
2021-09-07 04:56:25 +00:00
{
public class QuoteTests
{
[Fact]
public void NormalDouble()
{
string input = "Normal \"double\" quote.";
string expected = "Normal \"double\" quote.";
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
[Fact]
public void SmartyDouble()
{
GemtextSmartyPantsExtension smartyPants =
new(new SmartyPantOptions());
string input = "Normal \"double\" quote.";
string expected = "Normal “double” quote.";
string actual = MarkdownGemtext.ToGemtext(
input,
new MarkdownPipelineBuilder()
.Use(smartyPants)
.Build());
Assert.Equal(expected, actual);
}
}
}