From 794c3a2473024aa8119cd708acfa4fddebd10dc8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 24 Oct 2023 15:22:27 +0900 Subject: [PATCH] Add a couple more tests for sanity --- .../NonVisual/Filtering/FilterQueryParserTest.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs b/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs index d453954ae0..499300ebf8 100644 --- a/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs +++ b/osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs @@ -390,14 +390,16 @@ namespace osu.Game.Tests.NonVisual.Filtering [TestCase("My[Favourite]", new[] { 2 })] [TestCase("My[Favourite]Song", new[] { 2 })] [TestCase("Favourite]", new[] { 2 })] - [TestCase("[Diff", new[] { 0, 1, 3, 4 })] - [TestCase("[Diff]", new[] { 0, 1, 3, 4 })] + [TestCase("[Diff", new[] { 0, 1, 3, 4, 6 })] + [TestCase("[Diff]", new[] { 0, 1, 3, 4, 6 })] [TestCase("[Favourite]", new[] { 3 })] [TestCase("Title1 [Diff]", new[] { 0, 1 })] [TestCase("Title1[Diff]", new int[] { })] [TestCase("[diff ]with]", new[] { 4 })] [TestCase("[diff ]with [[ brackets]]]]", new[] { 4 })] [TestCase("[diff] another [brackets]", new[] { 4 })] + [TestCase("[Diff in title]", new int[] { })] + [TestCase("[Diff in diff]", new int[] { 6 })] public void TestDifficultySearch(string query, int[] expectedBeatmapIndexes) { var carouselBeatmaps = (((string title, string difficultyName)[])new[] @@ -407,6 +409,8 @@ namespace osu.Game.Tests.NonVisual.Filtering ("My[Favourite]Song", "Expert"), ("Title", "My Favourite Diff"), ("Another One", "diff ]with [[ brackets]]]"), + ("Diff in title", "a"), + ("a", "Diff in diff"), }).Select(info => new CarouselBeatmap(new BeatmapInfo { Metadata = new BeatmapMetadata