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/PlainTextTests.cs

60 lines
1.6 KiB
C#
Raw Normal View History

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 PlainTextTests
{
[Fact]
public void NormalText()
{
string input = "This is input.";
string expected = "This is input.";
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
[Fact]
public void Paragraphs()
{
// Okay, this one isn't based on the test_plain.py, but seems
// useful to have while converting logic.
string input = string.Join(
"\n",
"Paragraph One",
string.Empty,
"Paragraph Two");
string expected = string.Join(
"\n",
"Paragraph One",
string.Empty,
"Paragraph Two");
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
[Fact]
public void SoftBreakParagraphs()
{
// Okay, this one isn't based on the test_plain.py, but seems
// useful to have while converting logic.
string input = string.Join(
"\n",
"Paragraph",
"One",
" Three",
string.Empty,
"Paragraph Two");
string expected = string.Join(
"\n",
"Paragraph One Three",
string.Empty,
"Paragraph Two");
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
}
}