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/PythonInspired/BaseUrlPythonTests.cs

31 lines
817 B
C#
Raw Normal View History

2021-09-07 04:56:25 +00:00
using Xunit;
namespace MfGames.Markdown.Gemtext.Tests.PythonInspired
2021-09-07 04:56:25 +00:00
{
/// <summary>
/// https://github.com/makeworld-the-better-one/md2gemini/blob/master/tests/test_base_url.py
/// </summary>
public class BaseUrlPythonTests
{
[Fact]
public void AbsoluteUrl()
{
string input = "[test](https://duck.com/test)";
string expected = "=> https://duck.com/test test";
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
[Fact]
public void RootUrl()
{
string input = "[test](/url)";
string expected = "=> /url test";
string actual = MarkdownGemtext.ToGemtext(input);
Assert.Equal(expected, actual);
}
}
}