1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 09:02:58 +08:00

Adds test cases for usernames with special characters

This commit is contained in:
tbrose 2021-12-07 01:55:45 +01:00
parent 7a0d4fca17
commit 0a8c4f4cec

View File

@ -62,5 +62,17 @@ namespace osu.Game.Tests.Online.Chat
{
Assert.IsFalse(MessageNotifier.checkContainsUsername("Test ha\u0460\u0460o message", "\u0460\u0460"));
}
[Test]
public void TestContainsUsernameSpecialCharactersPositive()
{
Assert.IsTrue(MessageNotifier.checkContainsUsername("Test [#^-^#] message", "[#^-^#]"));
}
[Test]
public void TestContainsUsernameSpecialCharactersNegative()
{
Assert.IsFalse(MessageNotifier.checkContainsUsername("Test pad[#^-^#]oru message", "[#^-^#]"));
}
}
}