From a2df123c6d7271bfdbe867247f3d7064d6973d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 18 Sep 2023 09:19:12 +0200 Subject: [PATCH] Add failing test case for fake (but still incorrectly allowed) protocol --- osu.Game.Tests/Chat/MessageFormatterTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game.Tests/Chat/MessageFormatterTests.cs b/osu.Game.Tests/Chat/MessageFormatterTests.cs index f0dcd527a4..1baa737a9c 100644 --- a/osu.Game.Tests/Chat/MessageFormatterTests.cs +++ b/osu.Game.Tests/Chat/MessageFormatterTests.cs @@ -35,6 +35,15 @@ namespace osu.Game.Tests.Chat Assert.AreEqual(0, result.Links.Count); } + [Test] + public void TestFakeProtocolLink() + { + Message result = MessageFormatter.FormatMessage(new Message { Content = "This is a osunotarealprotocol://completely-made-up-protocol we don't support." }); + + Assert.AreEqual(result.Content, result.DisplayContent); + Assert.AreEqual(0, result.Links.Count); + } + [Test] public void TestSupportedProtocolLinkParsing() {