1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:52:55 +08:00

Add failing test case for filters potentially crashing due to invalid regex

This commit is contained in:
Bartłomiej Dach 2023-06-26 22:27:08 +02:00
parent 8a7a42b7ec
commit 4873aaf7ed
No known key found for this signature in database

View File

@ -169,6 +169,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
[TestCase("\"tags to\"", true)] [TestCase("\"tags to\"", true)]
[TestCase("\"version\"", false)] [TestCase("\"version\"", false)]
[TestCase("\"an auteur\"", true)] [TestCase("\"an auteur\"", true)]
[TestCase("\"\\\"", true)] // nasty case, covers properly escaping user input in underlying regex.
public void TestCriteriaMatchingExactTerms(string terms, bool filtered) public void TestCriteriaMatchingExactTerms(string terms, bool filtered)
{ {
var exampleBeatmapInfo = getExampleBeatmap(); var exampleBeatmapInfo = getExampleBeatmap();