From 2454eb8cd9d56f42587e1577ac05824e016ac8f8 Mon Sep 17 00:00:00 2001 From: Jai Sharma Date: Tue, 24 Jan 2023 00:51:40 +0000 Subject: [PATCH] TestSceneWikiMarkdownContainer: Add visual test for inline and fenced code syntax --- .../Online/TestSceneWikiMarkdownContainer.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/osu.Game.Tests/Visual/Online/TestSceneWikiMarkdownContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneWikiMarkdownContainer.cs index c01ce56d55..7b8d04d25f 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneWikiMarkdownContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneWikiMarkdownContainer.cs @@ -270,6 +270,30 @@ Phasellus eu nunc nec ligula semper fringilla. Aliquam magna neque, placerat sed }); } + [Test] + public void TestCodeSyntax() + { + AddStep("set content", () => + { + markdownContainer.Text = @" +This is a paragraph containing `inline code` synatax. +Oh wow I do love the `WikiMarkdownContainer`, it is very cool! + +This is a line before the fenced code block: +```csharp +public class WikiMarkdownContainer : MarkdownContainer +{ + public WikiMarkdownContainer() + { + this.foo = bar; + } +} +``` +This is a line after the fenced code block! +"; + }); + } + private partial class TestMarkdownContainer : WikiMarkdownContainer { public LinkInline Link;